Property name change and add 02/79602/1
authorSeokHoon Lee <andy.shlee@samsung.com>
Tue, 12 Jul 2016 04:03:44 +0000 (13:03 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Tue, 12 Jul 2016 04:05:17 +0000 (13:05 +0900)
    set_debug_property -> dump_rtsp_message
    add trace_first_buffer
    add dump_rtp_data
    add user_agent

Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I3c169f3768c29570c8cd14f19f4f03fca3477cb7

config/mmfw_wfd_sink.ini
packaging/libmm-wfd.spec
src/include/mm_wfd_sink_ini.h
src/mm_wfd_sink_ini.c
src/mm_wfd_sink_priv.c

index 6488e89786e3db2acb1fd8f47765f33fcf228dbe..5e99eda3a5b30b0bf5c6bfb2fa0dee8bbc8084e5 100644 (file)
@@ -10,9 +10,6 @@ gstparam5 =
 ; allowed timeout for changing pipeline state
 state change timeout = 5; sec
 
-; set debug property to wfdrtspsrc plugin for debugging rtsp message
-set debug property = yes
-
 ; for rm function enable = yes, disable = no
 enable rm = no
 
@@ -37,6 +34,8 @@ audio sink async=no
 ; if no, go asynchronously to PAUSED without preroll
 video sink async=no
 
+; user agent
+user agent =
 
 
 [debug]
@@ -44,20 +43,32 @@ video sink async=no
 ; do export GST_DEBUG_DUMP_DOT_DIR=/tmp/ in the shell
 generate dot = no
 
+; set property to wfdsrc plugin for dumping rtsp message
+dump rtsp message = yes
+
 ; enable tracing buffers using pad probe
 trace buffers = no
 
+; enable tracing first buffer
+trace first buffer = no
+
 ; enable tracing buffers of wfdsrc
 trace buffers of wfdsrc = no
 
 ; enable dumping ts data (eg. /var/tmp/*.ts)
 dump ts data = no
 
+; enable dumping rtp data (eg. /var/tmp/screenmirroring_sink_rtp.dump)
+dump rtp data = no
+
+
 [pipeline]
 wfdsrc element = wfdsrc
 
 tsdemux element = wfdtsdemux
 
+audio hdcp element =
+
 aac parser element = aacparse
 
 aac decoder element = avdec_aac
@@ -76,6 +87,8 @@ audio volume element =
 
 audio sink element = pulsesink
 
+video hdcp element =
+
 video h264 parser element = h264parse
 
 video capssetter element = capssetter
index dc53e09fbe10217333f43503818446944c38d2a7..7b672c541e74827b30fc7aabb00d13e72c276693 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-wfd
 Summary:    Multimedia Framework Wifi-Display Library
-Version:    0.2.198
+Version:    0.2.199
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 9f0e8adabd73a79dbed0948530d4bef5c0b19bdd..c6438cf83b7a2aacae943f0028b08fad75520df5 100644 (file)
@@ -61,7 +61,6 @@ typedef struct __mm_wfd_sink_ini {
        /* general */
        gchar gst_param[5][WFD_SINK_INI_MAX_STRLEN];
        gint state_change_timeout;
-       gboolean set_debug_property;
        gboolean enable_rm;
        gint jitter_buffer_latency;
        gint video_sink_max_lateness;
@@ -70,12 +69,16 @@ typedef struct __mm_wfd_sink_ini {
        gboolean video_sink_async;
        gboolean enable_retransmission;
        gboolean enable_reset_basetime;
+       gchar user_agent[WFD_SINK_INI_MAX_STRLEN];
 
        /* debug */
        gboolean generate_dot;
+       gboolean dump_rtsp_message;
        gboolean trace_buffers;
+       gboolean trace_first_buffer;
        gboolean trace_buffers_of_wfdsrc;
        gboolean dump_ts_data;
+       gboolean dump_rtp_data;
 
        /* pipeline */
        gchar name_of_source[WFD_SINK_INI_MAX_STRLEN];
@@ -126,7 +129,6 @@ typedef struct __mm_wfd_sink_ini {
 /* General*/
 #define DEFAULT_GST_PARAM      ""
 #define DEFAULT_STATE_CHANGE_TIMEOUT 5 /* sec */
-#define DEFAULT_SET_DEBUG_PROPERTY     TRUE
 #define DEFAULT_JITTER_BUFFER_LATENCY 10 /* msec */
 #define DEFAULT_ENABLE_RETRANSMISSION  FALSE
 #define DEFAULT_ENABLE_RESET_BASETIME  TRUE
@@ -230,6 +232,10 @@ audio sink async=no\n\
 ; if no, go asynchronously to PAUSED without preroll \n\
 video sink async=no\n\
 \n\
+; user agent that will be sent from DTV\n\
+user agent = TIZEN3_0/WFD-SINK\n\
+\n\
+\n\
 \n\
 \n\
 [pipeline]\n\
@@ -237,6 +243,8 @@ wfdsrc element = wfdsrc\n\
 \n\
 tsdemux element = wfdtsdemux\n\
 \n\
+audio hdcp element = \n\
+\n\
 aac parser element = aacparse\n\
 \n\
 aac decoder element = avdec_aac\n\
@@ -255,6 +263,8 @@ audio volume element =\n\
 \n\
 audio sink element = pulsesink\n\
 \n\
+video hdcp element =\n\
+\n\
 video h264 parser element = h264parse\n\
 \n\
 video capssetter element = capssetter\n\
index 2afa8d0d6c1be9eff800cf86e45d8563358ff54c..7804a10b6289ea89908d6200db4745683ad6b798 100644 (file)
 /*Default sink ini values*/
 /* General*/
 #define DEFAULT_ENABLE_RM      TRUE
+#define DEFAULT_USER_AGENT "TIZEN3_0/WFD-SINK"
 
 /* Debug */
 #define DEFAULT_GENERATE_DOT   FALSE
+#define DEFAULT_DUMP_RTSP_MESSAGE      TRUE
 #define DEFAULT_TRACE_BUFFERS  FALSE
+#define DEFAULT_TRACE_FIRST_BUFFER   TRUE
 #define DEFAULT_TRACE_BUFFERS_OF_WFDSRC        FALSE
 #define DEFAULT_DUMP_TS_DATA           FALSE
+#define DEFAULT_DUMP_RTP_DATA FALSE
 
 /* Pipeline */
 #define DEFAULT_NAME_OF_VIDEO_H264_PARSER ""
@@ -150,7 +154,6 @@ mm_wfd_sink_ini_load(mm_wfd_sink_ini_t *ini, const char *path)
                MM_WFD_SINK_INI_GET_STRING(dict, ini->gst_param[3], "general:gstparam4", DEFAULT_GST_PARAM);
                MM_WFD_SINK_INI_GET_STRING(dict, ini->gst_param[4], "general:gstparam5", DEFAULT_GST_PARAM);
                ini->state_change_timeout = iniparser_getint(dict, "general:state change timeout", DEFAULT_STATE_CHANGE_TIMEOUT);
-               ini->set_debug_property = iniparser_getboolean(dict, "general:set debug property", DEFAULT_SET_DEBUG_PROPERTY);
                ini->enable_rm = iniparser_getboolean(dict, "general:enable rm", DEFAULT_ENABLE_RM);
                ini->jitter_buffer_latency = iniparser_getint(dict, "general:jitter buffer latency", DEFAULT_JITTER_BUFFER_LATENCY);
                ini->enable_retransmission = iniparser_getboolean(dict, "general:enable retransmission", DEFAULT_ENABLE_RETRANSMISSION);
@@ -159,12 +162,16 @@ mm_wfd_sink_ini_load(mm_wfd_sink_ini_t *ini, const char *path)
                ini->sink_ts_offset = iniparser_getint(dict, "general:sink ts offset", DEFAULT_SINK_TS_OFFSET);
                ini->audio_sink_async = iniparser_getboolean(dict, "general:audio sink async", DEFAULT_AUDIO_SINK_ASYNC);
                ini->video_sink_async = iniparser_getboolean(dict, "general:video sink async", DEFAULT_VIDEO_SINK_ASYNC);
+               MM_WFD_SINK_INI_GET_STRING(dict, ini->user_agent, "general:user agent", DEFAULT_USER_AGENT);
 
                /* debug */
                ini->generate_dot = iniparser_getboolean(dict, "debug:generate dot", DEFAULT_GENERATE_DOT);
+               ini->dump_rtsp_message = iniparser_getboolean(dict, "debug:dump rtsp message", DEFAULT_DUMP_RTSP_MESSAGE);
                ini->trace_buffers = iniparser_getboolean(dict, "debug:trace buffers", DEFAULT_TRACE_BUFFERS);
+               ini->trace_first_buffer = iniparser_getboolean(dict, "debug:trace first buffer", DEFAULT_TRACE_FIRST_BUFFER);
                ini->trace_buffers_of_wfdsrc = iniparser_getboolean(dict, "debug:trace buffers of wfdsrc", DEFAULT_TRACE_BUFFERS_OF_WFDSRC);
                ini->dump_ts_data = iniparser_getboolean(dict, "debug:dump ts data", DEFAULT_DUMP_TS_DATA);
+               ini->dump_rtp_data = iniparser_getboolean(dict, "debug:dump rtp data", DEFAULT_DUMP_RTP_DATA);
 
                /* pipeline */
                MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_source, "pipeline:wfdsrc element", DEFAULT_NAME_OF_SOURCE);
@@ -223,22 +230,25 @@ mm_wfd_sink_ini_load(mm_wfd_sink_ini_t *ini, const char *path)
                strncpy(ini->gst_param[3], DEFAULT_GST_PARAM, WFD_SINK_INI_MAX_STRLEN - 1);
                strncpy(ini->gst_param[4], DEFAULT_GST_PARAM, WFD_SINK_INI_MAX_STRLEN - 1);
                ini->state_change_timeout = DEFAULT_STATE_CHANGE_TIMEOUT;
-               ini->set_debug_property =  DEFAULT_SET_DEBUG_PROPERTY;
                ini->enable_rm =  DEFAULT_ENABLE_RM;
                ini->jitter_buffer_latency = DEFAULT_JITTER_BUFFER_LATENCY;
                ini->enable_retransmission =  DEFAULT_ENABLE_RETRANSMISSION;
                ini->enable_reset_basetime =  DEFAULT_ENABLE_RESET_BASETIME;
                ini->video_sink_max_lateness = DEFAULT_VIDEO_SINK_MAX_LATENESS;
                ini->sink_ts_offset = DEFAULT_SINK_TS_OFFSET;
+               strncpy(ini->user_agent, DEFAULT_USER_AGENT, WFD_SINK_INI_MAX_STRLEN - 1);
 
                /* debug */
                ini->generate_dot =  DEFAULT_GENERATE_DOT;
+               ini->dump_rtsp_message =  DEFAULT_DUMP_RTSP_MESSAGE;
                ini->trace_buffers = DEFAULT_TRACE_BUFFERS;
+               ini->trace_first_buffer = DEFAULT_TRACE_FIRST_BUFFER;
                ini->trace_buffers_of_wfdsrc = DEFAULT_TRACE_BUFFERS_OF_WFDSRC;
                ini->dump_ts_data = DEFAULT_DUMP_TS_DATA;
+               ini->dump_rtp_data = DEFAULT_DUMP_RTP_DATA;
 
                /* pipeline */
-               strncpy(ini->name_of_source, DEFAULT_NAME_OF_TSDEMUX, WFD_SINK_INI_MAX_STRLEN - 1);
+               strncpy(ini->name_of_source, DEFAULT_NAME_OF_SOURCE, WFD_SINK_INI_MAX_STRLEN - 1);
                strncpy(ini->name_of_tsdemux, DEFAULT_NAME_OF_TSDEMUX, WFD_SINK_INI_MAX_STRLEN - 1);
                strncpy(ini->name_of_audio_hdcp, DEFAULT_NAME_OF_AUDIO_HDCP, WFD_SINK_INI_MAX_STRLEN - 1);
                strncpy(ini->name_of_aac_parser, DEFAULT_NAME_OF_AAC_PARSER, WFD_SINK_INI_MAX_STRLEN - 1);
@@ -307,9 +317,10 @@ mm_wfd_sink_ini_load(mm_wfd_sink_ini_t *ini, const char *path)
                wfd_sink_debug("generate_dot is TRUE, dot file will be stored into /tmp/");
                g_setenv("GST_DEBUG_DUMP_DOT_DIR", "/tmp/", FALSE);
        }
+       wfd_sink_debug("dump_rtsp_message : %d", ini->dump_rtsp_message);
        wfd_sink_debug("trace_buffers : %d", ini->trace_buffers);
+       wfd_sink_debug("trace_first_buffer : %d", ini->trace_first_buffer);
        wfd_sink_debug("state_change_timeout(sec) : %d\n", ini->state_change_timeout);
-       wfd_sink_debug("set_debug_property : %d\n", ini->set_debug_property);
        wfd_sink_debug("jitter_buffer_latency(msec) : %d\n", ini->jitter_buffer_latency);
        wfd_sink_debug("enable_retransmission : %d\n", ini->enable_retransmission);
        wfd_sink_debug("enable_reset_basetime : %d\n", ini->enable_reset_basetime);
@@ -319,6 +330,8 @@ mm_wfd_sink_ini_load(mm_wfd_sink_ini_t *ini, const char *path)
        wfd_sink_debug("video_sink_async : %d\n", ini->video_sink_async);
        wfd_sink_debug("trace_buffers_of_wfdsrc : %d", ini->trace_buffers_of_wfdsrc);
        wfd_sink_debug("dump_ts_data : %d", ini->dump_ts_data);
+       wfd_sink_debug("dump_rtp_data : %d", ini->dump_rtp_data);
+
 
        /* pipeline */
        wfd_sink_debug("name_of_source : %s", ini->name_of_source);
index 1b7b81897bf55557a3e5b3ab1cf61671edcaf7b4..6ad2e2871eab1ea02ce1ea0c2f24c0130a2d8d27 100644 (file)
@@ -1858,16 +1858,24 @@ static int __mm_wfd_sink_prepare_source(mm_wfd_sink_t *wfd_sink, GstElement *wfd
 
        klass = G_OBJECT_GET_CLASS(G_OBJECT(wfdsrc));
 
-       g_object_set(G_OBJECT(wfdsrc), "debug", wfd_sink->ini.set_debug_property, NULL);
-       g_object_set(G_OBJECT(wfdsrc), "enable-pad-probe", wfd_sink->ini.trace_buffers_of_wfdsrc, NULL);
-       if (g_object_class_find_property(klass, "udp-buffer-size"))
-               g_object_set(G_OBJECT(wfdsrc), "udp-buffer-size", 2097152, NULL);
+       if (g_object_class_find_property(klass, "enable-pad-probe")) /* for common wfdsrc */
+               g_object_set(G_OBJECT(wfdsrc), "enable-pad-probe", wfd_sink->ini.trace_buffers_of_wfdsrc, NULL);
+       g_object_set(G_OBJECT(wfdsrc), "udp-buffer-size", 2097152, NULL);
+       g_object_set(G_OBJECT(wfdsrc), "latency", wfd_sink->ini.jitter_buffer_latency, NULL);
+       if (g_object_class_find_property(klass, "user-agent"))
+               g_object_set(G_OBJECT(wfdsrc), "user-agent", wfd_sink->ini.user_agent, NULL);
+       if (g_object_class_find_property(klass, "debug")) /* for common wfdsrc */
+               g_object_set(G_OBJECT(wfdsrc), "debug", wfd_sink->ini.dump_rtsp_message, NULL);
+       if (g_object_class_find_property(klass, "dump-rtsp-message"))
+               g_object_set(G_OBJECT(wfdsrc), "dump-rtsp-message", wfd_sink->ini.dump_rtsp_message, 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"))
+               g_object_set(G_OBJECT(wfdsrc), "trace-first-buffer", wfd_sink->ini.trace_first_buffer, NULL);
        if (g_object_class_find_property(klass, "trace-buffers"))
                g_object_set(G_OBJECT(wfdsrc), "trace-buffers", wfd_sink->ini.trace_buffers, NULL);
        if (g_object_class_find_property(klass, "do-request"))
                g_object_set(G_OBJECT(wfdsrc), "do-request", wfd_sink->ini.enable_retransmission, NULL);
-       if (g_object_class_find_property(klass, "latency"))
-               g_object_set(G_OBJECT(wfdsrc), "latency", wfd_sink->ini.jitter_buffer_latency, NULL);
 
        /* set audio parameter for Wi-Fi Display session negotiation */
        wfd_audio_codecs = gst_structure_new("wfd_audio_codecs",
@@ -1878,12 +1886,13 @@ static int __mm_wfd_sink_prepare_source(mm_wfd_sink_t *wfd_sink, GstElement *wfd
                                        NULL);
 
        if (wfd_audio_codecs) {
-               if (g_object_class_find_property(klass, "audio-param"))
+               if (g_object_class_find_property(klass, "audio-param")) /* for common wfdsrc */
                        g_object_set(G_OBJECT(wfdsrc), "audio-param", wfd_audio_codecs, NULL);
                if (g_object_class_find_property(klass, "wfd-audio-codecs"))
                        g_object_set(G_OBJECT(wfdsrc), "wfd-audio-codecs", wfd_audio_codecs, NULL);
        }
 
+       /* set video parameter for Wi-Fi Display session negotiation */
        CEA_resolution = wfd_sink->ini.video_cea_support;
        VESA_resolution = wfd_sink->ini.video_vesa_support;
        HH_resolution =  wfd_sink->ini.video_hh_support;
@@ -1920,7 +1929,7 @@ static int __mm_wfd_sink_prepare_source(mm_wfd_sink_t *wfd_sink, GstElement *wfd
                                                        NULL);
 
                if (wfd_content_protection) {
-                       if (g_object_class_find_property(klass, "hdcp-param"))
+                       if (g_object_class_find_property(klass, "hdcp-param")) /* for common wfdsrc */
                                g_object_set(G_OBJECT(wfdsrc), "hdcp-param", wfd_content_protection, NULL);
                        if (g_object_class_find_property(klass, "wfd-content-protection"))
                                g_object_set(G_OBJECT(wfdsrc), "wfd-content-protection", wfd_content_protection, NULL);