Skip to content

Instantly share code, notes, and snippets.

@dreamcat4
Last active August 29, 2015 14:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dreamcat4/240e9e4bb32467dc4316 to your computer and use it in GitHub Desktop.
/*
Older versions of ffmpeg/libav don't have the AV_* prefix
For version info please see:
https://github.com/libav/libav/blob/a7153444df9040bf6ae103e0bbf6104b66f974cb/doc/APIchanges#L450-455
https://github.com/FFmpeg/FFmpeg/blob/97478ef5fe7dd2ff8da98e381de4a6b2b979b485/doc/APIchanges#L811-816
This list must be updated every time we use a new AV_CODEC_ID
*/
#ifndef AV_CODEC_ID_NONE
#define AVCodecID CodecID
#define AV_CODEC_ID_AAC CODEC_ID_AAC
#define AV_CODEC_ID_AC3 CODEC_ID_AC3
#define AV_CODEC_ID_DVB CODEC_ID_DVB
#define AV_CODEC_ID_EAC3 CODEC_ID_EAC3
#define AV_CODEC_ID_H264 CODEC_ID_H264
#define AV_CODEC_ID_MP2 CODEC_ID_MP2
#define AV_CODEC_ID_MPEG2VIDEO CODEC_ID_MPEG2VIDEO
#define AV_CODEC_ID_NONE CODEC_ID_NONE
#define AV_CODEC_ID_TEXT CODEC_ID_TEXT
#define AV_CODEC_ID_VORBIS CODEC_ID_VORBIS
#define AV_CODEC_ID_VP8 CODEC_ID_VP8
#endif
@dreamcat4
Copy link
Author

For tvheadend/tvheadend

@DerPate2010 - This should be sufficient for backwards compatibility. Just add on-top of kvaster's .56 patch:

dreamcat4/tvheadend@d18bc8d

Freenode / #hts
P.S. please let me know if @DerPate2010 is in fact your Github ID.

@dreamcat4
Copy link
Author

This is still need to look into:

https://github.com/FFmpeg/FFmpeg/blob/97478ef5fe7dd2ff8da98e381de4a6b2b979b485/doc/APIchanges#L1029-1034
https://github.com/libav/libav/blob/a7153444df9040bf6ae103e0bbf6104b66f974cb/doc/APIchanges#L657-662

[16:33] < DerPat> Well in my version it seems that the deprecated avcodec_encode_video was dropped.
[16:34] < DerPat> I'm trying to rewrite the transcode code to use avcodec_encode_video2
[16:46] < dreamcat4> DerPat: what is your version? mine is from ffmpeg 2.24 (libavcodec.so=55.52.102)
[16:47] < DerPat> Strage, mein is libavcodec.so.55.34.1
[16:47] < DerPat> mine
[16:48] < DerPat> But it's definately missing avcodec_encode_audio, avcodec_decode_audio3 and avcodec_encode_video
[16:48] < DerPat> All of them are marked as deprecated
[16:50] < DerPat> Well, never the less we should get rid off those deprecated functions.
[16:50] < DerPat> right?
[16:56] < dreamcat4> DerPat: i usually struggle with understanding this stuff. if the function is deprecated..
[16:57] < dreamcat4> that means it probably still works (for now). of course it would be great to take out OR make some switch / wrapper
[16:57] < dreamcat4> depending the libav version. i.e. feature-based configuration
[17:28] < DerPat> dreamcat4: A wraper is not that easy, because at least for audio the struct must be altered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment