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
|
@ -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