Using qtwrapper with flip4mac

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

Using qtwrapper with flip4mac

Dres
Hi all,

I have been trying to play back Windows Media content using gstreamer on the Mac. I have installed the flip4mac decoders, which allow me to play back WMV files using the QuickTime player.

I am particularly interested in flip4mac's ability to play back WMA Pro (which is still missing in ffmpeg, should be added this summer though) and VC1 for video. It also makes my application to no longer depend on ffmpeg, which is desirable.

I took a closer look at the qtwrapper plugin and found that it seems to lack any mappings for the various WM types. So I decided to give it a shot and added WVC1 and WMA3 to "codecmapping.c". I then added code in "imagedescription.c" as follows:

static ImageDescription *

image_description_for_WMVC1 (GstBuffer * buf)

{

  ImageDescription *desc = NULL;

  gpointer pos;


  desc = g_malloc0 (sizeof (ImageDescription) + GST_BUFFER_SIZE (buf));

  pos = (gpointer) ((gulong) desc + (gulong) sizeof (ImageDescription));


  desc->idSize = sizeof (ImageDescription) + GST_BUFFER_SIZE (buf);

  g_memmove (pos, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));


  return desc;

}



I also updated the switch statement in the "image_description_from_codec_data" function. "gst-inspect qtwrapper" would confirm that WMA Pro and VC1 are now supported.

This doesn't seem to work right, "gst-launch" just crashes, here's the stack trace:

Thread 2 Crashed:
0   net.telestream.wmv.import     0x110c3e7a Wma1DecompressorComponentDispatch + 5858
1   net.telestream.wmv.import     0x110c417b Wma1DecompressorComponentDispatch + 6627
2   ...ple.CoreServices.CarbonCore 0x96483269 CallComponentFunctionCommon + 537
3   net.telestream.wmv.import     0x110c265d Wma3DecompressorComponentDispatch + 181
4   ...ple.CoreServices.CarbonCore 0x96482f31 CallComponentDispatch + 29
5   com.apple.audio.SoundManager   0x9638e71e SoundComponentSetInfo + 55
6   ...dio.SoundManager.Components 0x156c8cba EqualizerDispatch + 362
7   ...ple.CoreServices.CarbonCore 0x96482f31 CallComponentDispatch + 29
8   com.apple.audio.SoundManager   0x9638e71e SoundComponentSetInfo + 55
9   ...dio.SoundManager.Components 0x156c628e RateIntegerDispatch + 350
10  ...ple.CoreServices.CarbonCore 0x96482f31 CallComponentDispatch + 29
11  com.apple.audio.SoundManager   0x9638e71e SoundComponentSetInfo + 55
12  ...dio.SoundManager.Components 0x156c50de MixerDispatch + 4494
13  ...ple.CoreServices.CarbonCore 0x96482f31 CallComponentDispatch + 29
14  com.apple.audio.SoundManager   0x9638e71e SoundComponentSetInfo + 55
15  ...dio.SoundManager.Components 0x156d22f9 BigEndian16CompDispatch + 297
16  ...ple.CoreServices.CarbonCore 0x96482f31 CallComponentDispatch + 29
17  com.apple.audio.SoundManager   0x9638e71e SoundComponentSetInfo + 55
18  com.apple.audio.SoundManager   0x9638e74b SoundConverterSetInfo + 43
19  ....audio.toolbox.AudioToolbox 0x933b1845 SoundConverterSetInfoProc(OpaqueSoundConverter*, unsigned long, void*) + 53
20  ....audio.toolbox.AudioToolbox 0x9338dba1 SoundMgrDecoder::SetSoundConverterMagicCookie() + 49
21  ....audio.toolbox.AudioToolbox 0x93330287 AudioConverterChain::SetProperty(unsigned long, unsigned long, void const*) + 71
22  ....audio.toolbox.AudioToolbox 0x93347031 AudioConverterSetProperty + 113
23  libgstqtwrapper.so             0x00713221 qtwrapper_audio_decoder_sink_setcaps + 657 (audiodecoders.c:406)
24  libgstreamer-0.10.0.dylib     0x0011d665 gst_pad_set_caps + 245 (gstpad.c:2388)
25  libgstreamer-0.10.0.dylib     0x0011fed4 gst_pad_chain_unchecked + 516 (gstpad.c:3561)
26  libgstreamer-0.10.0.dylib     0x0012057a gst_pad_push + 314 (gstpad.c:3744)
27  libgstcoreelements.so         0x00613fff gst_queue_loop + 1967 (gstqueue.c:1028)
28  libgstreamer-0.10.0.dylib     0x0013c309 gst_task_func + 169 (gsttask.c:194)
29  libglib-2.0.0.dylib           0x003de7ec g_thread_pool_thread_proxy + 668 (gthreadpool.c:266)
30  libglib-2.0.0.dylib           0x003dc6de g_thread_create_proxy + 174 (gthread.c:635)
31  libSystem.B.dylib             0x908726f5 _pthread_start + 321
32  libSystem.B.dylib             0x908725b2 thread_start + 34


I am suspecting that my changes above are not enough to make this work.

Can anyone point me in the right direction on this one?

Thanks,

Dres

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using qtwrapper with flip4mac

michael smith-6-3
On Thu, Jul 17, 2008 at 2:05 PM, Dres <[hidden email]> wrote:
> Hi all,
>
> I have been trying to play back Windows Media content using gstreamer on the
> Mac. I have installed the flip4mac decoders, which allow me to play back WMV
> files using the QuickTime player.

Great! Lots of people are interested in this - I am, for one.

It sounds like you're on the right track - it's just that you probably
need to do something else as well to make things work right. I don't
think there's any easy way to find out what, though, unfortunately.

One potentially useful approach is to run a working application (like
the quicktime player - but it'd be better to use a simpler bit of
code, like something from the quicktime sample applications), and then
look at it using a debugger - find what's being called differently, or
what extra data is being passed, etc. Then duplicate this in the
gstreamer plugins. Iterate until it works!

Good luck - this'd be great to have.

Mike

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel