Custom Gst.Element in GTK3
Manuel
manuel at wenns-um-email-geht.de
Thu Jul 17 02:30:25 PDT 2014
Hi,
thanks for your reply.
Yes, i mean Gst 1.0 and PyGObject :)
I am using Ubuntu 14.04 and have python-gst-1.0 installed.
I tried the example. But it seems to be broken. For example it uses
set_chain_function, which IMHO should be set_chain_function_full.
(According to
http://lazka.github.io/pgi-docs/Gst-1.0/classes/Pad.html#Gst.Pad.set_chain_function_full).
But I noticed two things:
1.
When changing the function names to set_chain_function_full and
set_event_function_full and adding a source-pad it almost looks like my
TestFilter-class.
One difference:
In my code the chain-function tries to push the buffer to the next
element (self.srcpad.push(buffer)). The example instead just returns
Gst.FlowReturn.OK. This is where my code produces the error ("We don't
have a bufferpool negotiated") and the example doesn't. Do I have to do
something more to be able to push the buffer to the next element?
2.
In my last email I mentioned that I even didn't get it (my GTK3-example)
playing with textoverlay and autovideosink in the Bin (without my custom
element).
But when I change the GhostPad's name in my GTK3-example to 'sink'
(instead of 'video_sink' like in my GTK2-example) and remove the
TestFilter from the Bin then the video is playing fine. I updated the
example at pastebin. Now I just need to get my filter to work :)
Best regards
17.07.2014 09:29 AM, Thibault Saunier:
> Hello,
>
> I think when you say Gtk3 you mean GStreamer 1.0 with PyGObject.
>
> Do you have gst-python installed? It is necessary to be able to create
> GstElement subclasses.
>
> You can have a look at that example:
> http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/plugins/python/sinkelement.py
>
> Regards,
>
> Thibault Saunier
>
>
> On Thu, Jul 17, 2014 at 12:07 AM, Manuel <manuel at wenns-um-email-geht.de>
> wrote:
>
>> Custom Gst.Element in GTK3
>> --------------------------
>> Hi all,
>>
>> I wrote a gst.Element (GTK2), which is a simple filter that just
>> forwards all buffers it receives on the sink-pad to the src-pad. Later I
>> will grab some information from the buffer before forwarding it. (More
>> precisely I will grab the timestamps and show some text based on the
>> time, like subtitles). The GTK2-version works fine.
>>
>> Today I tried to change my code so that it uses the GTK3
>> gi.repository-package.
>> Although the new class looks almost the same it doesn't work.
>>
>> This is the error printed on the console:
>> Error: Internal error: can't allocate images xvimagesink.c(979):
>> gst_xvimagesink_show_frame ():
>>
>> /GstPlayBin:MultimediaPlayer/GstPlaySink:playsink/GstBin:vbin/GstBin:timed-video-bin/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage:
>> We don't have a bufferpool negotiated
>>
>> Here is my GTK2-version: http://pastebin.com/J2gHfvS4
>> And here the GTK3-version: http://pastebin.com/9u8zzcTk
>>
>> This is a scenario:
>> A video-file is played using playbin. The playbin's video-sink is set to
>> a Gtk.Bin that combines my own Gst.Element with textoverlay and an
>> autovideosink.
>>
>> NOTE: If you remove the textoverlay from the GTK3 example then at least
>> the audio is playing ;)
>>
>> I would be very grateful for your help. :)
>>
>> Best Regards
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list