/**
|
* 叶海辉
|
* QQ群121376426
|
* http://blog.yundiantech.com/
|
*/
|
|
#ifndef VIDEOPLAYERHK_H
|
#define VIDEOPLAYERHK_H
|
|
#include "media_player.h"
|
#include "VideoPlayer.h"
|
|
/**
|
* @brief The VideoPlayer class
|
* 用到了c++11的语法,需要编译器开启c++11支持
|
* 播放器类,纯c++实现,方便移植,与界面的交互通过回调函数的方式实现
|
*/
|
|
class VideoPlayerHK : public VideoPlayer
|
{
|
public:
|
VideoPlayerHK();
|
~VideoPlayerHK();
|
|
bool startPlay(const std::string &filePath, int videoType = 0);
|
int64_t getTotalTime(); //单位微秒
|
|
public:
|
int mVideoType;
|
DataCallback *parseCB;
|
|
private:
|
void readVideoFile(); //读取视频文件
|
void decodeVideoThread();
|
int decodeAudioFrame(bool isBlock = false);
|
};
|
|
|
#endif // VIDEOPLAYER_H
|