is it possible to add another src pad in GstBaseSrc class?

Nicolas Dufresne nicolas at ndufresne.ca
Thu Apr 6 14:14:41 UTC 2017


Le mercredi 05 avril 2017 à 22:58 -0700, caoxi a écrit :
> I'm trying to rewrite the GstBaseSrc Class to add another src pad for derived
> class(for now GstBaseSrc only allow one src pad), any good idea about how to
> do this, guys?

It is not possible without modifying GstBaseSrc, as you may already
have notice. Some of the aspect:

- You need advance thread management, 1 thread per pad
- You need to modify the stream IDs
- You need to add thread safe iteration of pads
  (For event dispatching, both out-of-band and serialized)
- You need to subclass GstPad, and store all negotiation stuff in there


So to resume, you need to do a major rewrite, as pretty much everything
would move from GstBaseSrc to a GstPad subclass (including virtual
functions). Another approach to this would be to have a GstBin
subclass, that manages internal GstBaseSrc instances. The BaseSrc
instances would use an API on the parent for the shared stuff.

regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170406/ed2f261b/attachment.sig>


More information about the gstreamer-devel mailing list