examples: va: add option for enabling alive stream
This is useful to test va encoding for live streams which should enable output delay. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4359>
This commit is contained in:
parent
7a03813ee9
commit
51c2030efd
@ -31,6 +31,7 @@ static GMainLoop *loop = NULL;
|
|||||||
static gint width = 640;
|
static gint width = 640;
|
||||||
static gint height = 480;
|
static gint height = 480;
|
||||||
static guint rc_ctrl = 0;
|
static guint rc_ctrl = 0;
|
||||||
|
static gboolean alive = FALSE;
|
||||||
|
|
||||||
G_LOCK_DEFINE_STATIC (input_lock);
|
G_LOCK_DEFINE_STATIC (input_lock);
|
||||||
|
|
||||||
@ -455,6 +456,8 @@ main (gint argc, gchar ** argv)
|
|||||||
{"codec", 'c', 0, G_OPTION_ARG_STRING, &codec,
|
{"codec", 'c', 0, G_OPTION_ARG_STRING, &codec,
|
||||||
"Codec to test: "
|
"Codec to test: "
|
||||||
"[ *h264, h265, vp9, av1, h264lp, h265lp, vp9lp, av1lp ]"},
|
"[ *h264, h265, vp9, av1, h264lp, h265lp, vp9lp, av1lp ]"},
|
||||||
|
{"alive", 'a', 0, G_OPTION_ARG_NONE, &alive,
|
||||||
|
"Set test source as a live stream"},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
const struct {
|
const struct {
|
||||||
@ -516,7 +519,7 @@ main (gint argc, gchar ** argv)
|
|||||||
pipeline = gst_pipeline_new (NULL);
|
pipeline = gst_pipeline_new (NULL);
|
||||||
|
|
||||||
MAKE_ELEMENT_AND_ADD (src, "videotestsrc");
|
MAKE_ELEMENT_AND_ADD (src, "videotestsrc");
|
||||||
g_object_set (src, "pattern", 1, NULL);
|
g_object_set (src, "pattern", 1, "is-live", alive, NULL);
|
||||||
|
|
||||||
MAKE_ELEMENT_AND_ADD (capsfilter, "capsfilter");
|
MAKE_ELEMENT_AND_ADD (capsfilter, "capsfilter");
|
||||||
MAKE_ELEMENT_AND_ADD (convert, "videoconvert");
|
MAKE_ELEMENT_AND_ADD (convert, "videoconvert");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user