FFmpeg big changes. ffmpeg 接口的一些改变

Big changes have been made from FFmpeg 0.5.1…

Refer to http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/deprecated.html
Apparently, the above list is not a full list.

Quote:
1) CODEC_TYPE_VIDEO -> AVMEDIA_TYPE_VIDEO
CODEC_TYPE_AUDIO -> AVMEDIA_TYPE_AUDIO
CODEC_TYPE_SUBTITLE -> AVMEDIA_TYPE_SUBTITLE
3) PKT_FLAG_KEY -> AV_PKT_FLAG_KEY
4) av_open_input_file -> avformat_open_input
av_open_input_stream -> avformat_open_input
5) ByteIOContext -> AVIOContext
6) dump_format -> av_dump_format
7) avcodec_get_pix_fmt_name -> av_get_pix_fmt_name
8) av_set_parameters -> avformat_write_header
9) av_write_header -> avformat_write_header
10) sws_getContext -> sws_getCachedContext
11) url_fopen -> avio_open
url_fclose -> avio_close
12) URL_WRONLY -> AVIO_FLAG_WRITE

Additionally, refer to
libavformat\aviobuf.c

Quote:
int init_put_byte(AVIOContext *s,
unsigned char *buffer,
int buffer_size,
int write_flag,
void *opaque,
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
int64_t (*seek)(void *opaque, int64_t offset, int whence))
{
return ffio_init_context(s, buffer, buffer_size, write_flag, opaque,
read_packet, write_packet, seek);
}

BTW, how to deal with the bug

Quote:
error C3861: ‘UINT64_C’: identifier not found

The solution is to add

Quote:
#ifndef INT64_C
#define INT64_C(c) (c ## LL)
#define UINT64_C(c) (c ## ULL)
#endif

into file

Quote:
libavutil\common.h

Best Regards
Pei

 

libav now is used to replace ffmpeg.

http://libav.org/

 

libav-win32-20120806

Quote:
av_new_stream -> avformat_new_stream
avcodec_get_context_defaults2 -> avcodec_get_context_defaults3

Lots of changes !!!

Cheers
Pei

 

Quote:
p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE };

->

Quote:
const enum PixelFormat px[] = { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE };
p = px;
 
http://www.visionopen.com/forums/topic/ffmpeg-big-changes/
仅仅复制,未整理
 
AVCODEC_MAX_AUDIO_FRAME_SIZE -> MAX_AUDIO_FRAME_SIZE

你可能感兴趣的:(ffmpeg)