Re: Conduit & iPod Module - Last Report



On Fri, Aug 22, 2008 at 2:56 PM, John Stowers <john stowers gmail com> wrote:
>
>
> On Fri, Aug 22, 2008 at 9:18 AM, John Stowers <john stowers gmail com>
> wrote:
>>
>>
>> On Fri, Aug 22, 2008 at 7:40 AM, Alexandre <airmind gmail com> wrote:
>>>
>>> I just noticed my last-minute work on two-pass encoding broke the
>>> Audio/Video conversion. I'm not sure it's only this, but take a look at the
>>> fix in my Bazaar branch, and see if something gets better.
>>
>> Ok cool. Make sure you pull from svn, I pushed a few small fixes to your
>> code.
>
> I have just been poking around,  trying to fix
> http://bugzilla.gnome.org/show_bug.cgi?id=548960
>
> I noticed a few things in the MediaFile class, and have a few questions.
> 1) Can this actually read metadata correctly? I couldn't get it to work, and
> there are no tests to confirm it. This test script seems to hang forever
>
> import gtk
> import gobject
> import conduit.datatypes.Audio as a
>
> def foo(i):
>     print i.get_audio_duration()
>     print i.get_audio_artist()
>
> song = a.Audio('/home/john/Music/Machine 15/01-millencolin-machine_15.mp3')
>
> gobject.timeout_add(500, foo, song)
> gtk.main()
>
> 2) Does the following fixme still apply?
>         # FIXME: Using Discoverer for now, but we should switch to
> utils.GstMetadata
>
> Thanks,
>
> John
>
>>
>>
>> John
>>
>>>
>>>
>>> --
>>> Alexandre Rosenfeld
>>>
>>> EngComp 06 - USP São Carlos
>>
>
>

Hi John

Your test case will hang forever.

Gstreamer is totally asynchronous, but the existing sync process isnt.
In order to run within the sync pipeline, we have to block on the
async process finishing. The only way really we've seen to do this is
like SynceModule - use a Threading.Event and wait for the completion
event from Gstreamer - this occurs in the main thread and pokes the
Threading.Event to be unblocked. (Maybe there is a way to make
GStreamer act synchronously, but IMO that would be "doing it wrong").

Your test case fails because it blocks the main thread. The
Threading.Event can never be poked from something running from
gobject.idle_add. Running your test case in a thread should fix your
problem.

We desperately need to replumb the pipeline to be more asynchronous,
as things become very foul as soon as there is a hint that something
isnt strictly synchronous. So far, this has meant Synce and GStreamer
foo has been a bit funky. But i'm sure there will be more... But this
will probably have to happen at the start of the next cycle. I'll try
and sketch out some thoughts i have on the wiki in the meantime.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]