Menu

Remove Deprecated functions please...

user
JIA Pei
2009-03-12
2013-05-09
  • JIA Pei

    JIA Pei - 2009-03-12

    Just found FOBS is still using the two deprecated functions

    avcodec_decode_audio
    and
    img_convert

    Is there any possibility that you update the code to use
    avcodec_decode_audio2
    and
    sws_scale

    instead soon??

    Cheers
    JIA

     
  • Jeff Crouse

    Jeff Crouse - 2010-07-16

    I am also curious about this.  In Decoder::getRGB()  I have made an attempt.  I replaced lines 790(ish) through 793:

    ret = img_convert(rgbPicture, pix_fmt, ecodedPicture, dec->pix_fmt,  dec->width, dec->height);

    with this:

    SwsContext *pSWSCtx;
    pSWSCtx = sws_getContext(dec->width,dec->height,dec->pix_fmt,dec->width,dec >height, PIX_FMT_RGB24, SWS_BICUBIC, NULL,NULL,NULL);
    ret = sws_scale(pSWSCtx, decodedPicture->data, decodedPicture->linesize, 0, dec->height, rgbPicture->data, rgbPicture->linesize);
    sws_freeContext(pSWSCtx);

    But I get a EXC_BAD_ACCESS and I can't figure out why. I used several different sources I found just googling 'replace img_convert with sws_scale'. 

    I can't get the 13764 version of FFMPEG to compile on my machine, so I kind of need to take out these functions. 

    Otherwise, great work with FOBS.  It's really an amazing and very useful project.  Thanks!

     
  • Jeff Crouse

    Jeff Crouse - 2010-07-17

    Some more information:
    I am trying to compile on a MacBook Pro, Snow Leopard.  The version of ffmpeg that comes with FOBS compiles (as long as I specify -arch=x86_64 -enable-swscale -enable-gpl), but then when I build FOBS, it complains:

    Undefined symbols:
      "_img_convert", referenced from:
          omnividea::fobs::Decoder::getRGBA(char*)in Decoder.o
          omnividea::fobs::Decoder::getRGBA()   in Decoder.o
          omnividea::fobs::Decoder::getRGB()   in Decoder.o
          omnividea::fobs::Decoder::getLuminance()    in Decoder.o
          omnividea::fobs::Decoder::getRGB(int, int)in Decoder.o
          omnividea::fobs::Encoder::addRawFrame(AVPicture*, int, int, int)in Encoder.o

    I can also compile the current ffmpeg in subversion.  But that also leads to img_convert problems because that function no longer exists. 

    Any help would be greatly appreciated. 

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.