mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
qml6glmixer: add support for non-RGBA inputs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5290>
This commit is contained in:
parent
ba00a7efda
commit
9e6891076c
2 changed files with 8 additions and 4 deletions
|
@ -121,7 +121,7 @@ gst_qml6_gl_mixer_pad_prepare_frame (GstVideoAggregatorPad *vagg_pad, GstVideoAg
|
|||
GstCaps *in_caps;
|
||||
GstGLContext *context;
|
||||
|
||||
in_caps = gst_video_info_to_caps (&vagg->info);
|
||||
in_caps = gst_video_info_to_caps (&vagg_pad->info);
|
||||
gst_caps_set_features_simple (in_caps, gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_GL_MEMORY));
|
||||
pad->widget->setCaps (in_caps);
|
||||
gst_clear_caps (&in_caps);
|
||||
|
@ -273,7 +273,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%u",
|
|||
GST_PAD_REQUEST,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
|
||||
(GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
|
||||
"RGBA"))
|
||||
"{ RGBA, BGRA, YV12 }"))
|
||||
);
|
||||
|
||||
struct _GstQml6GLMixer {
|
||||
|
|
|
@ -67,6 +67,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
GstElement *pipeline = gst_pipeline_new (NULL);
|
||||
GstElement *src0 = gst_element_factory_make ("videotestsrc", NULL);
|
||||
GstElement *capsfilter = gst_element_factory_make ("capsfilter", NULL);
|
||||
GstCaps *caps = gst_caps_from_string ("video/x-raw,format=YV12");
|
||||
g_object_set (capsfilter, "caps", caps, NULL);
|
||||
gst_clear_caps (&caps);
|
||||
GstElement *glupload0 = gst_element_factory_make ("glupload", NULL);
|
||||
GstElement *src1 = gst_element_factory_make ("videotestsrc", NULL);
|
||||
gst_util_set_object_arg ((GObject *) src1, "pattern", "ball");
|
||||
|
@ -78,8 +82,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
g_assert (src0 && glupload0 && mixer && sink);
|
||||
|
||||
gst_bin_add_many (GST_BIN (pipeline), src0, glupload0, src1, glupload1, mixer, sink, NULL);
|
||||
gst_element_link_many (src0, glupload0, mixer, sink, NULL);
|
||||
gst_bin_add_many (GST_BIN (pipeline), src0, capsfilter, glupload0, src1, glupload1, mixer, sink, NULL);
|
||||
gst_element_link_many (src0, capsfilter, glupload0, mixer, sink, NULL);
|
||||
gst_element_link_many (src1, glupload1, mixer, NULL);
|
||||
|
||||
/* load qmlglsink output */
|
||||
|
|
Loading…
Reference in a new issue