AppSink, GstBuffer and GdkPixbuf inside it.

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

AppSink, GstBuffer and GdkPixbuf inside it.

Erick Pérez Castellanos
Hi:

I'm having some little trouble with an app I'm coding. Here it is:
The application put together a simple pipeline:
-------------                 -------------
| playbin2  |        ------>  | appsink   |
-------------                 -------------
I'm looping at gst_app_sink_pull_buffer method, and processing the
GstBuffer message one by one. The problem is the when I got one message
and extract build a GdkPixbuf from there, the ppixbuf I'm getting is the
size of frame but the picture is comprised three times in it, I mean the
pixbuf I got have the frame of the video but strecthed and three times
repeated by the x axis.
Don't know if I made myself clear, but, feel free to ask. The big
question here is cause I'm doing the extraction the same way it does on
GstGdkPixbufSink plugin. And there something escaping me.
Did anyone have any ideas why is that happening ?

PS: When I disconnect the playbin2 element from the appsink, and
playbin2 uses autovidesink, the video shows fine, so I think it's
something on the extraction, I just can't get what's wrong there.

Thxs in advance

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

Re: AppSink, GstBuffer and GdkPixbuf inside it.

Tim-Philipp Müller-2
On Wed, 2011-12-07 at 16:08 -0500, Erick Pérez Castellanos wrote:

> I'm having some little trouble with an app I'm coding. Here it is:
> The application put together a simple pipeline:
> -------------                 -------------
> | playbin2  |        ------>  | appsink   |
> -------------                 -------------
> I'm looping at gst_app_sink_pull_buffer method, and processing the
> GstBuffer message one by one. The problem is the when I got one message
> and extract build a GdkPixbuf from there, the ppixbuf I'm getting is the
> size of frame but the picture is comprised three times in it, I mean the
> pixbuf I got have the frame of the video but strecthed and three times
> repeated by the x axis.
> Don't know if I made myself clear, but, feel free to ask. The big
> question here is cause I'm doing the extraction the same way it does on
> GstGdkPixbufSink plugin. And there something escaping me.
> Did anyone have any ideas why is that happening ?
>
> PS: When I disconnect the playbin2 element from the appsink, and
> playbin2 uses autovidesink, the video shows fine, so I think it's
> something on the extraction, I just can't get what's wrong there.

You're probably getting the video in the wrong format (e.g.
video/x-raw-yuv,format=I420) and not the RGB format/layout required.
Force appsink's caps to the same caps as gdkpixbufsink has on its
template and it should be fine.

(But really, why not use gdkpixbufsink?)

Cheers
 -Tim


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