video h265 parser element =
-video capssetter element = capssetter
-
-video h264 decoder element = avdec_h264;omxdec_h264;sprddec_h264;omxh264dec
+video h264 decoder element = avdec_h264
video h265 decoder element = omx_uhd_h265dec;omx_tz_uhd_h265dec
video native resolution = 0x20
-video cea support=b94ab
+video non transcoding support=1
+
+[wfd2 h264 video format]
+video cea support=0x194ab
+
+video vesa support=0x5555555
+
+video hh support=0x555
+
+video profile=0x1
+
+video level=0x2
+
+video latency=0x0
+
+video vertical resolution=1080
+
+video horizontal resolution=1920
+
+video minimum slicesize=0
+
+video slice encoding params=200
+
+video framerate control support=0
+
+[wfd2 h265 video format]
+video cea support=394ab
video vesa support=5555555
video framerate control support=0
-video non transcoding support=0
-
-
[wfd2 audio codecs]
; 0x1: LPCM, 0x2: AAC, 0x4: AC3
;default aac and LPCM
-audio codec=0x1
+audio codec=0x3
;see mm_wfd_sink_wfd_enum.h
audio lpcm mode=0x3
Name: libmm-wfd
Summary: Multimedia Framework Wifi-Display Library
-Version: 0.2.203
+Version: 0.2.204
Release: 0
Group: System/Libraries
License: Apache-2.0
%{_includedir}/mmf/mm_wfd_sink_util.h
%{_includedir}/mmf/mm_wfd_sink_ini.h
%{_includedir}/mmf/mm_wfd_sink_attrs.h
+%{_includedir}/mmf/mm_wfd_sink_enum.h
%{_libdir}/pkgconfig/*
#%files factory
include/mm_wfd_sink_priv.h \
include/mm_wfd_sink_dlog.h \
include/mm_wfd_sink_attrs.h \
- include/mm_wfd_sink_util.h
+ include/mm_wfd_sink_util.h \
+ include/mm_wfd_sink_enum.h
libmmfwfdsink_la_SOURCES = mm_wfd_sink_attrs.c \
mm_wfd_sink_ini.c \
libmmfwfdsink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = include/mm_wfd_sink_manager.h \
- include/mm_wfd_sink_wayland.h \
- include/mm_wfd_sink_enum.h
+ include/mm_wfd_sink_wayland.h
libmmfwfdsink_la_LIBADD = $(GST_LIBS) \
$(GST_PLUGINS_BASE_LIBS) \
typedef void(*MMWFDMessageCallback)(int error_type, MMWFDSinkStateType state_type, void *user_data);
-
/**
* This function creates a wi-fi display sink object. \n
* The attributes of wi-fi display sink are created to get/set some values with application. \n
#define FONT_COLOR_GRAY "\033[37m"
#define wfd_sink_debug(fmt, arg...) do { \
- SLOGD(FONT_COLOR_RESET""fmt"", ##arg); \
+ SLOGD(FONT_COLOR_RESET""fmt"", ##arg); \
} while (0)
#define wfd_sink_info(fmt, arg...) do { \
- SLOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg); \
+ SLOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg); \
} while (0)
#define wfd_sink_error(fmt, arg...) do { \
- SLOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
+ SLOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
} while (0)
#define wfd_sink_warning(fmt, arg...) do { \
- SLOGW(FONT_COLOR_YELLOW""fmt""FONT_COLOR_RESET, ##arg); \
+ SLOGW(FONT_COLOR_YELLOW""fmt""FONT_COLOR_RESET, ##arg); \
} while (0)
#define wfd_sink_debug_fenter() do { \
- SLOGD(FONT_COLOR_RESET"<Enter>"); \
+ SLOGD(FONT_COLOR_RESET"<Enter>"); \
} while (0)
#define wfd_sink_debug_fleave() do { \
- SLOGD(FONT_COLOR_RESET"<Leave>"); \
+ SLOGD(FONT_COLOR_RESET"<Leave>"); \
} while (0)
#define wfd_sink_error_fenter() do { \
- SLOGE(FONT_COLOR_RED"NO-ERROR : <Enter>"FONT_COLOR_RESET); \
+ SLOGE(FONT_COLOR_RED"NO-ERROR : <Enter>"FONT_COLOR_RESET); \
} while (0)
#define wfd_sink_error_fleave() do { \
- SLOGE(FONT_COLOR_RED"NO-ERROR : <Leave>"FONT_COLOR_RESET); \
+ SLOGE(FONT_COLOR_RED"NO-ERROR : <Leave>"FONT_COLOR_RESET); \
} while (0)
#define wfd_sink_sucure_info(fmt, arg...) do { \
- SECURE_LOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg); \
+ SECURE_LOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg); \
} while (0)
#define wfd_sink_return_if_fail(expr) \
if (!(expr)) { \
- wfd_sink_error(FONT_COLOR_RED"failed [%s]\n"FONT_COLOR_RESET, #expr); \
- return; \
+ wfd_sink_error(FONT_COLOR_RED"failed [%s]\n"FONT_COLOR_RESET, #expr); \
+ return; \
}
#define wfd_sink_return_val_if_fail(expr, val) \
if (!(expr)) { \
- wfd_sink_error(FONT_COLOR_RED"failed [%s]\n"FONT_COLOR_RESET, #expr); \
- return val; \
+ wfd_sink_error(FONT_COLOR_RED"failed [%s]\n"FONT_COLOR_RESET, #expr); \
+ return val; \
}
#define wfd_sink_assert_not_reached() \
{ \
- wfd_sink_error(FONT_COLOR_RED"assert_not_reached()"FONT_COLOR_RESET); \
- assert(0); \
+ wfd_sink_error(FONT_COLOR_RED"assert_not_reached()"FONT_COLOR_RESET); \
+ assert(0); \
}
typedef enum {
WFD_CHANNEL_UNKNOWN = 0,
- WFD_CHANNEL_2 = (1 << 0),
+ WFD_CHANNEL_2 = (1 << 0),
WFD_CHANNEL_4 = (1 << 1),
WFD_CHANNEL_6 = (1 << 2),
WFD_CHANNEL_8 = (1 << 3)
#define WFD_CEA_4096x2160P50 (1 << 25)
#define WFD_CEA_4096x2160P60 (1 << 26)
-#define WFD_VESA_NONE 0
-#define WFD_VESA_800x600P30 (1 << 0)
-#define WFD_VESA_800x600P60 (1 << 1)
-#define WFD_VESA_1024x768P30 (1 << 2)
-#define WFD_VESA_1024x768P60 (1 << 3)
-#define WFD_VESA_1152x864P30 (1 << 4)
-#define WFD_VESA_1152x864P60 (1 << 5)
-#define WFD_VESA_1280x768P30 (1 << 6)
-#define WFD_VESA_1280x768P60 (1 << 7)
-#define WFD_VESA_1280x800P30 (1 << 8)
-#define WFD_VESA_1280x800P60 (1 << 9)
-#define WFD_VESA_1360x768P30 (1 << 10)
-#define WFD_VESA_1360x768P60 (1 << 11)
-#define WFD_VESA_1366x768P30 (1 << 12)
-#define WFD_VESA_1366x768P60 (1 << 13)
-#define WFD_VESA_1280x1024P30 (1 << 14)
-#define WFD_VESA_1280x1024P60 (1 << 15)
-#define WFD_VESA_1400x1050P30 (1 << 16)
-#define WFD_VESA_1400x1050P60 (1 << 17)
-#define WFD_VESA_1440x900P30 (1 << 18)
-#define WFD_VESA_1440x900P60 (1 << 19)
-#define WFD_VESA_1600x900P30 (1 << 20)
-#define WFD_VESA_1600x900P60 (1 << 21)
-#define WFD_VESA_1600x1200P30 (1 << 22)
-#define WFD_VESA_1600x1200P60 (1 << 23)
-#define WFD_VESA_1680x1024P30 (1 << 24)
-#define WFD_VESA_1680x1024P60 (1 << 25)
-#define WFD_VESA_1680x1050P30 (1 << 26)
-#define WFD_VESA_1680x1050P60 (1 << 27)
-#define WFD_VESA_1920x1200P30 (1 << 28)
-#define WFD_VESA_1920x1200P60 (1 << 29)
-#define WFD_VESA_2560x1440P30 (1 << 30)
-#define WFD_VESA_2560x1440P60 (1 << 31)
-#define WFD_VESA_2560x1600P30 (1ULL << 32)
-#define WFD_VESA_2560x1600P60 (1ULL << 33)
+#define WFD_VESA_NONE 0
+#define WFD_VESA_800x600P30 (1 << 0)
+#define WFD_VESA_800x600P60 (1 << 1)
+#define WFD_VESA_1024x768P30 (1 << 2)
+#define WFD_VESA_1024x768P60 (1 << 3)
+#define WFD_VESA_1152x864P30 (1 << 4)
+#define WFD_VESA_1152x864P60 (1 << 5)
+#define WFD_VESA_1280x768P30 (1 << 6)
+#define WFD_VESA_1280x768P60 (1 << 7)
+#define WFD_VESA_1280x800P30 (1 << 8)
+#define WFD_VESA_1280x800P60 (1 << 9)
+#define WFD_VESA_1360x768P30 (1 << 10)
+#define WFD_VESA_1360x768P60 (1 << 11)
+#define WFD_VESA_1366x768P30 (1 << 12)
+#define WFD_VESA_1366x768P60 (1 << 13)
+#define WFD_VESA_1280x1024P30 (1 << 14)
+#define WFD_VESA_1280x1024P60 (1 << 15)
+#define WFD_VESA_1400x1050P30 (1 << 16)
+#define WFD_VESA_1400x1050P60 (1 << 17)
+#define WFD_VESA_1440x900P30 (1 << 18)
+#define WFD_VESA_1440x900P60 (1 << 19)
+#define WFD_VESA_1600x900P30 (1 << 20)
+#define WFD_VESA_1600x900P60 (1 << 21)
+#define WFD_VESA_1600x1200P30 (1 << 22)
+#define WFD_VESA_1600x1200P60 (1 << 23)
+#define WFD_VESA_1680x1024P30 (1 << 24)
+#define WFD_VESA_1680x1024P60 (1 << 25)
+#define WFD_VESA_1680x1050P30 (1 << 26)
+#define WFD_VESA_1680x1050P60 (1 << 27)
+#define WFD_VESA_1920x1200P30 (1 << 28)
+#define WFD_VESA_1920x1200P60 (1 << 29)
+#define WFD_VESA_2560x1440P30 (1 << 30)
+#define WFD_VESA_2560x1440P60 (1ULL << 31)
+#define WFD_VESA_2560x1600P30 (1ULL << 32)
+#define WFD_VESA_2560x1600P60 (1ULL << 33)
#define WFD_HH_NONE 0
#define WFD_HH_800x480P30 (1 << 0)
#define WFD_HH_848x480P30 (1 << 10)
#define WFD_HH_848x480P60 (1 << 11)
+typedef enum {
+ WFD_CEA_INDEX_640x480P60 = 0,
+ WFD_CEA_INDEX_720x480P60,
+ WFD_CEA_INDEX_720x480I60,
+ WFD_CEA_INDEX_720x576P50,
+ WFD_CEA_INDEX_720x576I50,
+ WFD_CEA_INDEX_1280x720P30,
+ WFD_CEA_INDEX_1280x720P60,
+ WFD_CEA_INDEX_1920x1080P30,
+ WFD_CEA_INDEX_1920x1080P60,
+ WFD_CEA_INDEX_1920x1080I60,
+ WFD_CEA_INDEX_1280x720P25,
+ WFD_CEA_INDEX_1280x720P50,
+ WFD_CEA_INDEX_1920x1080P25,
+ WFD_CEA_INDEX_1920x1080P50,
+ WFD_CEA_INDEX_1920x1080I50,
+ WFD_CEA_INDEX_1280x720P24,
+ WFD_CEA_INDEX_1920x1080P24,
+ WFD_CEA_INDEX_3840x2160P24,
+ WFD_CEA_INDEX_3840x2160P25,
+ WFD_CEA_INDEX_3840x2160P30,
+ WFD_CEA_INDEX_3840x2160P50,
+ WFD_CEA_INDEX_3840x2160P60,
+ WFD_CEA_INDEX_4096x2160P24,
+ WFD_CEA_INDEX_4096x2160P25,
+ WFD_CEA_INDEX_4096x2160P30,
+ WFD_CEA_INDEX_4096x2160P50,
+ WFD_CEA_INDEX_4096x2160P60
+} WFDCEAIndexEnum;
+
+typedef enum {
+ WFD_VESA_INDEX_800x600P30 = 0,
+ WFD_VESA_INDEX_800x600P60,
+ WFD_VESA_INDEX_1024x768P30,
+ WFD_VESA_INDEX_1024x768P60,
+ WFD_VESA_INDEX_1152x864P30,
+ WFD_VESA_INDEX_1152x864P60,
+ WFD_VESA_INDEX_1280x768P30,
+ WFD_VESA_INDEX_1280x768P60,
+ WFD_VESA_INDEX_1280x800P30,
+ WFD_VESA_INDEX_1280x800P60,
+ WFD_VESA_INDEX_1360x768P30,
+ WFD_VESA_INDEX_1360x768P60,
+ WFD_VESA_INDEX_1366x768P30,
+ WFD_VESA_INDEX_1366x768P60,
+ WFD_VESA_INDEX_1280x1024P30,
+ WFD_VESA_INDEX_1280x1024P60,
+ WFD_VESA_INDEX_1400x1050P30,
+ WFD_VESA_INDEX_1400x1050P60,
+ WFD_VESA_INDEX_1440x900P30,
+ WFD_VESA_INDEX_1440x900P60,
+ WFD_VESA_INDEX_1600x900P30,
+ WFD_VESA_INDEX_1600x900P60,
+ WFD_VESA_INDEX_1600x1200P30,
+ WFD_VESA_INDEX_1600x1200P60,
+ WFD_VESA_INDEX_1680x1024P30,
+ WFD_VESA_INDEX_1680x1024P60,
+ WFD_VESA_INDEX_1680x1050P30,
+ WFD_VESA_INDEX_1680x1050P60,
+ WFD_VESA_INDEX_1920x1200P30,
+ WFD_VESA_INDEX_1920x1200P60,
+ WFD_VESA_INDEX_2560x1440P30,
+ WFD_VESA_INDEX_2560x1440P60,
+ WFD_VESA_INDEX_2560x1600P30,
+ WFD_VESA_INDEX_2560x1600P60
+} WFDVESAIndexEnum;
+
+typedef enum {
+ WFD_HH_INDEX_800x480P30 = 0,
+ WFD_HH_INDEX_800x480P60,
+ WFD_HH_INDEX_854x480P30,
+ WFD_HH_INDEX_854x480P60,
+ WFD_HH_INDEX_864x480P30,
+ WFD_HH_INDEX_864x480P60,
+ WFD_HH_INDEX_640x360P30,
+ WFD_HH_INDEX_640x360P60,
+ WFD_HH_INDEX_960x540P30,
+ WFD_HH_INDEX_960x540P60,
+ WFD_HH_INDEX_848x480P30,
+ WFD_HH_INDEX_848x480P60
+} WFDHHIndexEnum;
typedef enum {
WFD_H264_UNKNOWN_PROFILE = 0,
WFD_H264_LEVEL_4_2 = (1 << 4)
} WFDVideoH264Level;
-//Added_for_Miracast_R2
+/* Added_for_Miracast_R2 */
typedef enum {
WFD_H265_UNKNOWN_PROFILE = 0,
WFD_H265_MAIN_PROFILE = (1 << 0)
} WFDVideoH265Level;
typedef enum {
+ WFD2_H264_UNKNOWN_PROFILE = 0,
+ WFD2_H264_CBP = (1 << 0), /* Constrained Baseline Profile */
+ WFD2_H264_CHP = (1 << 1), /* Constrained High Profile */
+ WFD2_H264_CHP2 = (1 << 2), /* Constrained High Profile2 */
+ WFD2_H264_BP = (1 << 3), /* Baseline Profile */
+ WFD2_H264_MP = (1 << 4), /* Main Profile */
+ WFD2_H264_HP = (1 << 5) /* High Profile */
+} WFD2VideoH264ProfileEnum;
+
+typedef enum {
+ WFD2_H265_UNKNOWN_PROFILE = 0,
+ WFD2_H265_MAIN_PROFILE = (1 << 0),
+ WFD2_H265_MAIN_10_PROFILE = (1 << 1),
+ WFD2_H265_MAIN_444_PROFILE = (1 << 2),
+ WFD2_H265_MAIN_STILL_PICTURE_PROFILE = (1 << 3),
+ WFD2_H265_SCREEN_CONTENT_CODING_PROFILE = (1 << 4),
+ WFD2_H265_MAIN_444_10_PROFILE = (1 << 5)
+} WFD2VideoH265ProfileEnum;
+
+typedef enum {
+ WFD2_H264_LEVEL_UNKNOWN = 0,
+ WFD2_H264_LEVEL_3_1 = (1 << 0),
+ WFD2_H264_LEVEL_3_2 = (1 << 1),
+ WFD2_H264_LEVEL_4 = (1 << 2),
+ WFD2_H264_LEVEL_4_1 = (1 << 3),
+ WFD2_H264_LEVEL_4_2 = (1 << 4),
+ WFD2_H264_LEVEL_5 = (1 << 5),
+ WFD2_H264_LEVEL_5_1 = (1 << 6),
+ WFD2_H264_LEVEL_5_2 = (1 << 7)
+} WFD2VideoH264LevelEnum;
+
+typedef enum {
+ WFD2_H265_LEVEL_UNKNOWN = 0,
+ WFD2_H265_LEVEL_3_1 = (1 << 1),
+ WFD2_H265_LEVEL_4 = (1 << 2),
+ WFD2_H265_LEVEL_4_1 = (1 << 3),
+ WFD2_H265_LEVEL_5 = (1 << 4),
+ WFD2_H265_LEVEL_5_1 = (1 << 5)
+} WFD2VideoH265LevelEnum;
+
+typedef enum {
GST_LPCM_UNKNOWN_MODE = 0,
GST_LPCM_441KH_16B_2C = (1 << 0), /* Samplirng Frequency(kHz), Bit-width(bits), Channels */
GST_LPCM_48KH_16B_2C = (1 << 1),
} WFD2AudioCodecs;
typedef struct {
+ guint video_codec;
+ guint video_native_resolution;
+ gint video_non_transcoding_support;
+} WFD2VideoFormats;
+
+typedef struct {
+ guint64 video_cea_support;
+ guint64 video_vesa_support;
+ guint64 video_hh_support;
+ guint video_profile;
+ guint video_level;
+ guint video_latency;
+ gint video_vertical_resolution;
+ gint video_horizontal_resolution;
+ gint video_minimum_slicing;
+ gint video_slice_enc_param;
+ gint video_framerate_control_support;
+} WFD2VideoCodecSpec;
+
+typedef struct {
gboolean enable_hdcp;
gint hdcp_content_protection;
gint hdcp_port_no;
gchar name_of_audio_sink[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_video_hdcp[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_video_h264_parser[WFD_SINK_INI_MAX_STRLEN];
- gchar name_of_video_capssetter[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_video_h264_decoder[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_video_h265_parser[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_video_h265_decoder[WFD_SINK_INI_MAX_STRLEN];
WFD2AudioCodecs wfd2_audio_codecs;
/* video parameter for reponse of R2 M3 request */
- WFDVideoFormats wfd2_video_formats;
+ WFD2VideoFormats wfd2_video_formats;
+ WFD2VideoCodecSpec wfd2_video_h264_info;
+ WFD2VideoCodecSpec wfd2_video_h265_info;
} mm_wfd_sink_ini_t;
#define MM_WFD_SINK_DEFAULT_INI \
\n\
video h265 parser element = \n\
\n\
-video capssetter element = capssetter\n\
-\n\
video h264 decoder element = avdec_h264\n\
\n\
video h265 decoder element = \n\
WFD_SINK_V_D_QUEUE,
WFD_SINK_V_D_HDCP,
WFD_SINK_V_D_H264_PARSE,
- WFD_SINK_V_D_CAPSSETTER,
WFD_SINK_V_D_H264_DEC,
WFD_SINK_V_D_NUM
};
if (x_name && (strlen(x_factory) > 1)) {\
x_bin[x_id].id = x_id;\
x_bin[x_id].gst = gst_element_factory_make(x_factory, x_name);\
- if (! x_bin[x_id].gst) {\
+ if (!x_bin[x_id].gst) {\
wfd_sink_error("failed to create %s \n", x_factory);\
goto CREATE_ERROR;\
- }\
+ } \
wfd_sink_debug("%s is created \n", x_factory);\
if (x_add_bucket)\
element_bucket = g_list_append(element_bucket, &x_bin[x_id]);\
- }\
+ } \
} while (0);
/* generating dot */
if (x_wfd_sink->ini.generate_dot) { \
wfd_sink_debug("create dot file : %s.dot", x_name);\
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(x_wfd_sink->pipeline->mainbin[WFD_SINK_M_PIPE].gst), \
- GST_DEBUG_GRAPH_SHOW_ALL, x_name); \
+ GST_DEBUG_GRAPH_SHOW_ALL, x_name); \
}
/* postint message */
#define MMWFDSINK_PRINT_STATE(x_wfd_sink) \
wfd_sink_debug("--prev %s, current %s, pending %s--\n", \
- MMWFDSINK_STATE_GET_NAME(MMWFDSINK_PREVIOUS_STATE(x_wfd_sink)), \
- MMWFDSINK_STATE_GET_NAME(MMWFDSINK_CURRENT_STATE(x_wfd_sink)), \
- MMWFDSINK_STATE_GET_NAME(MMWFDSINK_PENDING_STATE(x_wfd_sink)));
+ MMWFDSINK_STATE_GET_NAME(MMWFDSINK_PREVIOUS_STATE(x_wfd_sink)), \
+ MMWFDSINK_STATE_GET_NAME(MMWFDSINK_CURRENT_STATE(x_wfd_sink)), \
+ MMWFDSINK_STATE_GET_NAME(MMWFDSINK_PENDING_STATE(x_wfd_sink)));
#define MMWFDSINK_CHECK_STATE(x_wfd_sink, x_cmd) \
- switch (__mm_wfd_sink_check_state((mm_wfd_sink_t *)x_wfd_sink, x_cmd)) \
- { \
+ switch (__mm_wfd_sink_check_state((mm_wfd_sink_t *)x_wfd_sink, x_cmd)) { \
case MM_ERROR_NONE: \
break;\
case MM_ERROR_WFD_NO_OP: \
if (x_wfd_sink->ini.trace_buffers) { \
mm_wfd_sink_util_add_pad_probe(x_pad, x_element, (const gchar*)x_pad_name); \
} else {\
- mm_wfd_sink_util_add_pad_probe_for_checking_first_buffer (x_pad, x_element, (const gchar*)x_pad_name); \
- }\
+ mm_wfd_sink_util_add_pad_probe_for_checking_first_buffer(x_pad, x_element, (const gchar*)x_pad_name); \
+ } \
}
void
#define MMWFDSINK_TS_DATA_DUMP(x_wfd_sink, x_element, x_pad_name) \
if (x_wfd_sink && x_wfd_sink->ini.dump_ts_data) { \
- mm_wfd_sink_util_add_pad_probe_for_data_dump (x_element, (const gchar*)x_pad_name); \
+ mm_wfd_sink_util_add_pad_probe_for_data_dump(x_element, (const gchar*)x_pad_name); \
}
-
#endif
{
#endif
-typedef struct
-{
+typedef struct {
struct wl_display *display;
struct wl_registry *registry;
struct tizen_surface *tz_surface;
struct tizen_resource *tz_resource;
} wl_client;
-int mm_wfd_sink_wlclient_create (wl_client ** wlclient);
-int mm_wfd_sink_wlclient_get_wl_window_wl_surface_id (wl_client * wlclient, struct wl_surface *surface, struct wl_display *display);
-void mm_wfd_sink_wlclient_finalize (wl_client * wlclient);
+int mm_wfd_sink_wlclient_create(wl_client **wlclient);
+int mm_wfd_sink_wlclient_get_wl_window_wl_surface_id(wl_client *wlclient, struct wl_surface *surface, struct wl_display *display);
+void mm_wfd_sink_wlclient_finalize(wl_client *wlclient);
#ifdef __cplusplus
}
MM_ATTRS_VALID_TYPE_INT_RANGE,
0,
4096
- },
+ },
{
(char *)"window_height",
MM_ATTRS_TYPE_INT,
#define DEFAULT_NAME_OF_AUDIO_SINK ""
#define DEFAULT_NAME_OF_VIDEO_HDCP ""
#define DEFAULT_NAME_OF_VIDEO_H264_PARSER ""
-#define DEFAULT_NAME_OF_VIDEO_CAPSSETTER ""
#define DEFAULT_NAME_OF_VIDEO_H264_DECODER ""
#define DEFAULT_NAME_OF_VIDEO_H265_PARSER ""
#define DEFAULT_NAME_OF_VIDEO_H265_DECODER ""
/* R2 Video */
#define DEFAULT_WFD2_VIDEO_FORMATS_CODEC WFD_VIDEO_H265 | WFD_VIDEO_H264
#define DEFAULT_WFD2_VIDEO_FORMATS_NATIVE_RESOLUTION 0x20
-#define DEFAULT_WFD2_VIDEO_FORMATS_CEA_SUPPORT "0x84ab"
-#define DEFAULT_WFD2_VIDEO_FORMATS_VESA_SUPPORT "0x1"
-#define DEFAULT_WFD2_VIDEO_FORMATS_HH_SUPPORT "0x555"
-#define DEFAULT_WFD2_VIDEO_FORMATS_PROFILE WFD_H265_MAIN_PROFILE
-#define DEFAULT_WFD2_VIDEO_FORMATS_LEVEL WFD_H265_LEVEL_3_1
-#define DEFAULT_WFD2_VIDEO_FORMATS_LATENCY 0x0
-#define DEFAULT_WFD2_VIDEO_FORMATS_VERTICAL_RESOLUTION 720
-#define DEFAULT_WFD2_VIDEO_FORMATS_HORIZONTAL_RESOLUTION 1280
-#define DEFAULT_WFD2_VIDEO_FORMATS_MIN_SLICESIZE 0
-#define DEFAULT_WFD2_VIDEO_FORMATS_SLICE_ENC_PARAM 200
-#define DEFAULT_WFD2_VIDEO_FORMATS_FRAMERATE_CONTROL 11
#define DEFAULT_WFD2_VIDEO_FORMATS_NON_TRANSCODING_SUPPORT 0
+/*R2 H264*/
+#define DEFAULT_WFD2_VIDEO_H264_CEA_SUPPORT "0x84ab"
+#define DEFAULT_WFD2_VIDEO_H264_VESA_SUPPORT "0x1"
+#define DEFAULT_WFD2_VIDEO_H264_HH_SUPPORT "0x555"
+#define DEFAULT_WFD2_VIDEO_H264_PROFILE WFD_H264_BASE_PROFILE
+#define DEFAULT_WFD2_VIDEO_H264_LEVEL WFD_H264_LEVEL_3_2
+#define DEFAULT_WFD2_VIDEO_H264_LATENCY 0x0
+#define DEFAULT_WFD2_VIDEO_H264_VERTICAL_RESOLUTION 720
+#define DEFAULT_WFD2_VIDEO_H264_HORIZONTAL_RESOLUTION 1280
+#define DEFAULT_WFD2_VIDEO_H264_MIN_SLICESIZE 0
+#define DEFAULT_WFD2_VIDEO_H264_SLICE_ENC_PARAM 200
+#define DEFAULT_WFD2_VIDEO_H264_FRAMERATE_CONTROL 11
+
+/*R2 H265*/
+#define DEFAULT_WFD2_VIDEO_H265_CEA_SUPPORT "0x84ab"
+#define DEFAULT_WFD2_VIDEO_H265_VESA_SUPPORT "0x1"
+#define DEFAULT_WFD2_VIDEO_H265_HH_SUPPORT "0x555"
+#define DEFAULT_WFD2_VIDEO_H265_PROFILE WFD_H265_MAIN_PROFILE
+#define DEFAULT_WFD2_VIDEO_H265_LEVEL WFD_H265_LEVEL_3_1
+#define DEFAULT_WFD2_VIDEO_H265_LATENCY 0x0
+#define DEFAULT_WFD2_VIDEO_H265_VERTICAL_RESOLUTION 720
+#define DEFAULT_WFD2_VIDEO_H265_HORIZONTAL_RESOLUTION 1280
+#define DEFAULT_WFD2_VIDEO_H265_MIN_SLICESIZE 0
+#define DEFAULT_WFD2_VIDEO_H265_SLICE_ENC_PARAM 200
+#define DEFAULT_WFD2_VIDEO_H265_FRAMERATE_CONTROL 11
+
/*R2 Audio*/
#define DEFAULT_WFD2_AUDIO_CODECS_CODEC WFD_AUDIO_LPCM | WFD_AUDIO_AAC
#define DEFAULT_WFD2_AUDIO_CODECS_LPCM_MODE GST_LPCM_441KH_16B_2C | GST_LPCM_48KH_16B_2C
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_lpcm_filter, "pipeline:lpcm filter element", DEFAULT_NAME_OF_LPCM_FILTER);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_audio_resampler, "pipeline:audio resampler element", DEFAULT_NAME_OF_AUDIO_RESAMPLER);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_audio_volume, "pipeline:audio volume element", DEFAULT_NAME_OF_AUDIO_VOLUME);
+ MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_audio_sinkbin_queue, "pipeline:audio sinkbin queue element", DEFAULT_NAME_OF_AUDIO_SINKBIN_QUEUE);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_audio_sink, "pipeline:audio sink element", DEFAULT_NAME_OF_AUDIO_SINK);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_video_hdcp, "pipeline:video hdcp element", DEFAULT_NAME_OF_VIDEO_HDCP);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_video_h264_parser, "pipeline:video h264 parser element", DEFAULT_NAME_OF_VIDEO_H264_PARSER);
- MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_video_capssetter, "pipeline:video capssetter element", DEFAULT_NAME_OF_VIDEO_CAPSSETTER);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_video_h264_decoder, "pipeline:video h264 decoder element", DEFAULT_NAME_OF_VIDEO_H264_DECODER);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_video_h265_parser, "pipeline:video h265 parser element", DEFAULT_NAME_OF_VIDEO_H265_PARSER);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_video_h265_decoder, "pipeline:video h265 decoder element", DEFAULT_NAME_OF_VIDEO_H265_DECODER);
/* video r2 parameter*/
ini->wfd2_video_formats.video_codec = iniparser_getint(dict, "wfd2 video formats:video codec", DEFAULT_WFD2_VIDEO_FORMATS_CODEC);
ini->wfd2_video_formats.video_native_resolution = iniparser_getint(dict, "wfd2 video formats:video native resolution", DEFAULT_WFD2_VIDEO_FORMATS_NATIVE_RESOLUTION);
+ ini->wfd2_video_formats.video_non_transcoding_support = iniparser_getint(dict, "wfd2 video formats:video non transcoding support", DEFAULT_WFD2_VIDEO_FORMATS_NON_TRANSCODING_SUPPORT);
+
+ /* video h264 info */
memset(tempstr, 0x00, WFD_SINK_INI_MAX_STRLEN);
- MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 video formats:video cea support", DEFAULT_WFD2_VIDEO_FORMATS_CEA_SUPPORT);
- ini->wfd2_video_formats.video_cea_support = strtoul(tempstr, NULL, 16);
+ MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 h264 video format:video cea support", DEFAULT_WFD2_VIDEO_H264_CEA_SUPPORT);
+ ini->wfd2_video_h264_info.video_cea_support = strtoul(tempstr, NULL, 16);
memset(tempstr, 0x00, WFD_SINK_INI_MAX_STRLEN);
- MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 video formats:video vesa support", DEFAULT_WFD2_VIDEO_FORMATS_VESA_SUPPORT);
- ini->wfd2_video_formats.video_vesa_support = strtoul(tempstr, NULL, 16);
+ MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 h264 video format:video vesa support", DEFAULT_WFD2_VIDEO_H264_VESA_SUPPORT);
+ ini->wfd2_video_h264_info.video_vesa_support = strtoul(tempstr, NULL, 16);
memset(tempstr, 0x00, WFD_SINK_INI_MAX_STRLEN);
- MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 video formats:video hh support", DEFAULT_WFD2_VIDEO_FORMATS_HH_SUPPORT);
- ini->wfd2_video_formats.video_hh_support = strtoul(tempstr, NULL, 16);
- ini->wfd2_video_formats.video_profile = iniparser_getint(dict, "wfd2 video formats:video profile", DEFAULT_WFD2_VIDEO_FORMATS_PROFILE);
- ini->wfd2_video_formats.video_level = iniparser_getint(dict, "wfd2 video formats:video level", DEFAULT_WFD2_VIDEO_FORMATS_LEVEL);
- ini->wfd2_video_formats.video_latency = iniparser_getint(dict, "wfd2 video formats:video latency", DEFAULT_WFD2_VIDEO_FORMATS_LATENCY);
- ini->wfd2_video_formats.video_vertical_resolution = iniparser_getint(dict, "wfd2 video formats:video vertical resolution", DEFAULT_WFD2_VIDEO_FORMATS_VERTICAL_RESOLUTION);
- ini->wfd2_video_formats.video_horizontal_resolution = iniparser_getint(dict, "wfd2 video formats:video horizontal resolution", DEFAULT_WFD2_VIDEO_FORMATS_HORIZONTAL_RESOLUTION);
- ini->wfd2_video_formats.video_minimum_slicing = iniparser_getint(dict, "wfd2 video formats:video minimum slicesize", DEFAULT_WFD2_VIDEO_FORMATS_MIN_SLICESIZE);
- ini->wfd2_video_formats.video_slice_enc_param = iniparser_getint(dict, "wfd2 video formats:video slice encoding params", DEFAULT_WFD2_VIDEO_FORMATS_SLICE_ENC_PARAM);
- ini->wfd2_video_formats.video_framerate_control_support = iniparser_getint(dict, "wfd2 video formats:video framerate control support", DEFAULT_WFD2_VIDEO_FORMATS_FRAMERATE_CONTROL);
- ini->wfd2_video_formats.video_non_transcoding_support = iniparser_getint(dict, "wfd2 video formats:video non transcoding support", DEFAULT_WFD2_VIDEO_FORMATS_NON_TRANSCODING_SUPPORT);
+ MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 h264 video format:video hh support", DEFAULT_WFD2_VIDEO_H264_HH_SUPPORT);
+ ini->wfd2_video_h264_info.video_hh_support = strtoul(tempstr, NULL, 16);
+ ini->wfd2_video_h264_info.video_profile = iniparser_getint(dict, "wfd2 h264 video format:video profile", DEFAULT_WFD2_VIDEO_H264_PROFILE);
+ ini->wfd2_video_h264_info.video_level = iniparser_getint(dict, "wfd2 h264 video format:video level", DEFAULT_WFD2_VIDEO_H264_LEVEL);
+ ini->wfd2_video_h264_info.video_latency = iniparser_getint(dict, "wfd2 h264 video format:video latency", DEFAULT_WFD2_VIDEO_H264_LATENCY);
+ ini->wfd2_video_h264_info.video_vertical_resolution = iniparser_getint(dict, "wfd2 h264 video format:video vertical resolution", DEFAULT_WFD2_VIDEO_H264_VERTICAL_RESOLUTION);
+ ini->wfd2_video_h264_info.video_horizontal_resolution = iniparser_getint(dict, "wfd2 h264 video format:video horizontal resolution", DEFAULT_WFD2_VIDEO_H264_HORIZONTAL_RESOLUTION);
+ ini->wfd2_video_h264_info.video_minimum_slicing = iniparser_getint(dict, "wfd2 h264 video format:video minimum slicesize", DEFAULT_WFD2_VIDEO_H264_MIN_SLICESIZE);
+ ini->wfd2_video_h264_info.video_slice_enc_param = iniparser_getint(dict, "wfd2 h264 video format:video slice encoding params", DEFAULT_WFD2_VIDEO_H264_SLICE_ENC_PARAM);
+ ini->wfd2_video_h264_info.video_framerate_control_support = iniparser_getint(dict, "wfd2 h264 video format:video framerate control support", DEFAULT_WFD2_VIDEO_H264_FRAMERATE_CONTROL);
+
+ /* video h265 info */
+ memset(tempstr, 0x00, WFD_SINK_INI_MAX_STRLEN);
+ MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 h265 video format:video cea support", DEFAULT_WFD2_VIDEO_H265_CEA_SUPPORT);
+ ini->wfd2_video_h265_info.video_cea_support = strtoul(tempstr, NULL, 16);
+ memset(tempstr, 0x00, WFD_SINK_INI_MAX_STRLEN);
+ MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 h265 video format:video vesa support", DEFAULT_WFD2_VIDEO_H265_VESA_SUPPORT);
+ ini->wfd2_video_h265_info.video_vesa_support = strtoul(tempstr, NULL, 16);
+ memset(tempstr, 0x00, WFD_SINK_INI_MAX_STRLEN);
+ MM_WFD_SINK_INI_GET_STRING(dict, tempstr, "wfd2 h265 video format:video hh support", DEFAULT_WFD2_VIDEO_H265_HH_SUPPORT);
+ ini->wfd2_video_h265_info.video_hh_support = strtoul(tempstr, NULL, 16);
+ ini->wfd2_video_h265_info.video_profile = iniparser_getint(dict, "wfd2 h265 video format:video profile", DEFAULT_WFD2_VIDEO_H265_PROFILE);
+ ini->wfd2_video_h265_info.video_level = iniparser_getint(dict, "wfd2 h265 video format:video level", DEFAULT_WFD2_VIDEO_H265_LEVEL);
+ ini->wfd2_video_h265_info.video_latency = iniparser_getint(dict, "wfd2 h265 video format:video latency", DEFAULT_WFD2_VIDEO_H265_LATENCY);
+ ini->wfd2_video_h265_info.video_vertical_resolution = iniparser_getint(dict, "wfd2 h265 video format:video vertical resolution", DEFAULT_WFD2_VIDEO_H265_VERTICAL_RESOLUTION);
+ ini->wfd2_video_h265_info.video_horizontal_resolution = iniparser_getint(dict, "wfd2 h265 video format:video horizontal resolution", DEFAULT_WFD2_VIDEO_H265_HORIZONTAL_RESOLUTION);
+ ini->wfd2_video_h265_info.video_minimum_slicing = iniparser_getint(dict, "wfd2 h265 video format:video minimum slicesize", DEFAULT_WFD2_VIDEO_H265_MIN_SLICESIZE);
+ ini->wfd2_video_h265_info.video_slice_enc_param = iniparser_getint(dict, "wfd2 h265 video format:video slice encoding params", DEFAULT_WFD2_VIDEO_H265_SLICE_ENC_PARAM);
+ ini->wfd2_video_h265_info.video_framerate_control_support = iniparser_getint(dict, "wfd2 h265 video format:video framerate control support", DEFAULT_WFD2_VIDEO_H265_FRAMERATE_CONTROL);
/* audio r2 parameter*/
ini->wfd2_audio_codecs.audio_codec = iniparser_getint(dict, "wfd2 audio codecs:audio codec", DEFAULT_WFD2_AUDIO_CODECS_CODEC);
strncpy(ini->name_of_lpcm_filter, DEFAULT_NAME_OF_LPCM_FILTER, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_audio_resampler, DEFAULT_NAME_OF_AUDIO_RESAMPLER, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_audio_volume, DEFAULT_NAME_OF_AUDIO_VOLUME, WFD_SINK_INI_MAX_STRLEN - 1);
+ strncpy(ini->name_of_audio_sinkbin_queue, DEFAULT_NAME_OF_AUDIO_SINKBIN_QUEUE, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_audio_sink, DEFAULT_NAME_OF_AUDIO_SINK, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_video_hdcp, DEFAULT_NAME_OF_VIDEO_HDCP, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_video_h264_parser, DEFAULT_NAME_OF_VIDEO_H264_PARSER, WFD_SINK_INI_MAX_STRLEN - 1);
- strncpy(ini->name_of_video_capssetter, DEFAULT_NAME_OF_VIDEO_CAPSSETTER, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_video_h264_decoder, DEFAULT_NAME_OF_VIDEO_H264_DECODER, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_video_h265_parser, DEFAULT_NAME_OF_VIDEO_H265_PARSER, WFD_SINK_INI_MAX_STRLEN - 1);
strncpy(ini->name_of_video_h265_decoder, DEFAULT_NAME_OF_VIDEO_H265_DECODER, WFD_SINK_INI_MAX_STRLEN - 1);
/* video r2 parameter*/
ini->wfd2_video_formats.video_codec = DEFAULT_WFD2_VIDEO_FORMATS_CODEC;
ini->wfd2_video_formats.video_native_resolution = DEFAULT_WFD2_VIDEO_FORMATS_NATIVE_RESOLUTION;
- ini->wfd2_video_formats.video_cea_support = strtoul(DEFAULT_WFD2_VIDEO_FORMATS_CEA_SUPPORT, NULL, 16);
- ini->wfd2_video_formats.video_vesa_support = strtoul(DEFAULT_WFD2_VIDEO_FORMATS_VESA_SUPPORT, NULL, 16);
- ini->wfd2_video_formats.video_hh_support = strtoul(DEFAULT_WFD2_VIDEO_FORMATS_HH_SUPPORT, NULL, 16);
- ini->wfd2_video_formats.video_profile = DEFAULT_WFD2_VIDEO_FORMATS_PROFILE;
- ini->wfd2_video_formats.video_level = DEFAULT_WFD2_VIDEO_FORMATS_LEVEL;
- ini->wfd2_video_formats.video_latency = DEFAULT_WFD2_VIDEO_FORMATS_LATENCY;
- ini->wfd2_video_formats.video_vertical_resolution = DEFAULT_WFD2_VIDEO_FORMATS_VERTICAL_RESOLUTION;
- ini->wfd2_video_formats.video_horizontal_resolution = DEFAULT_WFD2_VIDEO_FORMATS_HORIZONTAL_RESOLUTION;
- ini->wfd2_video_formats.video_minimum_slicing = DEFAULT_WFD2_VIDEO_FORMATS_MIN_SLICESIZE;
- ini->wfd2_video_formats.video_slice_enc_param = DEFAULT_WFD2_VIDEO_FORMATS_SLICE_ENC_PARAM;
- ini->wfd2_video_formats.video_framerate_control_support = DEFAULT_WFD2_VIDEO_FORMATS_FRAMERATE_CONTROL;
ini->wfd2_video_formats.video_non_transcoding_support = DEFAULT_WFD2_VIDEO_FORMATS_NON_TRANSCODING_SUPPORT;
+ /* video h264 info */
+ ini->wfd2_video_h264_info.video_cea_support = strtoul(DEFAULT_WFD2_VIDEO_H264_CEA_SUPPORT, NULL, 16);
+ ini->wfd2_video_h264_info.video_vesa_support = strtoul(DEFAULT_WFD2_VIDEO_H264_VESA_SUPPORT, NULL, 16);
+ ini->wfd2_video_h264_info.video_hh_support = strtoul(DEFAULT_WFD2_VIDEO_H264_HH_SUPPORT, NULL, 16);
+ ini->wfd2_video_h264_info.video_profile = DEFAULT_WFD2_VIDEO_H264_PROFILE;
+ ini->wfd2_video_h264_info.video_level = DEFAULT_WFD2_VIDEO_H264_LEVEL;
+ ini->wfd2_video_h264_info.video_latency = DEFAULT_WFD2_VIDEO_H264_LATENCY;
+ ini->wfd2_video_h264_info.video_vertical_resolution = DEFAULT_WFD2_VIDEO_H264_VERTICAL_RESOLUTION;
+ ini->wfd2_video_h264_info.video_horizontal_resolution = DEFAULT_WFD2_VIDEO_H264_HORIZONTAL_RESOLUTION;
+ ini->wfd2_video_h264_info.video_minimum_slicing = DEFAULT_WFD2_VIDEO_H264_MIN_SLICESIZE;
+ ini->wfd2_video_h264_info.video_slice_enc_param = DEFAULT_WFD2_VIDEO_H264_SLICE_ENC_PARAM;
+ ini->wfd2_video_h264_info.video_framerate_control_support = DEFAULT_WFD2_VIDEO_H264_FRAMERATE_CONTROL;
+
+ /* video h265 info */
+ ini->wfd2_video_h265_info.video_cea_support = strtoul(DEFAULT_WFD2_VIDEO_H265_CEA_SUPPORT, NULL, 16);
+ ini->wfd2_video_h265_info.video_vesa_support = strtoul(DEFAULT_WFD2_VIDEO_H265_VESA_SUPPORT, NULL, 16);
+ ini->wfd2_video_h265_info.video_hh_support = strtoul(DEFAULT_WFD2_VIDEO_H265_HH_SUPPORT, NULL, 16);
+ ini->wfd2_video_h265_info.video_profile = DEFAULT_WFD2_VIDEO_H265_PROFILE;
+ ini->wfd2_video_h265_info.video_level = DEFAULT_WFD2_VIDEO_H265_LEVEL;
+ ini->wfd2_video_h265_info.video_latency = DEFAULT_WFD2_VIDEO_H265_LATENCY;
+ ini->wfd2_video_h265_info.video_vertical_resolution = DEFAULT_WFD2_VIDEO_H265_VERTICAL_RESOLUTION;
+ ini->wfd2_video_h265_info.video_horizontal_resolution = DEFAULT_WFD2_VIDEO_H265_HORIZONTAL_RESOLUTION;
+ ini->wfd2_video_h265_info.video_minimum_slicing = DEFAULT_WFD2_VIDEO_H265_MIN_SLICESIZE;
+ ini->wfd2_video_h265_info.video_slice_enc_param = DEFAULT_WFD2_VIDEO_H265_SLICE_ENC_PARAM;
+ ini->wfd2_video_h265_info.video_framerate_control_support = DEFAULT_WFD2_VIDEO_H265_FRAMERATE_CONTROL;
+
/* audio r2 parameter*/
ini->wfd2_audio_codecs.audio_codec = DEFAULT_WFD2_AUDIO_CODECS_CODEC;
ini->wfd2_audio_codecs.audio_lpcm_mode = DEFAULT_WFD2_AUDIO_CODECS_LPCM_MODE;
wfd_sink_debug("name_of_audio_sink : %s", ini->name_of_audio_sink);
wfd_sink_debug("name_of_video_hdcp : %s", ini->name_of_video_hdcp);
wfd_sink_debug("name_of_video_h264_parser : %s", ini->name_of_video_h264_parser);
- wfd_sink_debug("name_of_video_capssetter : %s\n", ini->name_of_video_capssetter);
wfd_sink_debug("name_of_video_h264_decoder : %s", ini->name_of_video_h264_decoder);
wfd_sink_debug("name_of_video_h265_parser : %s", ini->name_of_video_h265_parser);
wfd_sink_debug("name_of_video_h265_decoder : %s", ini->name_of_video_h265_decoder);
/* video r2 parameter*/
wfd_sink_debug("wfd2_video_formats.video_codec : %x\n", ini->wfd2_video_formats.video_codec);
wfd_sink_debug("wfd2_video_formats.video_native_resolution : %x\n", ini->wfd2_video_formats.video_native_resolution);
- wfd_sink_debug("wfd2_video_formats.video_cea_support : %llx\n", ini->wfd2_video_formats.video_cea_support);
- wfd_sink_debug("wfd2_video_formats.video_vesa_support : %llx\n", ini->wfd2_video_formats.video_vesa_support);
- wfd_sink_debug("wfd2_video_formats.video_hh_support : %llx\n", ini->wfd2_video_formats.video_hh_support);
- wfd_sink_debug("wfd2_video_formats.video_profile : %x\n", ini->wfd2_video_formats.video_profile);
- wfd_sink_debug("wfd2_video_formats.video_level : %x\n", ini->wfd2_video_formats.video_level);
- wfd_sink_debug("wfd2_video_formats.video_latency : %d\n", ini->wfd2_video_formats.video_latency);
- wfd_sink_debug("wfd2_video_formats.video_vertical_resolution : %d\n", ini->wfd2_video_formats.video_vertical_resolution);
- wfd_sink_debug("wfd2_video_formats.video_horizontal_resolution : %d\n", ini->wfd2_video_formats.video_horizontal_resolution);
- wfd_sink_debug("wfd2_video_formats.video_minimum_slicing : %d\n", ini->wfd2_video_formats.video_minimum_slicing);
- wfd_sink_debug("wfd2_video_formats.video_slice_enc_param : %d\n", ini->wfd2_video_formats.video_slice_enc_param);
- wfd_sink_debug("wfd2_video_formats.video_framerate_control_support : %d\n", ini->wfd2_video_formats.video_framerate_control_support);
+ wfd_sink_debug("wfd2_video_formats.video_non_transcoding_support : %d\n", ini->wfd2_video_formats.video_non_transcoding_support);
+
+ /* video h264 info*/
+ wfd_sink_debug("wfd2_video_h264_info.video_cea_support : %llx\n", ini->wfd2_video_h264_info.video_cea_support);
+ wfd_sink_debug("wfd2_video_h264_info.video_vesa_support : %llx\n", ini->wfd2_video_h264_info.video_vesa_support);
+ wfd_sink_debug("wfd2_video_h264_info.video_hh_support : %llx\n", ini->wfd2_video_h264_info.video_hh_support);
+ wfd_sink_debug("wfd2_video_h264_info.video_profile : %x\n", ini->wfd2_video_h264_info.video_profile);
+ wfd_sink_debug("wfd2_video_h264_info.video_level : %x\n", ini->wfd2_video_h264_info.video_level);
+ wfd_sink_debug("wfd2_video_h264_info.video_latency : %d\n", ini->wfd2_video_h264_info.video_latency);
+ wfd_sink_debug("wfd2_video_h264_info.video_vertical_resolution : %d\n", ini->wfd2_video_h264_info.video_vertical_resolution);
+ wfd_sink_debug("wfd2_video_h264_info.video_horizontal_resolution : %d\n", ini->wfd2_video_h264_info.video_horizontal_resolution);
+ wfd_sink_debug("wfd2_video_h264_info.video_minimum_slicing : %d\n", ini->wfd2_video_h264_info.video_minimum_slicing);
+ wfd_sink_debug("wfd2_video_h264_info.video_slice_enc_param : %d\n", ini->wfd2_video_h264_info.video_slice_enc_param);
+ wfd_sink_debug("wfd2_video_h264_info.video_framerate_control_support : %d\n", ini->wfd2_video_h264_info.video_framerate_control_support);
+
+ /* video h265 info*/
+ wfd_sink_debug("wfd2_video_h265_info.video_cea_support : %llx\n", ini->wfd2_video_h265_info.video_cea_support);
+ wfd_sink_debug("wfd2_video_h265_info.video_vesa_support : %llx\n", ini->wfd2_video_h265_info.video_vesa_support);
+ wfd_sink_debug("wfd2_video_h265_info.video_hh_support : %llx\n", ini->wfd2_video_h265_info.video_hh_support);
+ wfd_sink_debug("wfd2_video_h265_info.video_profile : %x\n", ini->wfd2_video_h265_info.video_profile);
+ wfd_sink_debug("wfd2_video_h265_info.video_level : %x\n", ini->wfd2_video_h265_info.video_level);
+ wfd_sink_debug("wfd2_video_h265_info.video_latency : %d\n", ini->wfd2_video_h265_info.video_latency);
+ wfd_sink_debug("wfd2_video_h265_info.video_vertical_resolution : %d\n", ini->wfd2_video_h265_info.video_vertical_resolution);
+ wfd_sink_debug("wfd2_video_h265_info.video_horizontal_resolution : %d\n", ini->wfd2_video_h265_info.video_horizontal_resolution);
+ wfd_sink_debug("wfd2_video_h265_info.video_minimum_slicing : %d\n", ini->wfd2_video_h265_info.video_minimum_slicing);
+ wfd_sink_debug("wfd2_video_h265_info.video_slice_enc_param : %d\n", ini->wfd2_video_h265_info.video_slice_enc_param);
+ wfd_sink_debug("wfd2_video_h265_info.video_framerate_control_support : %d\n", ini->wfd2_video_h265_info.video_framerate_control_support);
/* audio r2 parameter*/
wfd_sink_debug("wfd2_audio_codecs.audio_codec : %x\n", ini->wfd2_audio_codecs.audio_codec);
"audio_sampling_frequency", G_TYPE_UINT, wfd_sink->ini.wfd_audio_codecs.audio_sampling_frequency,
NULL);
- if (wfd_audio_codecs)
+ if (wfd_audio_codecs) {
g_object_set(G_OBJECT(wfdsrc), "wfd-audio-codecs", wfd_audio_codecs, NULL);
+ gst_structure_free(wfd_audio_codecs);
+ wfd_audio_codecs = NULL;
+ }
/* set video parameter for Wi-Fi Display session negotiation */
CEA_resolution = wfd_sink->ini.wfd_video_formats.video_cea_support;
"video_framerate_control_support", G_TYPE_INT, wfd_sink->ini.wfd_video_formats.video_framerate_control_support,
NULL);
- if (wfd_video_formats)
+ if (wfd_video_formats) {
g_object_set(G_OBJECT(wfdsrc), "wfd-video-formats", wfd_video_formats, NULL);
+ gst_structure_free(wfd_video_formats);
+ wfd_video_formats = NULL;
+ }
/* set hdcp parameter for Wi-Fi Display session negotiation */
"hdcp_port_no", G_TYPE_INT, hdcp_port,
NULL);
- if (wfd_content_protection)
+ if (wfd_content_protection) {
g_object_set(G_OBJECT(wfdsrc), "wfd-content-protection", wfd_content_protection, NULL);
+ gst_structure_free(wfd_content_protection);
+ wfd_content_protection = NULL;
+ }
}
if (g_object_class_find_property(klass, "wfd2-audio-codecs")) {
"audio_ac3_mode", G_TYPE_UINT, wfd_sink->ini.wfd2_audio_codecs.audio_ac3_mode,
NULL);
- if (wfd2_audio_codecs)
+ if (wfd2_audio_codecs) {
g_object_set(G_OBJECT(wfdsrc), "wfd2-audio-codecs", wfd2_audio_codecs, NULL);
+ gst_structure_free(wfd2_audio_codecs);
+ wfd2_audio_codecs = NULL;
+ }
}
- if (g_object_class_find_property(klass, "wfd2-video-formats")) {
+ if (g_object_class_find_property(klass, "wfd2-video-format-h264")) {
/* set video parameter for Wi-Fi Display R2 session negotiation */
- CEA_resolution = wfd_sink->ini.wfd2_video_formats.video_cea_support;
- VESA_resolution = wfd_sink->ini.wfd2_video_formats.video_vesa_support;
- HH_resolution = wfd_sink->ini.wfd2_video_formats.video_hh_support;
-
- wfd2_video_formats = gst_structure_new("wfd2-video-formats",
- "video_codec", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_codec,
- "video_native_resolution", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_native_resolution,
- "video_cea_support", G_TYPE_UINT64, CEA_resolution,
- "video_vesa_support", G_TYPE_UINT64, VESA_resolution,
- "video_hh_support", G_TYPE_UINT64, HH_resolution,
- "video_profile", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_profile,
- "video_level", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_level,
- "video_latency", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_latency,
- "video_vertical_resolution", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_vertical_resolution,
- "video_horizontal_resolution", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_horizontal_resolution,
- "video_minimum_slicing", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_minimum_slicing,
- "video_slice_enc_param", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_slice_enc_param,
- "video_framerate_control_support", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_framerate_control_support,
- "video_non_transcoding_support", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_non_transcoding_support,
- NULL);
-
- if (wfd2_video_formats)
- g_object_set(G_OBJECT(wfdsrc), "wfd2-video-formats", wfd2_video_formats, NULL);
+ CEA_resolution = wfd_sink->ini.wfd2_video_h264_info.video_cea_support;
+ VESA_resolution = wfd_sink->ini.wfd2_video_h264_info.video_vesa_support;
+ HH_resolution = wfd_sink->ini.wfd2_video_h264_info.video_hh_support;
+
+ if (wfd_sink->ini.wfd2_video_formats.video_codec & WFD_VIDEO_H264) {
+ wfd2_video_formats = gst_structure_new("wfd2-video-format-h264",
+ "video_codec", G_TYPE_UINT, WFD_VIDEO_H264,
+ "video_native_resolution", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_native_resolution,
+ "video_cea_support", G_TYPE_UINT64, CEA_resolution,
+ "video_vesa_support", G_TYPE_UINT64, VESA_resolution,
+ "video_hh_support", G_TYPE_UINT64, HH_resolution,
+ "video_profile", G_TYPE_UINT, wfd_sink->ini.wfd2_video_h264_info.video_profile,
+ "video_level", G_TYPE_UINT, wfd_sink->ini.wfd2_video_h264_info.video_level,
+ "video_latency", G_TYPE_UINT, wfd_sink->ini.wfd2_video_h264_info.video_latency,
+ "video_vertical_resolution", G_TYPE_INT, wfd_sink->ini.wfd2_video_h264_info.video_vertical_resolution,
+ "video_horizontal_resolution", G_TYPE_INT, wfd_sink->ini.wfd2_video_h264_info.video_horizontal_resolution,
+ "video_minimum_slicing", G_TYPE_INT, wfd_sink->ini.wfd2_video_h264_info.video_minimum_slicing,
+ "video_slice_enc_param", G_TYPE_INT, wfd_sink->ini.wfd2_video_h264_info.video_slice_enc_param,
+ "video_framerate_control_support", G_TYPE_INT, wfd_sink->ini.wfd2_video_h264_info.video_framerate_control_support,
+ "video_non_transcoding_support", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_non_transcoding_support,
+ NULL);
+
+ if (wfd2_video_formats) {
+ g_object_set(G_OBJECT(wfdsrc), "wfd2-video-format-h264", wfd2_video_formats, NULL);
+ gst_structure_free(wfd2_video_formats);
+ wfd2_video_formats = NULL;
+ }
+ }
+ }
-}
+ if (g_object_class_find_property(klass, "wfd2-video-format-h265")) {
+ /* set video parameter for Wi-Fi Display R2 session negotiation */
+ CEA_resolution = wfd_sink->ini.wfd2_video_h265_info.video_cea_support;
+ VESA_resolution = wfd_sink->ini.wfd2_video_h265_info.video_vesa_support;
+ HH_resolution = wfd_sink->ini.wfd2_video_h265_info.video_hh_support;
+
+ if (wfd_sink->ini.wfd2_video_formats.video_codec & WFD_VIDEO_H265) {
+ wfd2_video_formats = gst_structure_new("wfd2-video-format-h265",
+ "video_codec", G_TYPE_UINT, WFD_VIDEO_H265,
+ "video_native_resolution", G_TYPE_UINT, wfd_sink->ini.wfd2_video_formats.video_native_resolution,
+ "video_cea_support", G_TYPE_UINT64, CEA_resolution,
+ "video_vesa_support", G_TYPE_UINT64, VESA_resolution,
+ "video_hh_support", G_TYPE_UINT64, HH_resolution,
+ "video_profile", G_TYPE_UINT, wfd_sink->ini.wfd2_video_h265_info.video_profile,
+ "video_level", G_TYPE_UINT, wfd_sink->ini.wfd2_video_h265_info.video_level,
+ "video_latency", G_TYPE_UINT, wfd_sink->ini.wfd2_video_h265_info.video_latency,
+ "video_vertical_resolution", G_TYPE_INT, wfd_sink->ini.wfd2_video_h265_info.video_vertical_resolution,
+ "video_horizontal_resolution", G_TYPE_INT, wfd_sink->ini.wfd2_video_h265_info.video_horizontal_resolution,
+ "video_minimum_slicing", G_TYPE_INT, wfd_sink->ini.wfd2_video_h265_info.video_minimum_slicing,
+ "video_slice_enc_param", G_TYPE_INT, wfd_sink->ini.wfd2_video_h265_info.video_slice_enc_param,
+ "video_framerate_control_support", G_TYPE_INT, wfd_sink->ini.wfd2_video_h265_info.video_framerate_control_support,
+ "video_non_transcoding_support", G_TYPE_INT, wfd_sink->ini.wfd2_video_formats.video_non_transcoding_support,
+ NULL);
+
+ if (wfd2_video_formats) {
+ g_object_set(G_OBJECT(wfdsrc), "wfd2-video-format-h265", wfd2_video_formats, NULL);
+ gst_structure_free(wfd2_video_formats);
+ wfd2_video_formats = NULL;
+ }
+ }
+ }
wfd_sink->update_stream_info_sig_id = g_signal_connect(wfdsrc, "update-media-info",
G_CALLBACK(__mm_wfd_sink_update_stream_info), wfd_sink);
gst_object_unref(GST_OBJECT(a_decodebin[i].gst));
a_decodebin[i].gst = NULL;
} else {
- wfd_sink_debug("unref %s(current ref %d)",
+ wfd_sink_debug("%s has parent.(current ref %d)",
GST_STR_NULL(GST_ELEMENT_NAME(a_decodebin[i].gst)),
((GObject *) a_decodebin[i].gst)->ref_count);
gst_object_unref(GST_OBJECT(parent));
gst_object_unref(GST_OBJECT(a_sinkbin[i].gst));
a_sinkbin[i].gst = NULL;
} else {
- wfd_sink_debug("unref %s(current ref %d)",
+ wfd_sink_debug("%s has parent.(current ref %d)",
GST_STR_NULL(GST_ELEMENT_NAME(a_sinkbin[i].gst)),
((GObject *) a_sinkbin[i].gst)->ref_count);
gst_object_unref(GST_OBJECT(parent));
/* check video codec */
switch (wfd_sink->stream_info.video_stream_info.codec) {
- case MM_WFD_SINK_VIDEO_CODEC_H264:
- if (v_decodebin[WFD_SINK_V_D_H264_PARSE].gst)
- element_bucket = g_list_append(element_bucket, &v_decodebin[WFD_SINK_V_D_H264_PARSE]);
- if (v_decodebin[WFD_SINK_V_D_CAPSSETTER].gst) {
- GstCaps *caps = NULL;
-
- element_bucket = g_list_append(element_bucket, &v_decodebin[WFD_SINK_V_D_CAPSSETTER]);
- caps = gst_caps_new_simple("video/x-h264",
- "width", G_TYPE_INT, wfd_sink->stream_info.video_stream_info.width,
- "height", G_TYPE_INT, wfd_sink->stream_info.video_stream_info.height,
- "framerate", GST_TYPE_FRACTION, wfd_sink->stream_info.video_stream_info.frame_rate, 1, NULL);
- g_object_set(G_OBJECT(v_decodebin[WFD_SINK_V_D_CAPSSETTER].gst), "caps", caps, NULL);
- gst_object_unref(GST_OBJECT(caps));
- }
- if (v_decodebin[WFD_SINK_V_D_H264_DEC].gst)
- element_bucket = g_list_append(element_bucket, &v_decodebin[WFD_SINK_V_D_H264_DEC]);
- break;
+ case MM_WFD_SINK_VIDEO_CODEC_H264:
+ if (v_decodebin[WFD_SINK_V_D_H264_PARSE].gst)
+ element_bucket = g_list_append(element_bucket, &v_decodebin[WFD_SINK_V_D_H264_PARSE]);
+ if (v_decodebin[WFD_SINK_V_D_H264_DEC].gst)
+ element_bucket = g_list_append(element_bucket, &v_decodebin[WFD_SINK_V_D_H264_DEC]);
+ break;
- default:
- wfd_sink_error("video codec is not decied yet. cannot link video decpdebin...");
- return MM_ERROR_WFD_INTERNAL;
- break;
+ default:
+ wfd_sink_error("video codec is not decied yet. cannot link video decpdebin...");
+ return MM_ERROR_WFD_INTERNAL;
+ break;
}
if (element_bucket == NULL) {
gst_object_unref(GST_OBJECT(v_decodebin[i].gst));
v_decodebin[i].gst = NULL;
} else {
- wfd_sink_debug("unref %s(current ref %d)",
+ wfd_sink_debug("%s has parent.(current ref %d)",
GST_STR_NULL(GST_ELEMENT_NAME(v_decodebin[i].gst)),
((GObject *) v_decodebin[i].gst)->ref_count);
gst_object_unref(GST_OBJECT(parent));
MMWFDSINK_PAD_PROBE(wfd_sink, NULL, v_decodebin[WFD_SINK_V_D_H264_PARSE].gst, "sink");
MMWFDSINK_PAD_PROBE(wfd_sink, NULL, v_decodebin[WFD_SINK_V_D_H264_PARSE].gst, "src");
- /* create capssetter */
- MMWFDSINK_CREATE_ELEMENT(v_decodebin, WFD_SINK_V_D_CAPSSETTER, wfd_sink->ini.name_of_video_capssetter, "video_capssetter", FALSE);
- MMWFDSINK_PAD_PROBE(wfd_sink, NULL, v_decodebin[WFD_SINK_V_D_CAPSSETTER].gst, "sink");
- MMWFDSINK_PAD_PROBE(wfd_sink, NULL, v_decodebin[WFD_SINK_V_D_CAPSSETTER].gst, "src");
-
/* create dec */
MMWFDSINK_CREATE_ELEMENT(v_decodebin, WFD_SINK_V_D_H264_DEC, wfd_sink->ini.name_of_video_h264_decoder, "video_h264_dec", FALSE);
MMWFDSINK_PAD_PROBE(wfd_sink, NULL, v_decodebin[WFD_SINK_V_D_H264_DEC].gst, "sink");
gst_object_unref(GST_OBJECT(v_sinkbin[i].gst));
v_sinkbin[i].gst = NULL;
} else {
- wfd_sink_debug("unref %s(current ref %d)",
+ wfd_sink_debug("%s has parent.(current ref %d)",
GST_STR_NULL(GST_ELEMENT_NAME(v_sinkbin[i].gst)),
((GObject *) v_sinkbin[i].gst)->ref_count);
gst_object_unref(GST_OBJECT(parent));
#include <stdio.h>
#include "mm_wfd_sink_util.h"
#include <tzplatform_config.h>
+#include "mm_wfd_sink_enum.h"
#define DUMP_TS_DATA_PATH tzplatform_mkpath(TZ_SYS_VAR, "tmp/")
FILE *f = NULL;
char buf[256] = {0, };
char path[256] = {0, };
- GstElement * parent = NULL;
+ GstElement *parent = NULL;
parent = gst_pad_get_parent_element(pad);
if (parent == NULL) {
if (GST_EVENT_TYPE(event) == GST_EVENT_SEGMENT) {
const GstSegment *segment = NULL;
gst_event_parse_segment(event, &segment);
- if (segment)
+ if (segment) {
wfd_sink_debug("NEWSEGMENT : %" GST_TIME_FORMAT
- " -- %" GST_TIME_FORMAT ", time %" GST_TIME_FORMAT " \n",
- GST_TIME_ARGS(segment->start), GST_TIME_ARGS(segment->stop),
- GST_TIME_ARGS(segment->time));
+ " -- %" GST_TIME_FORMAT ", time %" GST_TIME_FORMAT " \n",
+ GST_TIME_ARGS(segment->start), GST_TIME_ARGS(segment->stop),
+ GST_TIME_ARGS(segment->time));
+
+ wfd_sink_debug("NEWSEGMENT : flags[%d] rate[%d] applied_rate[%d] foramt[%d] base[%lld] offset[%lld] position[%lld] duration[%lld]",
+ segment->flags, segment->rate, segment->applied_rate, segment->format, segment->base, segment->offset, segment->position, segment->duration);
+
+ }
+ } else if (GST_EVENT_TYPE(event) == GST_EVENT_CAPS) {
+ GstCaps *caps;
+ gchar *caps_string = NULL;
+
+ gst_event_parse_caps(event, &caps);
+ caps_string = gst_caps_to_string(caps);
+
+ wfd_sink_debug("caps: %s", caps_string);
+ g_free(caps_string);
}
}
#include "mm_wfd_sink_dlog.h"
#include "mm_wfd_sink_wayland.h"
-#define goto_if_fail(expr,label) \
-{ \
- if (!(expr)) { \
- wfd_sink_error(" failed [%s]\n", #expr); \
- goto label; \
- } \
-}
+#define goto_if_fail(expr, label) \
+ { \
+ if (!(expr)) { \
+ wfd_sink_error(" failed [%s]\n", #expr); \
+ goto label; \
+ } \
+ }
void mm_wfd_sink_handle_resource_id(void *data, struct tizen_resource *tizen_resource, uint32_t id)
{
wfd_sink_debug("[CLIENT] got wl_surface_id(%d) from server\n", id);
}
-static const struct tizen_resource_listener tz_resource_listener =
-{
+static const struct tizen_resource_listener tz_resource_listener = {
mm_wfd_sink_handle_resource_id,
};
static void
mm_wfd_sink_handle_global(void *data, struct wl_registry *registry,
- uint32_t name, const char *interface, uint32_t version)
+ uint32_t name, const char *interface, uint32_t version)
{
- return_if_fail (data != NULL);
+ return_if_fail(data != NULL);
wl_client *wlclient = data;
- if (strcmp(interface, "tizen_surface") == 0)
- {
+ if (strcmp(interface, "tizen_surface") == 0) {
wfd_sink_debug("binding tizen_surface");
wlclient->tz_surface = wl_registry_bind(registry, name, &tizen_surface_interface, version);
- return_if_fail (wlclient->tz_surface != NULL);
+ return_if_fail(wlclient->tz_surface != NULL);
}
}
-static void mm_wfd_sink_handle_global_remove(void* data, struct wl_registry* registry, uint32_t name)
+static void mm_wfd_sink_handle_global_remove(void *data, struct wl_registry *registry, uint32_t name)
{
wfd_sink_debug("wl_registry_handle_global_remove");
}
-static const struct wl_registry_listener registry_listener =
-{
+static const struct wl_registry_listener registry_listener = {
mm_wfd_sink_handle_global,
mm_wfd_sink_handle_global_remove
};
-int mm_wfd_sink_wlclient_create (wl_client ** wlclient)
+int mm_wfd_sink_wlclient_create(wl_client **wlclient)
{
wl_client *ptr = NULL;
- ptr = g_malloc0 (sizeof (wl_client));
+ ptr = g_malloc0(sizeof(wl_client));
if (!ptr) {
- wfd_sink_error ("Cannot allocate memory for wlclient\n");
+ wfd_sink_error("Cannot allocate memory for wlclient\n");
goto ERROR;
} else {
*wlclient = ptr;
- wfd_sink_debug ("Success create wlclient(%p)", *wlclient);
+ wfd_sink_debug("Success create wlclient(%p)", *wlclient);
}
return MM_ERROR_NONE;
}
-int mm_wfd_sink_wlclient_get_wl_window_wl_surface_id (wl_client * wlclient, struct wl_surface *surface, struct wl_display *display)
+int mm_wfd_sink_wlclient_get_wl_window_wl_surface_id(wl_client *wlclient, struct wl_surface *surface, struct wl_display *display)
{
- goto_if_fail (wlclient != NULL, failed);
- goto_if_fail (surface != NULL, failed);
- goto_if_fail (display != NULL, failed);
+ goto_if_fail(wlclient != NULL, failed);
+ goto_if_fail(surface != NULL, failed);
+ goto_if_fail(display != NULL, failed);
unsigned int wl_surface_id = 0;
wlclient->display = display;
- goto_if_fail (wlclient->display != NULL, failed);
+ goto_if_fail(wlclient->display != NULL, failed);
wlclient->registry = wl_display_get_registry(wlclient->display);
- goto_if_fail (wlclient->registry != NULL, failed);
+ goto_if_fail(wlclient->registry != NULL, failed);
wl_registry_add_listener(wlclient->registry, ®istry_listener, wlclient);
wl_display_dispatch(wlclient->display);
wl_display_roundtrip(wlclient->display);
/* check global objects */
- goto_if_fail (wlclient->tz_surface != NULL, failed);
+ goto_if_fail(wlclient->tz_surface != NULL, failed);
/* Get wl_surface_id which is unique in a entire systemw. */
wlclient->tz_resource = tizen_surface_get_tizen_resource(wlclient->tz_surface, surface);
- goto_if_fail (wlclient->tz_resource != NULL, failed);
+ goto_if_fail(wlclient->tz_resource != NULL, failed);
tizen_resource_add_listener(wlclient->tz_resource, &tz_resource_listener, &wl_surface_id);
wl_display_roundtrip(wlclient->display);
- goto_if_fail (wl_surface_id > 0, failed);
+ goto_if_fail(wl_surface_id > 0, failed);
mm_wfd_sink_wlclient_finalize(wlclient);
return wl_surface_id;
failed:
- wfd_sink_error ("Failed to get wl_surface_id");
+ wfd_sink_error("Failed to get wl_surface_id");
return 0;
}
-void mm_wfd_sink_wlclient_finalize (wl_client * wlclient)
+void mm_wfd_sink_wlclient_finalize(wl_client *wlclient)
{
- wfd_sink_debug ("start finalize wlclient");
- return_if_fail (wlclient != NULL)
+ wfd_sink_debug("start finalize wlclient");
+ return_if_fail(wlclient != NULL)
if (wlclient->tz_surface)
tizen_surface_destroy(wlclient->tz_surface);
if (wlclient->tz_resource)
tizen_resource_destroy(wlclient->tz_resource);
- /* destroy registry */
+ /* destroy registry */
if (wlclient->registry)
wl_registry_destroy(wlclient->registry);
return;