mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libeplayer3: rename player thread
This commit is contained in:
@@ -64,7 +64,7 @@ class Player {
|
|||||||
Manager manager;
|
Manager manager;
|
||||||
OpenThreads::Mutex chapterMutex;
|
OpenThreads::Mutex chapterMutex;
|
||||||
std::vector<Chapter> chapters;
|
std::vector<Chapter> chapters;
|
||||||
pthread_t supervisorThread;
|
pthread_t playThread;
|
||||||
|
|
||||||
bool abortRequested;
|
bool abortRequested;
|
||||||
bool isHttp;
|
bool isHttp;
|
||||||
@@ -83,7 +83,7 @@ class Player {
|
|||||||
bool noprobe; /* hack: only minimal probing in av_find_stream_info */
|
bool noprobe; /* hack: only minimal probing in av_find_stream_info */
|
||||||
|
|
||||||
void SetChapters(std::vector<Chapter> &Chapters);
|
void SetChapters(std::vector<Chapter> &Chapters);
|
||||||
static void* SupervisorThread(void*);
|
static void* playthread(void*);
|
||||||
public:
|
public:
|
||||||
bool SwitchAudio(int pid);
|
bool SwitchAudio(int pid);
|
||||||
bool SwitchVideo(int pid);
|
bool SwitchVideo(int pid);
|
||||||
|
@@ -40,7 +40,7 @@ Player::Player()
|
|||||||
hasThreadStarted = false;
|
hasThreadStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *Player::SupervisorThread(void *arg)
|
void *Player::playthread(void *arg)
|
||||||
{
|
{
|
||||||
char threadname[17];
|
char threadname[17];
|
||||||
strncpy(threadname, __func__, sizeof(threadname));
|
strncpy(threadname, __func__, sizeof(threadname));
|
||||||
@@ -121,14 +121,14 @@ bool Player::Play()
|
|||||||
Speed = 1;
|
Speed = 1;
|
||||||
|
|
||||||
if (!hasThreadStarted) {
|
if (!hasThreadStarted) {
|
||||||
int err = pthread_create(&supervisorThread, NULL, SupervisorThread, this);
|
int err = pthread_create(&playThread, NULL, playthread, this);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
fprintf(stderr, "%s %s %d: pthread_create: %d (%s)\n", __FILE__, __func__, __LINE__, err, strerror(err));
|
fprintf(stderr, "%s %s %d: pthread_create: %d (%s)\n", __FILE__, __func__, __LINE__, err, strerror(err));
|
||||||
ret = false;
|
ret = false;
|
||||||
isPlaying = false;
|
isPlaying = false;
|
||||||
} else {
|
} else {
|
||||||
pthread_detach(supervisorThread);
|
pthread_detach(playThread);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user