mirror of
https://github.com/albfan/miraclecast.git
synced 2025-03-09 23:38:56 +00:00
miracle-wfdctl: set ximagesrc as live mode to prvent it preroll in pause
state
This commit is contained in:
parent
d8cd118119
commit
1156c08c3f
3 changed files with 11 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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 ###############
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/base.h>
|
||||
#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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue