gboolean enable_retransmission;
gboolean enable_reset_basetime;
gboolean enable_ts_data_dump;
- gboolean enable_wfdrtspsrc_pad_probe;
+ gboolean enable_wfdsrc_pad_probe;
/* pipeline */
+ gchar name_of_source[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_tsdemux[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_audio_hdcp[WFD_SINK_INI_MAX_STRLEN];
gchar name_of_aac_parser[WFD_SINK_INI_MAX_STRLEN];
#define DEFAULT_ENABLE_WFDRTSPSRC_PAD_PROBE FALSE
/* Pipeline */
+#define DEFAULT_NAME_OF_SOURCE "wfdsrc"
#define DEFAULT_NAME_OF_TSDEMUX ""
#define DEFAULT_NAME_OF_AUDIO_HDCP ""
#define DEFAULT_NAME_OF_AAC_PARSER ""
; enable pad probe\n\
enable pad probe = no\n\
\n\
-; enable wfdrtspsrc inner pad probe\n\
-enable wfdrtspsrc pad probe = no\n\
+; enable wfdsrc inner pad probe\n\
+enable wfdsrc pad probe = no\n\
\n\
; enable ts data dump(/var/tmp/*.ts)\n\
enable ts data dump = no\n\
; allowed timeout for changing pipeline state\n\
state change timeout = 5 ; sec\n\
\n\
-; set debug property to wfdrtspsrc plugin for debugging rtsp message\n\
+; set debug property to wfdsrc plugin for debugging rtsp message\n\
set debug property = yes\n\
\n\
; for asm function enable = yes, disable = no\n\
enable asm = no\n\
\n\
-; 0: default value set by wfdrtspsrc element, other: user define value.\n\
+; 0: default value set by wfdsrc element, other: user define value.\n\
jitter buffer latency=10\n\
\n\
; for retransmission request enable = yes, disable = no\n\
\n\
\n\
[pipeline]\n\
+wfdsrc element = wfdsrc\n\
+\n\
tsdemux element = wfdtsdemux\n\
\n\
aac parser element = aacparse\n\
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);
ini->enable_ts_data_dump = iniparser_getboolean(dict, "general:enable ts data dump", DEFAULT_ENABLE_TS_DATA_DUMP);
- ini->enable_wfdrtspsrc_pad_probe = iniparser_getboolean(dict, "general:enable wfdrtspsrc pad probe", DEFAULT_ENABLE_WFDRTSPSRC_PAD_PROBE);
+ ini->enable_wfdsrc_pad_probe = iniparser_getboolean(dict, "general:enable wfdsrc pad probe", DEFAULT_ENABLE_WFDRTSPSRC_PAD_PROBE);
/* pipeline */
+ MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_source, "pipeline:wfdsrc element", DEFAULT_NAME_OF_SOURCE);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_tsdemux, "pipeline:tsdemux element", DEFAULT_NAME_OF_TSDEMUX);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_audio_hdcp, "pipeline:audio hdcp element", DEFAULT_NAME_OF_AUDIO_HDCP);
MM_WFD_SINK_INI_GET_STRING(dict, ini->name_of_aac_parser, "pipeline:aac parser element", DEFAULT_NAME_OF_AAC_PARSER);
ini->video_sink_max_lateness = DEFAULT_VIDEO_SINK_MAX_LATENESS;
ini->sink_ts_offset = DEFAULT_SINK_TS_OFFSET;
ini->enable_ts_data_dump = DEFAULT_ENABLE_TS_DATA_DUMP;
- ini->enable_wfdrtspsrc_pad_probe = DEFAULT_ENABLE_WFDRTSPSRC_PAD_PROBE;
+ ini->enable_wfdsrc_pad_probe = DEFAULT_ENABLE_WFDRTSPSRC_PAD_PROBE;
/* pipeline */
+ strncpy(ini->name_of_source, DEFAULT_NAME_OF_TSDEMUX, 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);
wfd_sink_debug("audio_sink_async : %d\n", ini->audio_sink_async);
wfd_sink_debug("video_sink_async : %d\n", ini->video_sink_async);
wfd_sink_debug("enable_ts_data_dump : %d\n", ini->enable_ts_data_dump);
- wfd_sink_debug("enable_wfdrtspsrc_pad_probe : %d\n", ini->enable_wfdrtspsrc_pad_probe);
+ wfd_sink_debug("enable_wfdsrc_pad_probe : %d\n", ini->enable_wfdsrc_pad_probe);
/* pipeline */
+ wfd_sink_debug("name_of_source : %s\n", ini->name_of_source);
wfd_sink_debug("name_of_tsdemux : %s\n", ini->name_of_tsdemux);
wfd_sink_debug("name_of_audio_hdcp : %s\n", ini->name_of_audio_hdcp);
wfd_sink_debug("name_of_aac_parser : %s\n", ini->name_of_aac_parser);
wfd_sink_debug("try to connect to %s.....", GST_STR_NULL(uri));
- /* set uri to wfdrtspsrc */
+ /* set uri to wfdsrc */
g_object_set(G_OBJECT(wfd_sink->pipeline->mainbin[WFD_SINK_M_SRC].gst), "location", uri, NULL);
/* set pipeline PAUSED state */
}
static void
-__mm_wfd_sink_change_av_format(GstElement *wfdrtspsrc, gpointer *need_to_flush, gpointer data)
+__mm_wfd_sink_change_av_format(GstElement *wfdsrc, gpointer *need_to_flush, gpointer data)
{
mm_wfd_sink_t *wfd_sink = (mm_wfd_sink_t *)data;
static void
-__mm_wfd_sink_update_stream_info(GstElement *wfdrtspsrc, GstStructure *str, gpointer data)
+__mm_wfd_sink_update_stream_info(GstElement *wfdsrc, GstStructure *str, gpointer data)
{
mm_wfd_sink_t *wfd_sink = (mm_wfd_sink_t *)data;
MMWFDSinkStreamInfo *stream_info = NULL;
wfd_sink_debug_fleave();
}
-static int __mm_wfd_sink_prepare_wfdrtspsrc(mm_wfd_sink_t *wfd_sink, GstElement *wfdrtspsrc)
+static int __mm_wfd_sink_prepare_source(mm_wfd_sink_t *wfd_sink, GstElement *wfdsrc)
{
GstStructure *audio_param = NULL;
GstStructure *video_param = NULL;
guint CEA_resolution = 0;
guint VESA_resolution = 0;
guint HH_resolution = 0;
+ GObjectClass *klass;
wfd_sink_debug_fenter();
wfd_sink_return_val_if_fail(wfd_sink, MM_ERROR_WFD_NOT_INITIALIZED);
wfd_sink_return_val_if_fail(wfd_sink->attrs, MM_ERROR_WFD_NOT_INITIALIZED);
- wfd_sink_return_val_if_fail(wfdrtspsrc, MM_ERROR_WFD_NOT_INITIALIZED);
+ wfd_sink_return_val_if_fail(wfdsrc, MM_ERROR_WFD_NOT_INITIALIZED);
- g_object_set(G_OBJECT(wfdrtspsrc), "debug", wfd_sink->ini.set_debug_property, NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "latency", wfd_sink->ini.jitter_buffer_latency, NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "do-request", wfd_sink->ini.enable_retransmission, NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "enable-pad-probe", wfd_sink->ini.enable_wfdrtspsrc_pad_probe, NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "udp-buffer-size", 2097152, NULL);
+ 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.enable_wfdsrc_pad_probe, 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, "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);
audio_param = gst_structure_new("audio_param",
"audio_codec", G_TYPE_UINT, wfd_sink->ini.audio_codec,
"hdcp_port_no", G_TYPE_INT, hdcp_port,
NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "audio-param", audio_param, NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "video-param", video_param, NULL);
- g_object_set(G_OBJECT(wfdrtspsrc), "hdcp-param", hdcp_param, NULL);
+ g_object_set(G_OBJECT(wfdsrc), "audio-param", audio_param, NULL);
+ g_object_set(G_OBJECT(wfdsrc), "video-param", video_param, NULL);
+ g_object_set(G_OBJECT(wfdsrc), "hdcp-param", hdcp_param, NULL);
- g_signal_connect(wfdrtspsrc, "update-media-info",
+ g_signal_connect(wfdsrc, "update-media-info",
G_CALLBACK(__mm_wfd_sink_update_stream_info), wfd_sink);
- g_signal_connect(wfdrtspsrc, "change-av-format",
+ g_signal_connect(wfdsrc, "change-av-format",
G_CALLBACK(__mm_wfd_sink_change_av_format), wfd_sink);
wfd_sink_debug_fleave();
goto CREATE_ERROR;
}
- /* create wfdrtspsrc */
- MMWFDSINK_CREATE_ELEMENT(mainbin, WFD_SINK_M_SRC, "wfdrtspsrc", "wfdsink_source", TRUE);
+ /* create wfdsrc */
+ MMWFDSINK_CREATE_ELEMENT(mainbin, WFD_SINK_M_SRC, wfd_sink->ini.name_of_source, "wfdsink_source", TRUE);
MMWFDSINK_PAD_PROBE(wfd_sink, NULL, mainbin[WFD_SINK_M_SRC].gst, "src");
if (mainbin[WFD_SINK_M_SRC].gst) {
- if (MM_ERROR_NONE != __mm_wfd_sink_prepare_wfdrtspsrc(wfd_sink, mainbin[WFD_SINK_M_SRC].gst)) {
- wfd_sink_error("failed to prepare wfdrtspsrc...");
+ if (MM_ERROR_NONE != __mm_wfd_sink_prepare_source(wfd_sink, mainbin[WFD_SINK_M_SRC].gst)) {
+ wfd_sink_error("failed to prepare wfdsrc...");
goto CREATE_ERROR;
}
}