AVTranscoder.h
609 字节
#pragma once
#include "AVDecoder.h"
class CAVTranscoder
{
public:
CAVTranscoder();
virtual ~CAVTranscoder();
int add(media_info & info);
int64_t transcode();
bool all_processed();
int close();
protected:
int open_output_file(const char *filename);
protected:
vector < CAVDecoder *> _decoders;
AVFormatContext *ofmt_ctx;
int64_t _start_time;
int64_t _cur_a_time;
int64_t _cur_v_time;
private:
int mix_and_output_vframe(vector<CAVDecoder *> & decoders_got_frame);
int mix_and_output_aframe(vector<CAVDecoder *> & decoders_got_frame);
bool _all_processed;
};