Using gst-python with multiple pipelines
Bruno Gonzalez
stenyak at gmail.com
Thu Mar 22 03:13:31 PDT 2012
I'm having similar problems, with pipelines failing when their creation
overlap, and always succeeding otherwise.
What errors do you get if you enable DEBUG logs?
What gstreamer versions are you using?
On Thu, Mar 22, 2012 at 00:51, Gary Thomas <gary at mlbassoc.com> wrote:
> On 2012-03-21 17:00, Tim-Philipp Müller wrote:
>
>> On Wed, 2012-03-21 at 16:39 -0600, Gary Thomas wrote:
>>
>> I'm trying to build a Python (GUI) application which will need
>>> multiple gstreamer pipelines active simultaneously. I'm using
>>> wxPython as the basis for my GUI. Currently, I have a window
>>> which has multiple (4) sub-panes. If I try to create a pipeline
>>> for each of those panes, sometimes it works, more often it fails,
>>> typically with glib or free() errors which tells me this is a
>>> multi-thread-safe problem.
>>>
>>> Is this the right place to get help for my issue?
>>> Is there something special, wrt threads, that I need to do to
>>> make my application safe?
>>>
>>
>> So you're displaying 4 videos from 4 pipelines in that window, one per
>> pane?
>>
>
> Let's make sure we agree on terminology
> window = Top level X window (the kind of thing that can be minimized, etc)
> pane = a writeable subsurface within the window (which has a unique ID)
>
> If we agree, then yes, that's what I want to do. I've found that if I
> start
> the videos separately, i.e. in "human" time by selecting and clicking, then
> everything works well. It only fails if I try to create the pipelines all
> at once whilst creating the basic window+panes.
>
>
> What do you use as video sink(s)?
>>
>
> Not sure I understand the question. I'm adapting some code I found
> on the web which uses gst pipelines + wxPython (which was adapted from
> the wxGTK version).
>
> I create the pipeline like this
> self.player = gst.element_factory_make("**playbin", "player")
> self.playing = False
> bus = self.player.get_bus()
> bus.add_signal_watch()
> bus.enable_sync_message_**emission()
> bus.connect('message', self.on_message, colour)
> bus.connect('sync-message::**element', self.on_sync_message,
> colour)
> within the code that creates the pane. Then I initiate the pipeline with
> self.player.set_property('uri'**,"file://" + path)
> self.player.set_state(gst.**STATE_PLAYING)
> self.playing = True
>
> I'm happy to share my actual code if that helps - it's currently just
> a sandbox for ideas anyway.
>
> Thanks for your help
>
>
> --
> ------------------------------**------------------------------
> Gary Thomas | Consulting for the
> MLB Associates | Embedded world
> ------------------------------**------------------------------
> ______________________________**_________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.**freedesktop.org<gstreamer-devel at lists.freedesktop.org>
> http://lists.freedesktop.org/**mailman/listinfo/gstreamer-**devel<http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel>
>
--
Saludos,
Bruno González
_______________________________________________
Jabber: stenyak AT gmail.com
http://www.stenyak.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120322/19c94e96/attachment.html>
More information about the gstreamer-devel
mailing list