Documentation for create a src element

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

Documentation for create a src element

Mateo Matachana López
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am creating a GStreamer source element for get a live streaming from a
P2P network. I am stucked at one point.

My SrcObject inheritances from GstPushSrc as recomended on GStreamer
documentation for live sources.

I have implemented the _start, _query and _change_state functions where
I mostly do the setup of the protocol (contact the tracker, get the
media description, etc.) but I don't know how to pass the streamed
(received) data to the next GStreamer element.

How can I pass data to the next GStreamer element? Should I push the
data or GStreamer tolds the SrcObject when it should push data?

Are available some documentation where is explained in detail the
process of build a source element?

Thanks in advance,
Mateo Matachana
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyCjdwACgkQ3zaBWsUKsPsbvQCfbKgXbgrz5fZlc/hsIGcTe96r
cAUAnRAEbA6ONy8zdOC6bbvznw+jSz4T
=4btj
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Documentation for create a src element

Tim-Philipp Müller-2
On Sat, 2010-09-04 at 20:20 +0200, Mateo Matachana López wrote:

Hi,

> I have implemented the _start, _query and _change_state functions where
> I mostly do the setup of the protocol (contact the tracker, get the
> media description, etc.) but I don't know how to pass the streamed
> (received) data to the next GStreamer element.

It shouldn't be needed to implement/override GstElement::change_state(),
just implement GstBaseSrc::start() and ::stop() instead.


> How can I pass data to the next GStreamer element? Should I push the
> data or GStreamer tolds the SrcObject when it should push data?

You should implement GstPushSrc::create(), from where you can return
your buffer. (Note: not GstBaseSrc::create()).

Cheers
 -Tim


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel