[MPlayer-users] Windows binary proprietary codec
Fernandon Bautista
fernandobautista017 at gmail.com
Wed Sep 30 18:53:28 CEST 2015
Sorry, the attachment ...
On Wed, Sep 30, 2015 at 6:52 PM, Fernandon Bautista <
fernandobautista017 at gmail.com> wrote:
> Hi all again,
>
> I am still trying to understand were the problem is. Along with this email
> I have attached the output of the execution with -msglevel all=9. On the
> other hand, by running gdb, I found out that the function acmStreamOpen
> fails(which is called from from the function preinint that is defined on
> libmpcodecs/ad_acm.c). Obviously there is not debug info on the codec so I
> know that the codec calls to my InitializeSecurityDescriptor implementation
> but that is all. Finally, I am thinking on using Wine
> InitializeSecurityDescriptor implementation (this is what I found:
> https://github.com/wine-mirror/wine/blob/dcc6868057605296a7dacd89211e0673396abe45/dlls/advapi32/security.c)
> but it forces me to add more functions and by reading the functionality, I
> am not sure that this is the problem.
>
> I will really appreciate if you can give any new hint/suggestion.
>
> Thanks in advance.
>
> On Mon, Sep 21, 2015 at 1:02 PM, Fernandon Bautista <
> fernandobautista017 at gmail.com> wrote:
>
>> Reimar,
>>
>> I tried just by copy-paste of the RegCloseKey function. These are my
>> files:
>>
>> *etc/codecs.conf:*
>> audiocodec g729b
>> info "Our provider g729b"
>> status working
>> format 0x0135
>> driver acm
>> dll "g729b.acm"
>>
>> *loader/win32.c:*
>> static const struct exports exp_advapi32[]={
>> FF(InitializeSecurityDescriptor, -1)
>> ...
>> static WIN_BOOL
>> WINAPI expInitializeSecurityDescriptor(long security, int word)
>> {
>> WIN_BOOL result=InitializeSecurityDescriptor(security, word);
>> dbgprintf("InitializeSecurityDescriptor");
>> return result;
>> }
>>
>> *loader/registry.c:*
>> WIN_BOOL __stdcall InitializeSecurityDescriptor(long security, int word)
>> {
>> return 0;
>> }
>>
>> *loader/registry.h *
>> WIN_BOOL __stdcall InitializeSecurityDescriptor(long security, int word);
>>
>>
>> And this is what I am getting:
>>
>> -bash-4.1$ mplayer -v colo.wav -ao pcm:file=colooutput.wav
>> MPlayer SVN-r37401-snapshot-4.4.7 (C) 2000-2015 MPlayer Team
>>
>> Playing colo.wav.
>> get_path('sub/') -> '.mplayer/sub/'
>> [file] File size is 1124258 bytes
>> STREAM: [file] colo.wav
>> STREAM: Description: File
>> STREAM: Author: Albeu
>> STREAM: Comment: based on the code from ??? (probably Arpi)
>> libavformat version 56.25.101 (internal)
>> Configuration: --enable-gpl --enable-postproc
>> LAVF_check: WAV / WAVE (Waveform Audio)
>> Checking for YUV4MPEG2
>> ASF_check: not ASF guid!
>> Checking for REAL
>> Checking for SMJPEG
>> Searching demuxer type for filename colo.wav ext: .wav
>> Trying demuxer 17 based on filename extension
>> ==> Found audio stream: 0
>> ======= WAVE Format =======
>> Format Tag: 309 (0x135)
>> Channels: 2
>> Samplerate: 8000
>> avg byte/sec: 2181
>> Block align: 11
>> bits/sample: 0
>> cbSize: 0
>> ==========================================================================
>> demux_audio: audio data 0x3A - 0x1127A2
>> Audio only file format detected.
>> Load subtitles in .
>> get_path('sub/') -> '.mplayer/sub/'
>> ==========================================================================
>> Opening audio decoder: [acm] Win32/ACM decoders
>> Win32 (ACM) AUDIO Codec init =======
>> Input format:
>> ======= WAVE Format =======
>> Format Tag: 309 (0x135)
>> Channels: 2
>> Samplerate: 8000
>> avg byte/sec: 2181
>> Block align: 11
>> bits/sample: 0
>> cbSize: 0
>> ==========================================================================
>> Output format:
>> ======= WAVE Format =======
>> Format Tag: 1 (0x1)
>> Channels: 2
>> Samplerate: 8000
>> avg byte/sec: 32000
>> Block align: 4
>> bits/sample: 16
>> cbSize: 0
>> ==========================================================================
>>
>> ==========================================================================
>> Opening audio decoder: [acm] Win32/ACM decoders
>> Loading codec DLL: 'g729b_st.acm'
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/KERNEL32.dll
>> Win32 LoadLibrary failed to load: /usr/local/lib/codecs/ADVAPI32.dll
>> Loaded DLL driver g729b_st.acm at 10000000
>> ACM_Decoder: Unappropriate audio format
>> Could not load/initialize Win32/ACM audio codec (missing DLL file?).
>> ADecoder preinit failed :(
>> ADecoder init failed :(
>> Cannot find codec for audio format 0x135.
>> Audio: no sound
>> Video: no video
>>
>>
>> Exiting... (End of file)
>>
>> In there any way of getting more information? I have tried using gdb but
>> I get this:
>> Program exited normally.
>> Missing separate debuginfos, use: debuginfo-install
>> glibc-2.12-1.149.el6_6.9.i686 zlib-1.2.3-29.el6.i686
>>
>> I will install those packages and try again. In the meantime, if you
>> could suggest something, I would really appreciate.
>>
>> Thanks.
>>
>> On Mon, Aug 10, 2015 at 11:47 AM, Fernandon Bautista <
>> fernandobautista017 at gmail.com> wrote:
>>
>>> Thanks for your answer! I will try to go for the second approach and if
>>> it does not work, then I will ask you for this local version of mplayer for
>>> running on wine.
>>>
>>> On Sat, Aug 8, 2015 at 7:02 PM, Reimar Döffinger <
>>> Reimar.Doeffinger at gmx.de> wrote:
>>>
>>>> On Fri, Aug 07, 2015 at 12:25:48PM +0200, Fernandon Bautista wrote:
>>>> > 2) Compile 32 bit mplayer:
>>>>
>>>> I have a local hack I never finished that uses only
>>>> a 32 bit stub, in case that 32 bit MPlayer is an annoyance.
>>>> That stub can also be compiled as a Windows program to
>>>> be run via wine (actually that's the only way currently,
>>>> I haven't fixed it to support our loader).
>>>> It needs significant cleanup though, but if you might
>>>> consider going to that level of effort I can send it out.
>>>>
>>>> > Called unk_InitializeSecurityDescriptor
>>>> >
>>>> > I understand that there is not implementation of the
>>>> > InitializeSecurityDescriptor function. I took a look to the code and I
>>>> > understood that you grabbed some Wine code to emulate/fake system
>>>> calls .
>>>>
>>>> We actually don't emulate any system calls to my knowledge, only library
>>>> calls.
>>>>
>>>> > want to fix these and I was wondering if there is any doc or
>>>> guidelines
>>>> > for doing it.
>>>>
>>>> Not really.
>>>> Your starting point would be loader/win32.c
>>>> For this function, exp_advapi32 array.
>>>> Then mostly try a copy-paste of an existing function like RegCloseKey
>>>> (just search for all occurrences of that string), most importantly
>>>> adjust the function signature to match the real thing
>>>>
>>>> https://msdn.microsoft.com/en-us/library/windows/desktop/aa378863%28v=vs.85%29.aspx
>>>> and find out the least effort way to "implement" it that
>>>> makes the codec happy.
>>>> In that case I'd start by just returning 0 (i.e. error), and
>>>> hope they used the "just keep going when things go wrong"
>>>> strategy of error handling.
>>>> Alternatively and even simpler, hope they designed the codec
>>>> to work on win9x and use the UNDEFF macro instead.
>>>> Instead of providing a fake emulation, that one says "no,
>>>> that function does not exist", which would be like on
>>>> win9x.
>>>> _______________________________________________
>>>> MPlayer-users mailing list
>>>> MPlayer-users at mplayerhq.hu
>>>> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>>>
>>>
>>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.log
Type: application/octet-stream
Size: 14299 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20150930/e1c8c10a/attachment-0001.obj>
More information about the MPlayer-users
mailing list