#ifndef _PL_ANDROIDMEDIACODECFILEFRAME_H_
|
#define _PL_ANDROIDMEDIACODECFILEFRAME_H_
|
|
#include "PipeLine.h"
|
|
struct PL_AndroidMediaCodecFileFrame_Config
|
{
|
char sz_path[256];
|
bool b_loop_play;
|
|
PL_AndroidMediaCodecFileFrame_Config() :
|
b_loop_play(false)
|
{
|
memset(sz_path,0,256);
|
}
|
};
|
|
class PL_AndroidMediaCodecFileFrame : public PipeLineElem
|
{
|
public:
|
PL_AndroidMediaCodecFileFrame();
|
virtual ~PL_AndroidMediaCodecFileFrame();
|
|
virtual bool init(void* args);
|
virtual void finit();
|
|
virtual bool pay(const PipeMaterial& pm);
|
virtual bool gain(PipeMaterial& pm);
|
|
private:
|
void* internal;
|
bool m_b_loop_play;
|
std::string m_str_context;
|
std::string m_str_old_context;
|
std::string m_str_buf;
|
int m_begin;
|
long long m_current_time;
|
|
private:
|
int write_file(const char*,const char*,int);
|
int read_file(const char*);
|
int analyse_context();
|
};
|
|
PipeLineElem* create_PL_AndroidMediaCodecFileFrame();
|
|
#endif
|