mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3: implement Playback and Input classes
This commit is contained in:
@@ -1,25 +1,63 @@
|
||||
#ifndef COMMON_H_
|
||||
#define COMMON_H_
|
||||
#ifndef __PLAYER_H__
|
||||
#define __PLAYER_H__
|
||||
|
||||
#include <OpenThreads/ScopedLock>
|
||||
#include <OpenThreads/Thread>
|
||||
#include <OpenThreads/Condition>
|
||||
|
||||
extern "C" {
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavutil/time.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libswresample/swresample.h>
|
||||
#include <libavutil/opt.h>
|
||||
}
|
||||
|
||||
#include "container.h"
|
||||
#include "output.h"
|
||||
#include "manager.h"
|
||||
#include "playback.h"
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
|
||||
class Player {
|
||||
public: //FIXME
|
||||
PlaybackHandler_t *playback;
|
||||
ContainerHandler_t *container;
|
||||
int64_t *currentAudioPtsP;
|
||||
public:
|
||||
Player();
|
||||
~Player();
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
Output output;
|
||||
Manager manager;
|
||||
#include "input.h"
|
||||
#include "output.h"
|
||||
#include "manager.h"
|
||||
#include "playback.h"
|
||||
#include "player.h"
|
||||
|
||||
struct Chapter
|
||||
{
|
||||
std::string title;
|
||||
double start;
|
||||
double end;
|
||||
};
|
||||
|
||||
int container_ffmpeg_update_tracks(Player * context, const char *filename);
|
||||
class Player {
|
||||
friend class Input;
|
||||
friend class Output;
|
||||
friend class Manager;
|
||||
friend class Playback;
|
||||
friend class cPlayback;
|
||||
private:
|
||||
Input input;
|
||||
Output output;
|
||||
Manager manager;
|
||||
Playback playback;
|
||||
OpenThreads::Mutex chapterMutex;
|
||||
std::vector<Chapter> chapters;
|
||||
public: //FIXME
|
||||
int64_t *currentAudioPtsP;
|
||||
public:
|
||||
Player()
|
||||
{
|
||||
input.context = this;
|
||||
output.context = this;
|
||||
playback.context = this;
|
||||
manager.context = this;
|
||||
}
|
||||
|
||||
bool GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
|
||||
void SetChapters(std::vector<Chapter> &Chapters);
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user