handle events / override event handling in appsrc

Sebastian Dröge sebastian at centricular.com
Sat Dec 28 04:10:44 PST 2013


On Do, 2013-12-26 at 21:11 -0800, Cigarah wrote:
> /Ok, but with this it's impossible that appsrc calls the basesrc 
> send_event handling. You overwrote it in class_init and don't chain up 
> to the parent class' send_event in your own send_event. /
> 
> Yes, I doubted that was incomplete. Can I get steps to do chain up. 

Well, you shouldn't chain up. Otherwise you will call basesrc's
send_event. Which you didn't want to.

Check the other vfunc implementations on how to do that.

> /Which events, and why is the default handling not working for you? /
> FLUSH START and FLUSH STOP events.
> There is nothing that is done for these events that's why default handling
> is not working. See the below code from gstbasesrc.c. There is just  a break
> statement after two case statements. There is no handling let alone default
> handling.
> 
>  switch (GST_EVENT_TYPE (event)) { 
>       /* bidirectional events */ 
>     case GST_EVENT_FLUSH_START: 
>         
>     case GST_EVENT_FLUSH_STOP: 
> 
>       break;
> ...

This is fixed in the 1.2 releases. Since 1.2 basesrc has appropriate
default handling of FLUSH_START and FLUSH_STOP.

What do you want to do with these events sent from your application
though?

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131228/39e761b9/attachment.pgp>


More information about the gstreamer-devel mailing list