1. Add 'coupled-sink-ip' in ini file.
2. Add 'coupled_sink_ip' attribute in 'scmirroring_sink_t' structure.
- This is for setting coupled sink ip address.
Change-Id: I05cec741cba6ff6580e3afff4ee105c48e42c39c
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
*/
int mm_wfd_sink_get_current_state(MMHandleType wfd_sink_handle, gint *state);
+int mm_wfd_sink_set_coupled_ip(MMHandleType wfd_sink_handle, char* coupled_ip);
+
#endif
/* hdcp parameter for reponse of M3 request */
WFDHDCPContentProtection wfd_content_protection;
+ /* coupled sink ip address for reponse of R2 M3 request */
+ gchar wfd_coupled_sink_ip[WFD_SINK_INI_MAX_STRLEN];
+
/* audio parameter for reponse of R2 M3 request */
WFD2AudioCodecs wfd2_audio_codecs;
MMHandleType extend_handle;
guint msg_callback_id;
+ gchar *coupled_sink_ip;
} mm_wfd_sink_t;
return result;
}
+
+int mm_wfd_sink_set_coupled_ip(MMHandleType wfd_sink_handle, char* coupled_ip)
+{
+ mm_wfd_sink_t *wfd_sink = (mm_wfd_sink_t *)wfd_sink_handle;
+ int result = MM_ERROR_NONE;
+ wfd_sink_debug_fenter();
+
+ wfd_sink_return_val_if_fail(wfd_sink, MM_ERROR_WFD_NOT_INITIALIZED);
+ wfd_sink_return_val_if_fail(coupled_ip, MM_ERROR_WFD_INVALID_ARGUMENT);
+ //wfd_sink_error("coupled_sink_ip as parameter is [%s]", coupled_ip);
+
+ MMWFDSINK_CMD_LOCK(wfd_sink);
+
+ //when i free this variable.
+ wfd_sink->coupled_sink_ip = (char *) g_malloc0(sizeof(char) * (WFD_SINK_INI_MAX_STRLEN - 1));
+ strncpy(wfd_sink->coupled_sink_ip, coupled_ip, WFD_SINK_INI_MAX_STRLEN-1);
+ wfd_sink_error("coupled_sink_ip in sink_t is [%s]", wfd_sink->coupled_sink_ip);
+ MMWFDSINK_CMD_UNLOCK(wfd_sink);
+
+ wfd_sink_debug_fleave();
+
+ return result;
+}
#define DEFAULT_USER_AGENT ""
/* Debug */
-#define DEFAULT_GENERATE_DOT FALSE
+#define DEFAULT_GENERATE_DOT TRUE
#define DEFAULT_DUMP_RTSP_MESSAGE TRUE
#define DEFAULT_TRACE_BUFFERS FALSE
#define DEFAULT_TRACE_FIRST_BUFFER FALSE
#define DEFAULT_WFD_HDCP_CONTENT_PROTECTION 0x0
#define DEFAULT_WFD_HDCP_PORT_NO 0
+/* COUPLED SINK */
+#define DEFAULT_WFD_COUPLED_SINK "0.0.0.0"
static gboolean loaded = FALSE;
ini->wfd_content_protection.hdcp_content_protection = iniparser_getint(dict, "wfd hdcp content protection:hdcp content protection", DEFAULT_WFD_HDCP_CONTENT_PROTECTION);
ini->wfd_content_protection.hdcp_port_no = iniparser_getint(dict, "wfd hdcp content protection:hdcp port no", DEFAULT_WFD_HDCP_PORT_NO);
+ /* coupled sink address */
+ MM_WFD_SINK_INI_GET_STRING(dict, ini->wfd_coupled_sink_ip, "wfd coupled sink:coupled sink ip", DEFAULT_WFD_COUPLED_SINK);
+
/* 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->wfd_content_protection.hdcp_content_protection = DEFAULT_WFD_HDCP_CONTENT_PROTECTION;
ini->wfd_content_protection.hdcp_port_no = DEFAULT_WFD_HDCP_PORT_NO;
+ /* coupled sink address */
+ strncpy(ini->wfd_coupled_sink_ip, DEFAULT_WFD_COUPLED_SINK,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;
wfd_sink_debug("wfd_content_protection.hdcp_content_protection : %x", ini->wfd_content_protection.hdcp_content_protection);
wfd_sink_debug("wfd_content_protection.hdcp_port_no : %d", ini->wfd_content_protection.hdcp_port_no);
+ /* coupled sink address */
+ wfd_sink_debug("wfd_coupled_sink_ip : %s", ini->wfd_coupled_sink_ip);
+
/* 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);
g_object_set(G_OBJECT(wfdsrc), "latency", wfd_sink->ini.jitter_buffer_latency, NULL);
g_object_set(G_OBJECT(wfdsrc), "user-agent", wfd_sink->ini.user_agent, NULL);
g_object_set(G_OBJECT(wfdsrc), "dump-rtsp-message", wfd_sink->ini.dump_rtsp_message, NULL);
+ g_object_set(G_OBJECT(wfdsrc), "coupled-sink-ip", wfd_sink->ini.wfd_coupled_sink_ip, NULL);
if (g_object_class_find_property(klass, "dump-rtp-data"))
g_object_set(G_OBJECT(wfdsrc), "dump-rtp-data", wfd_sink->ini.dump_rtp_data, NULL);
if (g_object_class_find_property(klass, "trace-first-buffer"))