From b7eaadad841d9d794d734728d04da854ff8f4189 Mon Sep 17 00:00:00 2001 From: SeokHoon Lee Date: Mon, 31 Oct 2016 15:39:19 +0900 Subject: [PATCH] Add WFD_SINK_M_QUEUE/WFD_SINK_M_D_VALVE Add define USE_EXTERNAL_WL_DISPLAY_HANDLE for TV profile. Remove mmfw_wfd_sink.ini (move to mmfw_sysconf package) [Version] 0.2.212 [Profile] Common [Issue Type] Add feature [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-mobile_20161027.1] Signed-off-by: SeokHoon Lee Change-Id: I6dbe338356f85849bfbf3d56ba5673c5eea8948b --- config/mmfw_wfd_sink.ini | 235 ----------------------------------------- packaging/libmm-wfd.spec | 9 +- src/include/mm_wfd_sink_priv.h | 2 + src/mm_wfd_sink_priv.c | 17 +++ 4 files changed, 23 insertions(+), 240 deletions(-) delete mode 100644 config/mmfw_wfd_sink.ini diff --git a/config/mmfw_wfd_sink.ini b/config/mmfw_wfd_sink.ini deleted file mode 100644 index 7bf50b2..0000000 --- a/config/mmfw_wfd_sink.ini +++ /dev/null @@ -1,235 +0,0 @@ -[general] -; parameters for initializing gstreamer -; DEFAULT SET (--gst-debug=2,*wfd*:5) -gstparam1 = --gst-debug=2,*wfd*:5,*wfdtsdemux:1,*wfdrtpbuffer:1 -gstparam2 = -gstparam3 = -gstparam4 = -gstparam5 = - -; allowed timeout for changing pipeline state -state change timeout = 5; sec - -; for rm function enable = yes, disable = no -enable rm = no - -; 0: default value set by wfdrtspsrc element, other: user define value. -jitter buffer latency=10 - -; for retransmission request enable = yes, disable = no -enable retransmission = no - -; for reset basetime, enable = yes, disable = no -enable reset basetime = yes - -; Maximum number of nanoseconds that a buffer can be late before it is dropped by videosink (-1 unlimited) -video sink max lateness=20000000 - -; nanoseconds to be added to buffertimestamp by sink elements -sink ts offset=250000000 - -; if no, go asynchronously to PAUSED without preroll -audio sink async=no - -; if no, go asynchronously to PAUSED without preroll -video sink async=no - -; user agent -user agent = - - -[debug] -; generating dot file representing pipeline state -; 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 - -ac3 parser element = ac3parse - -ac3 decoder element = - -lpcm converter element = - -lpcm filter element = capsfilter - -audio resampler element = audioconvert - -audio volume element = - -audio sinkbin queue element = ;queue - -audio sink element = pulsesink - -video hdcp element = - -video h264 parser element = h264parse - -video h265 parser element = - -video h264 decoder element = avdec_h264 - -video h265 decoder element = - -video converter element = - -video filter element = - -video sink element = waylandsink - -video evas sink element = evaspixmapsink - - -[wfd audio codecs] -; 0x1: LPCM, 0x2: AAC, 0x4: AC3 -;default aac and LPCM -audio codec=0x3 - -audio latency=0x0 - -;0x1 : 48000khz, 0x2: 44100khz -audio sampling frequency=0x3 - -; 0x1:2 channels, 0x2:4 channels, 0x4:6channels, 0x8:8channels -audio channels=0x1 - - -[wfd video formats] -; 0x0:not support, 0x1:H264 -video codec=0x1 - -; 0x0:not supoort, 0x1: CHP, 0x2:CBP -video profile=0x1 - -video native resolution = 0x20 - -video cea support=0x84ab;0x194ab - -video vesa support=0x1;0x5555555 - -video hh support=0x555 - -; 0x1:base, 0x2:high -video profile=0x1 - -; 0x1:level_3_1, 0x2:level_3_2, 0x4:level_4, 0x8:level_4_1, 0x10:level_4_2 -video level=0x2 - -video latency=0x0 - -video vertical resolution=720 - -video horizontal resolution=1280 - -video minimum slicesize=0 - -video slice encoding params=200 - -video framerate control support=11 - - -[wfd hdcp content protection] -enable hdcp = no - -;0x0:none, 0x1:HDCP_2.0, 0x2:HDCP_2.1 -hdcp content protection=0x0 - -hdcp port no=0 - - -[wfd2 video formats] -;0x0:not support, 0x1:H264, 0x2:H265, 0x3:both -video codec=0x3 - -video native resolution = 0x20 - -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 hh support=555 - -; 0x1:WFD_H265_MAIN_PROFILE -video profile=0x1 - -; 0x1:WFD_H265_LEVEL_3_1 -video level=0x2 - -video latency=0x0 - -video vertical resolution=2360 - -video horizontal resolution=3840 - -video minimum slicesize=0 - -video slice encoding params=200 - -video framerate control support=0 - -[wfd2 audio codecs] -; 0x1: LPCM, 0x2: AAC, 0x4: AC3 -;default aac and LPCM -audio codec=0x3 - -;see mm_wfd_sink_wfd_enum.h -audio lpcm mode=0x3 - -audio aac mode=0x1 - -audio ac3 mode=0x1 - diff --git a/packaging/libmm-wfd.spec b/packaging/libmm-wfd.spec index ddaf038..99c4101 100644 --- a/packaging/libmm-wfd.spec +++ b/packaging/libmm-wfd.spec @@ -1,6 +1,6 @@ Name: libmm-wfd Summary: Multimedia Framework Wifi-Display Library -Version: 0.2.211 +Version: 0.2.212 Release: 0 Group: System/Libraries License: Apache-2.0 @@ -49,6 +49,9 @@ export CFLAGS+=" -Wwrite-strings -Wswitch-default" export CFLAGS+=" -DSYSCONFDIR=\\\"%{_sysconfdir}\\\"" ./autogen.sh +%if "%{?profile}" == "tv" +CFLAGS+=" -DUSE_EXTERNAL_WL_DISPLAY_HANDLE" +%endif CFLAGS+=" -DMMFW_DEBUG_MODE -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "; export CFLAGS LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--hash-style=both -Wl,--as-needed"; export LDFLAGS @@ -66,9 +69,6 @@ mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/dbus-1/services/ mkdir -p %{buildroot}/%{_datadir}/license cp -rf %{_builddir}/%{name}-%{version}/LICENSE.APLv2.0 %{buildroot}%{_datadir}/license/%{name} -mkdir -p %{buildroot}%{_sysconfdir}/multimedia -cp -rf config/mmfw_wfd_sink.ini %{buildroot}%{_sysconfdir}/multimedia/mmfw_wfd_sink.ini - %clean rm -rf %{buildroot} @@ -81,7 +81,6 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_datadir}/license/%{name} -%{_sysconfdir}/multimedia/mmfw_wfd_sink.ini %{_libdir}/*.so.* %manifest libmm-wfd.manifest diff --git a/src/include/mm_wfd_sink_priv.h b/src/include/mm_wfd_sink_priv.h index 513e664..80d04bd 100644 --- a/src/include/mm_wfd_sink_priv.h +++ b/src/include/mm_wfd_sink_priv.h @@ -42,6 +42,8 @@ enum WFDSinkMainElementID { WFD_SINK_M_PIPE = 0, /* NOTE : WFD_SINK_M_PIPE should be zero */ WFD_SINK_M_SRC, WFD_SINK_M_DEPAY, + WFD_SINK_M_QUEUE, + WFD_SINK_M_D_VALVE, WFD_SINK_M_DEMUX, WFD_SINK_M_A_VALVE, WFD_SINK_M_V_VALVE, diff --git a/src/mm_wfd_sink_priv.c b/src/mm_wfd_sink_priv.c index e960c2a..4512305 100644 --- a/src/mm_wfd_sink_priv.c +++ b/src/mm_wfd_sink_priv.c @@ -2958,6 +2958,17 @@ static int __mm_wfd_sink_create_pipeline(mm_wfd_sink_t *wfd_sink) MMWFDSINK_TS_DATA_DUMP(wfd_sink, mainbin[WFD_SINK_M_DEPAY].gst, "src"); + /* create queue for ts */ + MMWFDSINK_CREATE_ELEMENT(mainbin, WFD_SINK_M_QUEUE, "queue", "ts_queue", TRUE); + MMWFDSINK_PAD_PROBE(wfd_sink, NULL, mainbin[WFD_SINK_M_QUEUE].gst, "src"); + MMWFDSINK_PAD_PROBE(wfd_sink, NULL, mainbin[WFD_SINK_M_QUEUE].gst, "sink"); + g_object_set(G_OBJECT(mainbin[WFD_SINK_M_QUEUE].gst), "max-size-buffers", 200000, NULL); + + /* create valve for demux */ + MMWFDSINK_CREATE_ELEMENT(mainbin, WFD_SINK_M_D_VALVE, "valve", "demux_valve", TRUE); + MMWFDSINK_PAD_PROBE(wfd_sink, NULL, mainbin[WFD_SINK_M_D_VALVE].gst, "src"); + MMWFDSINK_PAD_PROBE(wfd_sink, NULL, mainbin[WFD_SINK_M_D_VALVE].gst, "sink"); + /* create tsdemuxer*/ MMWFDSINK_CREATE_ELEMENT(mainbin, WFD_SINK_M_DEMUX, wfd_sink->ini.name_of_tsdemux, "wfdsink_demux", TRUE); MMWFDSINK_PAD_PROBE(wfd_sink, NULL, mainbin[WFD_SINK_M_DEMUX].gst, "sink"); @@ -4015,8 +4026,14 @@ static int __mm_wfd_sink_prepare_videosink(mm_wfd_sink_t *wfd_sink, GstElement * } } wfd_sink_debug("set video param : surface_id %d", wl_surface_id); +#ifdef USE_EXTERNAL_WL_DISPLAY_HANDLE + gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(video_sink), + wl_surface_id); +#else gst_video_overlay_set_wl_window_wl_surface_id(GST_VIDEO_OVERLAY(video_sink), wl_surface_id); +#endif + /* After setting window handle, set render rectangle */ gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(video_sink), wl_window_x, wl_window_y, wl_window_width, wl_window_height); -- 2.7.4