AVDecoder.h
796 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "AudioDecoder.h"
#include "VideoDecoder.h"
class CAVDecoder
{
public:
CAVDecoder();
virtual ~CAVDecoder();
int add(media_info &info);
unsigned int getuid();
bool get_one_a_frame();
bool get_one_v_frame();
int64_t _cur_a_ts_ms;
int64_t _cur_v_ts_ms;
media_role _media_role;
AVFrame * _cur_a_frame;
AVFrame * _cur_v_frame;
protected:
list<media_info> _video_info;
list<media_info> _audio_info;
CAudioDecoder _audio_decoder;
CVideoDecoder _video_decoder;
int64_t _a_start_time_ms;
int64_t _a_end_time_ms;
int64_t _v_start_time_ms;
int64_t _v_end_time_ms;
int64_t _end_time_ms;
private:
AVFrame * get_blank_frame();
AVFrame * get_silence_frame();
public:
void free_cur_a_frame();
void free_cur_v_frame();
};