Thanks Javier, the changes now compile fine for me.  Now merged and
submitted to svn/trunk.

On 21 January 2015 at 17:55, Javier Taibo <[email protected]> wrote:

>   Hi Robert,
>
>   It seems that libav does not have a channels attribute in AVFrame
> structure. This new version should do. Now I tested it with the libav in
> Ubuntu 14.04.
>
>   Btw, I noticed that, though SWSCALE is supposed to be optional, the
> plug-in code does not compile if it is not present. It crashes because
> "img_convert" is not defined (called from FFmpegDecoderVideo::convert). I
> couldn't find this function in OSG or FFMPEG code. Where is it supposed to
> be defined?
>
>   Anyway, with libswscale present it compiles ok. Now with both ffmpeg and
> libav.
>
>
>   Regards,
>
>
> On Tue, Jan 20, 2015 at 3:31 PM, Robert Osfield <[email protected]>
> wrote:
>
>> HI Javier,
>>
>> Thanks for the second attempt, alas still a build failure:
>>
>> /home/robert/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:50:61:
>> error: 'av_frame_get_channels' was not declared in this scope
>>      if (ret >= 0 && got_frame && av_frame_get_channels(frame)>0) {
>>
>>
>> Robert.
>>
>> On 19 January 2015 at 19:14, Javier Taibo <[email protected]> wrote:
>>
>>>   My fault! Sorry  O:-)
>>>
>>>   This is the right way to do it
>>>
>>>
>>>
>>> On Mon, Jan 19, 2015 at 11:39 AM, Robert Osfield <
>>> [email protected]> wrote:
>>>
>>>> Hi Javier,
>>>>
>>>> I have just merged your change but get the follow compile error:
>>>>
>>>> /home/robert/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:
>>>> In function 'int osgFFmpeg::decode_audio(AVCodecContext*, int16_t*, int*,
>>>> const uint8_t*, int, AVAudioResampleContext*, int, int, AVSampleFormat)':
>>>> /home/robert/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp:50:41:
>>>> error: 'AVFrame' has no member named 'channels'
>>>>      if (ret >= 0 && got_frame && frame->channels>0) {
>>>>
>>>>
>>>> These are the versions of my various libav* libraries on my Kubuntu
>>>> 14.10 system:
>>>>
>>>> robert@bracklin:~/OpenSceneGraph$ pkg-config --modversion libavutil
>>>> 54.3.0
>>>> robert@bracklin:~/OpenSceneGraph$ pkg-config --modversion libavformat
>>>> 56.1.0
>>>> robert@bracklin:~/OpenSceneGraph$ pkg-config --modversion libavdevice
>>>> 55.0.0
>>>> robert@bracklin:~/OpenSceneGraph$ pkg-config --modversion libavcodec
>>>> 56.1.0
>>>> robert@bracklin:~/OpenSceneGraph$ pkg-config --modversion libavresample
>>>> 2.1.0
>>>>
>>>> I'm guessing we'll need use another API or simply comment out this new
>>>> check for older versions of ffmpeg than the one you have.
>>>>
>>>> Thoughts?
>>>> Robert.
>>>>
>>>> _______________________________________________
>>>> osg-submissions mailing list
>>>> [email protected]
>>>>
>>>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Javier Taibo
>>>
>>>
>>> _______________________________________________
>>> osg-submissions mailing list
>>> [email protected]
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>>
>>>
>>
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>>
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>>
>
>
> --
> Javier Taibo
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to