change libeplayer3 to own thread class

This commit is contained in:
smogm
2015-01-12 20:26:52 +01:00
parent 46166da4ec
commit 9ed0a0d244
8 changed files with 47 additions and 55 deletions

View File

@@ -26,9 +26,7 @@
#include <vector>
#include <map>
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Thread>
#include <OpenThreads/Condition>
#include <scoped_lock.h>
extern "C" {
#include <libavutil/avutil.h>
@@ -48,7 +46,7 @@ class Input
friend int interrupt_cb(void *arg);
private:
OpenThreads::Mutex mutex;
Mutex mutex;
Track *videoTrack;
Track *audioTrack;

View File

@@ -26,9 +26,7 @@
#include <vector>
#include <map>
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Thread>
#include <OpenThreads/Condition>
#include <scoped_lock.h>
extern "C" {
#include <libavutil/avutil.h>
@@ -66,7 +64,7 @@ class Manager
private:
Player *player;
OpenThreads::Mutex mutex;
Mutex mutex;
std::map<int,Track*> videoTracks, audioTracks, subtitleTracks, teletextTracks;
std::map<int,Program> Programs;
void addTrack(std::map<int,Track*> &tracks, Track &track);

View File

@@ -26,9 +26,7 @@
#include <vector>
#include <map>
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Thread>
#include <OpenThreads/Condition>
#include <scoped_lock.h>
extern "C" {
#include <libavutil/avutil.h>
@@ -50,7 +48,7 @@ class Output
int videofd;
int audiofd;
Writer *videoWriter, *audioWriter;
OpenThreads::Mutex audioMutex, videoMutex;
Mutex audioMutex, videoMutex;
AVStream *audioStream, *videoStream;
Player *player;
public:

View File

@@ -21,9 +21,7 @@
#ifndef __PLAYER_H__
#define __PLAYER_H__
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Thread>
#include <OpenThreads/Condition>
#include <scoped_lock.h>
extern "C" {
#include <libavutil/avutil.h>
@@ -63,7 +61,7 @@ class Player {
Input input;
Output output;
Manager manager;
OpenThreads::Mutex chapterMutex;
Mutex chapterMutex;
std::vector<Chapter> chapters;
pthread_t playThread;