Hi people!
I'm using the Gstreamer Python binding and I need to create two new elements: a pure-source and a pure-sink element. For the sink element, I can use the base class gst.BaseSink and it works fine, but I can't say the same with gst.BaseSrc.
I need a lower control on the source element, and I can't find the way for doing it inheriting from gst.BaseSrc or gst.Element. My problem is more complicated, but imaging that I want to implement the example of source with sometimes pad [1] seen on the plugin writer guide, but in Python. In this example, a loop method is used to read the "header" of the file and get the pads available when each line of the input file is read.
How can I write this example in Python? Is it really possible? I don't find on the python-binding documetation anything about loop function in gst.Element class. Thanks for your attention
P.S. Sorry for my bad English. P.S.2 I don't know if there is the right place to ask this questions about PyGst... but I didn't found any other list or FAQ python-related on the Gstreamer web.
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
2010/8/19 José Luis Segura Lucas <[hidden email]>:
> Hi people! > I'm using the Gstreamer Python binding and I need to create two new > elements: a pure-source and a pure-sink element. > For the sink element, I can use the base class gst.BaseSink and it works > fine, but I can't say the same with gst.BaseSrc. > I need a lower control on the source element, and I can't find the way for > doing it inheriting from gst.BaseSrc or gst.Element. > My problem is more complicated, but imaging that I want to implement the > example of source with sometimes pad [1] seen on the plugin writer guide, > but in Python. In this example, a loop method is used to read the "header" > of the file and get the pads available when each line of the input file is > read. > How can I write this example in Python? Is it really possible? I don't find > on the python-binding documetation anything about loop function in > gst.Element class. Why would this be a source element? If it's getting data from a file, it should probably be a demuxer (based on your description), not a source at all. You should be able to write a pipeline-driving demuxer element with gst-python. Mike ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Did you see the example? My problem is different, I take the data through a remote invocation library (ZerC Ice). I put that example because I need something similar: a loop receiving data from the network and a src pad created only when I start receiving data... I think it's a similar problem to the documentation one... Sent from Android El 19/08/2010 20:38, "Michael Smith" <[hidden email]> escribió: ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by michael smith-6-3
Hi Mike!
First, thanks for your answer. My element won't read from a file. It will read from a socket, using a object-oriented RPC library (ZeroC Ice). I take that example from the "plugin writers guide" because it's the example of use of "sometimes pads". That example from the tutorial can be done using filesrc and a demuxer, as you propose, but the problem is still here: the demuxer will have a bunch of sometime pads that will be created and added to the element at exec time.
I need to make my element waits to receive the data through the library, and when it happens, create and add the sometime pad to the element and pass it to the connected sink pad of other element in the pipeline.
In Python I can't use gst.BaseSrc, because apparently, it only allows "always pads", and using gst.Element as super-class, I can't find the way to write the "loop" method shown on that C-example.
2010/8/19 Michael Smith <[hidden email]>
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |