[osg-users] Problem compiling latest trunk, ffmpeg problem

Robert Osfield robert.osfield at gmail.com
Mon Mar 2 04:00:30 PST 2009


Hi J.P,

I'm currently looking at introducing using of sws_scale, but don't
find these methods in the ffmpeg I built.  Looking at the links to the
mailing list thread you provided I could quite work out whether these
methods require the sws library to be built, or whether there would be
sws_ functions in other ffmpeg libs, and if so then would have to
guess that they are only in an svn rev later/earlier than the one I
have.

Could you provide any more clarity on which rev of ffmpeg I'd need +
and what build options.  My aim is to be able to use off the self
versions of ffmpeg from linux repositories as well svn versions of
ffmpeg.

Robert.

On Sat, Feb 28, 2009 at 10:38 AM, J.P. Delport <jpdelport at csir.co.za> wrote:
> Hi,
>
>>> I'll send some references and code later.
>>
>> See e.g. here:
>> http://lists.mplayerhq.hu/pipermail/libav-user/2008-November/001618.html
>> and
>> http://lists.mplayerhq.hu/pipermail/libav-user/2008-June/000683.html
>
> e.g.
> img_convert vs swscale
>
> ---8<---
> #if defined IPF_USE_SWSCALE
> int err = sws_scale(ConvertToSaveCtx_,
>        InputFrame_->data, InputFrame_->linesize, 0, cc->height,
>        SaveFrame_->data, SaveFrame_->linesize);
> #else
>    img_convert((AVPicture *)SaveFrame_, cc->pix_fmt,
>                (AVPicture *)InputFrame_, InputFrameFormat_,
>                cc->width, cc->height);
> #endif
>
> You have to create the swscale context earlier, e.g.
>
>    ConvertToSaveCtx_ = sws_getContext(ImageFormat_.getWidth(),
> ImageFormat_.getHeight(), InputFrameFormat_,
>                                       ImageFormat_.getWidth(),
> ImageFormat_.getHeight(), SaveFrameFormat_,
>
>                                       SWS_BILINEAR, NULL, NULL, NULL);
>
> ---8<---
>
> One other thing that changed at some stage was this. The version might have
> to be tuned:
>
> #if LIBAVFORMAT_VERSION_INT > ((52<<16) + (1<<8) + 0)
>    url_fclose(FormatContext_->pb);
> #else
>    url_fclose(&FormatContext_->pb);
> #endif
>
> ---8<---
>
>
> jp
>
> --
> This message is subject to the CSIR's copyright terms and conditions, e-mail
> legal notice, and implemented Open Document Format (ODF) standard. The full
> disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.  MailScanner thanks Transtec
> Computers for their support.
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list