Gst_caps_new_simple fails

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Gst_caps_new_simple fails

Luca Bacci
Hi, I'm using GStreamer to decode video files and get a sequence of RGB frames that I paint in a widget of my application. This is the pipeline:

filesrc ! decodebin ! videoconvert ! appsink

I want RGB frames and for that I use the "caps" property of appsink but

GstCaps *caps = gst_caps_new_simple("video/x-raw",
                    "format", G_TYPE_STRING, "xRGB",
                    NULL);

fails and returns NULL caps, why?

Thanks in advance,
Luca

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gst_caps_new_simple fails

Luca Bacci
For reference, I solved it using:

GstCaps *caps = gst_caps_from_string(
                "video/x-raw"
                ",format=(string)xRGB"
                ",width=(int)[1,2147483647]"
                ",height=(int)[1,2147483647]");


Luca

Il giorno dom 20 gen 2019 alle ore 16:20 Luca Bacci <[hidden email]> ha scritto:
Hi, I'm using GStreamer to decode video files and get a sequence of RGB frames that I paint in a widget of my application. This is the pipeline:

filesrc ! decodebin ! videoconvert ! appsink

I want RGB frames and for that I use the "caps" property of appsink but

GstCaps *caps = gst_caps_new_simple("video/x-raw",
                    "format", G_TYPE_STRING, "xRGB",
                    NULL);

fails and returns NULL caps, why?

Thanks in advance,
Luca

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gst_caps_new_simple fails

Tim-Philipp Müller-2
In reply to this post by Luca Bacci
On Sun, 2019-01-20 at 16:20 +0100, Luca Bacci wrote:

Hi Luca,

> I want RGB frames and for that I use the "caps" property of appsink
> but
>
> GstCaps *caps = gst_caps_new_simple("video/x-raw",
>                     "format", G_TYPE_STRING, "xRGB",
>                     NULL);
>
> fails and returns NULL caps, why?

I don't know why this would fail. Is it actually this call that fails
or and returns NULL, or does something else fail later?

Did you call gst_init()?

I might be missing something, but it doesn't make much sense at first
glance.

Cheers
 Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gst_caps_new_simple fails

Luca Bacci
Oh, Tim you're right! It all was caused by a missing return true in my set_caps() function, so 0 was returned (it's a debug build). OMG
Thanks, I have now rolled back to the simpler form.

Il giorno mar 22 gen 2019 alle ore 13:16 Tim-Philipp Müller <[hidden email]> ha scritto:
On Sun, 2019-01-20 at 16:20 +0100, Luca Bacci wrote:

Hi Luca,

> I want RGB frames and for that I use the "caps" property of appsink
> but
>
> GstCaps *caps = gst_caps_new_simple("video/x-raw",
>                     "format", G_TYPE_STRING, "xRGB",
>                     NULL);
>
> fails and returns NULL caps, why?

I don't know why this would fail. Is it actually this call that fails
or and returns NULL, or does something else fail later?

Did you call gst_init()?

I might be missing something, but it doesn't make much sense at first
glance.

Cheers
 Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel