diff --git a/CMakeLists.txt b/CMakeLists.txt index ca46445..10bc586 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ pkg_check_modules (GLIB2 REQUIRED glib-2.0) pkg_check_modules (UDEV REQUIRED libudev) pkg_check_modules (SYSTEMD REQUIRED libsystemd) pkg_check_modules (GSTREAMER REQUIRED gstreamer-1.0) +pkg_check_modules (GSTREAMER_BASE REQUIRED gstreamer-base-1.0) include(CheckCCompilerFlag) check_c_compiler_flag(-fstack-protector-strong HAS_STACK_PROTCTOR_STRONG) diff --git a/src/ctl/CMakeLists.txt b/src/ctl/CMakeLists.txt index ec9c389..8eeb49e 100644 --- a/src/ctl/CMakeLists.txt +++ b/src/ctl/CMakeLists.txt @@ -58,6 +58,7 @@ set(miracle-wfdctl_SRCS ctl-cli.c include_directories(${CMAKE_BINARY_DIR} ${GSTREAMER_INCLUDE_DIRS} + ${GSTREAMER_BASE_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/shared) @@ -75,7 +76,8 @@ endif(READLINE_FOUND) target_link_libraries(miracle-wfdctl miracle-shared - ${GSTREAMER_LIBRARIES}) + ${GSTREAMER_LIBRARIES} + ${GSTREAMER_BASE_LIBRARIES}) ########### install files ############### diff --git a/src/ctl/wfd-out-session.c b/src/ctl/wfd-out-session.c index c094786..86c16db 100644 --- a/src/ctl/wfd-out-session.c +++ b/src/ctl/wfd-out-session.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "wfd-session.h" #include "shl_log.h" #include "rtsp.h" @@ -566,6 +567,7 @@ static int wfd_out_session_create_pipeline(struct wfd_session *s) char vsrc_param3[16] = "", vsrc_param4[16] = ""; struct wfd_out_session *os = wfd_out_session(s); GstElement *pipeline; + GstElement *vsrc; GstBus *bus; GError *error = NULL; const char **tmp; @@ -694,6 +696,11 @@ static int wfd_out_session_create_pipeline(struct wfd_session *s) return -1; } + vsrc = gst_bin_get_by_name(GST_BIN(pipeline), "vsrc"); + gst_base_src_set_live(GST_BASE_SRC(vsrc), true); + g_object_unref(vsrc); + vsrc = NULL; + r = gst_element_set_state(pipeline, GST_STATE_READY); if(GST_STATE_CHANGE_FAILURE == r) { g_object_unref(pipeline);