<div dir="ltr">Hi all,<br><br>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.<br><br>
I am&nbsp;particularly&nbsp;interested in flip4mac&#39;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.<br>

<br>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 &quot;codecmapping.c&quot;. I then added code in &quot;imagedescription.c&quot; as follows:<br>
<div><br></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco"><span style="color: #aa0d91">static</span> ImageDescription *</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">image_description_for_WMVC1 (GstBuffer * buf)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; ImageDescription *desc = <span style="color: #aa0d91">NULL</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; gpointer pos;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; desc = g_malloc0 (<span style="color: #aa0d91">sizeof</span> (ImageDescription) + GST_BUFFER_SIZE (buf));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; pos = (gpointer) ((gulong) desc + (gulong) <span style="color: #aa0d91">sizeof</span> (ImageDescription));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; desc-&gt;idSize = <span style="color: #aa0d91">sizeof</span> (ImageDescription) + GST_BUFFER_SIZE (buf);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; g_memmove (pos, GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">&nbsp; <span style="color: #aa0d91">return</span> desc;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco">}</p></div><div><br></div><div><br></div><div>I also updated the switch statement in the &quot;<span class="Apple-style-span" style="font-family: Monaco; font-size: 10px; ">image_description_from_codec_data<span class="Apple-style-span" style="font-family: arial; font-size: 13px; ">&quot; function. &quot;gst-inspect qtwrapper&quot; would confirm that WMA Pro and VC1 are now supported.</span></span></div>
<div><br></div><div>This doesn&#39;t seem to work right, &quot;gst-launch&quot; just crashes, here&#39;s the stack trace:</div><div><br></div><div><div>Thread 2 Crashed:</div><div>0 &nbsp; net.telestream.wmv.import &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x110c3e7a Wma1DecompressorComponentDispatch + 5858</div>
<div>1 &nbsp; net.telestream.wmv.import &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x110c417b Wma1DecompressorComponentDispatch + 6627</div><div>2 &nbsp; ...ple.CoreServices.CarbonCore<span class="Apple-tab-span" style="white-space:pre">        </span>0x96483269 CallComponentFunctionCommon + 537</div>
<div>3 &nbsp; net.telestream.wmv.import &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x110c265d Wma3DecompressorComponentDispatch + 181</div><div>4 &nbsp; ...ple.CoreServices.CarbonCore<span class="Apple-tab-span" style="white-space:pre">        </span>0x96482f31 CallComponentDispatch + 29</div>
<div>5 &nbsp; com.apple.audio.SoundManager &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x9638e71e SoundComponentSetInfo + 55</div><div>6 &nbsp; ...dio.SoundManager.Components<span class="Apple-tab-span" style="white-space:pre">        </span>0x156c8cba EqualizerDispatch + 362</div>
<div>7 &nbsp; ...ple.CoreServices.CarbonCore<span class="Apple-tab-span" style="white-space:pre">        </span>0x96482f31 CallComponentDispatch + 29</div><div>8 &nbsp; com.apple.audio.SoundManager &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x9638e71e SoundComponentSetInfo + 55</div>
<div>9 &nbsp; ...dio.SoundManager.Components<span class="Apple-tab-span" style="white-space:pre">        </span>0x156c628e RateIntegerDispatch + 350</div><div>10 &nbsp;...ple.CoreServices.CarbonCore<span class="Apple-tab-span" style="white-space:pre">        </span>0x96482f31 CallComponentDispatch + 29</div>
<div>11 &nbsp;com.apple.audio.SoundManager &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x9638e71e SoundComponentSetInfo + 55</div><div>12 &nbsp;...dio.SoundManager.Components<span class="Apple-tab-span" style="white-space:pre">        </span>0x156c50de MixerDispatch + 4494</div>
<div>13 &nbsp;...ple.CoreServices.CarbonCore<span class="Apple-tab-span" style="white-space:pre">        </span>0x96482f31 CallComponentDispatch + 29</div><div>14 &nbsp;com.apple.audio.SoundManager &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x9638e71e SoundComponentSetInfo + 55</div>
<div>15 &nbsp;...dio.SoundManager.Components<span class="Apple-tab-span" style="white-space:pre">        </span>0x156d22f9 BigEndian16CompDispatch + 297</div><div>16 &nbsp;...ple.CoreServices.CarbonCore<span class="Apple-tab-span" style="white-space:pre">        </span>0x96482f31 CallComponentDispatch + 29</div>
<div>17 &nbsp;com.apple.audio.SoundManager &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x9638e71e SoundComponentSetInfo + 55</div><div>18 &nbsp;com.apple.audio.SoundManager &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x9638e74b SoundConverterSetInfo + 43</div>
<div>19 &nbsp;....audio.toolbox.AudioToolbox<span class="Apple-tab-span" style="white-space:pre">        </span>0x933b1845 SoundConverterSetInfoProc(OpaqueSoundConverter*, unsigned long, void*) + 53</div><div>20 &nbsp;....audio.toolbox.AudioToolbox<span class="Apple-tab-span" style="white-space:pre">        </span>0x9338dba1 SoundMgrDecoder::SetSoundConverterMagicCookie() + 49</div>
<div>21 &nbsp;....audio.toolbox.AudioToolbox<span class="Apple-tab-span" style="white-space:pre">        </span>0x93330287 AudioConverterChain::SetProperty(unsigned long, unsigned long, void const*) + 71</div><div>22 &nbsp;....audio.toolbox.AudioToolbox<span class="Apple-tab-span" style="white-space:pre">        </span>0x93347031 AudioConverterSetProperty + 113</div>
<div>23 &nbsp;libgstqtwrapper.so &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>0x00713221 qtwrapper_audio_decoder_sink_setcaps + 657 (audiodecoders.c:406)</div><div>24 &nbsp;libgstreamer-0.10.0.dylib &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x0011d665 gst_pad_set_caps + 245 (gstpad.c:2388)</div>
<div>25 &nbsp;libgstreamer-0.10.0.dylib &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x0011fed4 gst_pad_chain_unchecked + 516 (gstpad.c:3561)</div><div>26 &nbsp;libgstreamer-0.10.0.dylib &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x0012057a gst_pad_push + 314 (gstpad.c:3744)</div>
<div>27 &nbsp;libgstcoreelements.so &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x00613fff gst_queue_loop + 1967 (gstqueue.c:1028)</div><div>28 &nbsp;libgstreamer-0.10.0.dylib &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x0013c309 gst_task_func + 169 (gsttask.c:194)</div>
<div>29 &nbsp;libglib-2.0.0.dylib &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x003de7ec g_thread_pool_thread_proxy + 668 (gthreadpool.c:266)</div><div>30 &nbsp;libglib-2.0.0.dylib &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x003dc6de g_thread_create_proxy + 174 (gthread.c:635)</div>
<div>31 &nbsp;libSystem.B.dylib &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x908726f5 _pthread_start + 321</div><div>32 &nbsp;libSystem.B.dylib &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>0x908725b2 thread_start + 34</div>
</div><div><br></div><div><br></div><div>I am suspecting that my changes above are not enough to make this work.</div><div><br></div><div>Can anyone point me in the right direction on this one?</div><div><br></div><div>Thanks,</div>
<div><br></div><div>Dres</div></div>