<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">ср, 7 нояб. 2018 г. в 14:44, Paul B Mahol <<a href="mailto:onemda@gmail.com">onemda@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/7/18, Vasiliy Volkov <<a href="mailto:volk.vasiliy@gmail.com" target="_blank">volk.vasiliy@gmail.com</a>> wrote:<br>
> ср, 7 нояб. 2018 г. в 14:14, Paul B Mahol <<a href="mailto:onemda@gmail.com" target="_blank">onemda@gmail.com</a>>:<br>
><br>
>> On 11/7/18, Vasiliy Volkov <<a href="mailto:volk.vasiliy@gmail.com" target="_blank">volk.vasiliy@gmail.com</a>> wrote:<br>
>> > Hi, again,<br>
>> ><br>
>> > we've encountered an issue with decoding audio streams. Sometimes audio<br>
>> > codec headers are not aligned to PES packets (we work with mpegts). So<br>
>> when<br>
>> > we try to decode such streams libav decoder fails, because he can't<br>
>> > find<br>
>> > where to start decoding process. For such task libav has parsers, which<br>
>> > need to be used for correct decoding arbitrary bitstreams: first you<br>
>> > find<br>
>> > position of header, next send to decoder. We've find that there are<br>
>> exists<br>
>> > private api for such task: libavcodec/mpegaudiodecheader.h but it's<br>
>> > private, and using it in our project is not very clean way, and all<br>
>> public<br>
>> > API's requires to use avio* methods which we don't like to use.<br>
>> ><br>
>> > Is there any other of private API way to find audio frames headers<br>
>> > positions?<br>
>> ><br>
>><br>
>> What is wrong with using parsers?<br>
>><br>
><br>
> Parsers are private api and when we compile libav they are not included,<br>
> so we need to copy header file into our project and then access -- it's not<br>
> good way.<br>
<br>
Why they are not included when you compile FFmpeg?<br></blockquote><div><br></div><div>Paul, ok, we've found why they are not included :) Not all headers take into account in Makefile:</div><div><font face="monospace, monospace">libavcodec/Makefile<br></font></div><div><div><font face="monospace, monospace">HEADERS = ac3_parser.h                                                  \</font></div><div><font face="monospace, monospace">          adts_parser.h                                                 \</font></div><div><font face="monospace, monospace">          avcodec.h                                                     \</font></div><div><font face="monospace, monospace">          avdct.h                                                       \</font></div><div><font face="monospace, monospace">          avfft.h                                                       \</font></div><div><font face="monospace, monospace">          d3d11va.h                                                     \</font></div><div><font face="monospace, monospace">          dirac.h                                                       \</font></div><div><font face="monospace, monospace">          dv_profile.h                                                  \</font></div><div><font face="monospace, monospace">          dxva2.h                                                       \</font></div><div><font face="monospace, monospace">          jni.h                                                         \</font></div><div><font face="monospace, monospace">          mediacodec.h                                                  \</font></div><div><font face="monospace, monospace">          qsv.h                                                         \</font></div><div><font face="monospace, monospace">          vaapi.h                                                       \</font></div><div><font face="monospace, monospace">          vdpau.h                                                       \</font></div><div><font face="monospace, monospace">          version.h                                                     \</font></div><div><font face="monospace, monospace">          videotoolbox.h                                                \</font></div><div><font face="monospace, monospace">          vorbis_parser.h                                               \</font></div><div><font face="monospace, monospace">          xvmc.h                                                        \</font></div></div><div><br></div><div> And libavcodec/mpegaudiodecheader.h just not selected here.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> So what is the proper way?<br>
<br>
Proper way is to have parsers included, and to have them automatically used.<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div></div></div></div>