Revert "move libthread to libstb-hal"

This reverts commit 95ee7f9e98.
This commit is contained in:
max_10
2018-09-20 17:42:13 +02:00
committed by Thilo Graf
parent 10710b9b53
commit 1aece863c1
23 changed files with 85 additions and 272 deletions

View File

@@ -104,7 +104,7 @@ int cAudio::Start(void)
{
lt_debug("%s >\n", __func__);
if (! HAL_nodec)
Thread::startThread();
SimpleThread::startThread();
lt_debug("%s <\n", __func__);
return 0;
}
@@ -115,7 +115,7 @@ int cAudio::Stop(void)
if (thread_started)
{
thread_started = false;
Thread::joinThread();
SimpleThread::joinThread();
}
lt_debug("%s <\n", __func__);
return 0;

View File

@@ -4,7 +4,6 @@
#define _AUDIO_LIB_H_
#include <stdint.h>
#include <thread_abstraction.h>
#include "cs_types.h"
typedef enum
@@ -38,7 +37,7 @@ typedef enum
AUDIO_FMT_ADVANCED = AUDIO_FMT_MLP
} AUDIO_FORMAT;
class cAudio : public Thread
class cAudio : public SimpleThread
{
friend class cPlayback;
private:

View File

@@ -64,15 +64,12 @@ static const char *DMX_T[] = {
};
/* map the device numbers. for now only demux0 is used */
#define NUM_DEMUXDEV 1
static const char *devname[NUM_DEMUXDEV] = {
static const char *devname[] = {
"/dev/dvb/adapter0/demux0",
"/dev/dvb/adapter0/demux0",
"/dev/dvb/adapter0/demux0"
};
#define NUM_DEMUX 1
static int dmx_source[NUM_DEMUX] = { 0 };
// static bool init[NUM_DEMUXDEV] = { false };
/* uuuugly */
static int dmx_tp_count = 0;
#define MAX_TS_COUNT 8
@@ -492,28 +489,12 @@ int cDemux::getUnit(void)
bool cDemux::SetSource(int unit, int source)
{
//lt_info_c("%s(%d, %d): not implemented yet\n", __func__, unit, source);
//return true;
if (unit >= NUM_DEMUX || unit < 0) {
lt_info_c("%s: unit (%d) out of range, NUM_DEMUX %d\n", __func__, unit, NUM_DEMUX);
return false;
}
lt_info_c("%s(%d, %d) => %d to %d\n", __func__, unit, source, dmx_source[unit], source);
if (source < 0 || source >= NUM_DEMUXDEV)
lt_info_c("%s(%d, %d) ERROR: source %d out of range!\n", __func__, unit, source, source);
else
dmx_source[unit] = source;
lt_info_c("%s(%d, %d): not implemented yet\n", __func__, unit, source);
return true;
}
int cDemux::GetSource(int unit)
{
//lt_info_c("%s(%d): not implemented yet\n", __func__, unit);
//return 0;
if (unit >= NUM_DEMUX || unit < 0) {
lt_info_c("%s: unit (%d) out of range, NUM_DEMUX %d\n", __func__, unit, NUM_DEMUX);
return -1;
}
lt_info_c("%s(%d) => %d\n", __func__, unit, dmx_source[unit]);
return dmx_source[unit];
lt_info_c("%s(%d): not implemented yet\n", __func__, unit);
return 0;
}

View File

@@ -97,7 +97,7 @@ GLFramebuffer::GLFramebuffer(int x, int y): mReInit(true), mShutDown(false), mIn
if (input_fd < 0)
lt_info("%s: could not open /tmp/neutrino.input FIFO: %m\n", __func__);
initKeys();
Thread::startThread();
SimpleThread::startThread();
while (!mInitDone)
usleep(1);
}
@@ -105,7 +105,7 @@ GLFramebuffer::GLFramebuffer(int x, int y): mReInit(true), mShutDown(false), mIn
GLFramebuffer::~GLFramebuffer()
{
mShutDown = true;
Thread::joinThread();
SimpleThread::joinThread();
if (input_fd >= 0)
close(input_fd);
}

View File

@@ -18,8 +18,8 @@
#ifndef __glthread__
#define __glthread__
#include <thread_abstraction.h>
#include <mutex_abstraction.h>
#include "../common/thread_abstraction.h"
#include "../common/mutex_abstraction.h"
#include <vector>
#include <map>
@@ -31,7 +31,7 @@ extern "C" {
#include <libavutil/rational.h>
}
class GLFramebuffer : public Thread
class GLFramebuffer : public SimpleThread
{
public:
GLFramebuffer(int x, int y);

View File

@@ -145,7 +145,7 @@ int cVideo::Start(void *, unsigned short, unsigned short, void *)
{
lt_debug("%s running %d >\n", __func__, thread_running);
if (!thread_running && !HAL_nodec)
Thread::startThread();
SimpleThread::startThread();
lt_debug("%s running %d <\n", __func__, thread_running);
return 0;
}
@@ -155,7 +155,7 @@ int cVideo::Stop(bool)
lt_debug("%s running %d >\n", __func__, thread_running);
if (thread_running) {
thread_running = false;
Thread::joinThread();
SimpleThread::joinThread();
}
lt_debug("%s running %d <\n", __func__, thread_running);
return 0;

View File

@@ -1,8 +1,8 @@
#ifndef _VIDEO_LIB_H
#define _VIDEO_LIB_H
#include <thread_abstraction.h>
#include <mutex_abstraction.h>
#include "../common/thread_abstraction.h"
#include "../common/mutex_abstraction.h"
#include <vector>
#include <linux/dvb/video.h>
#include "cs_types.h"
@@ -121,7 +121,7 @@ typedef enum
#define VDEC_MAXBUFS 0x30
class cVideo : public Thread
class cVideo : public SimpleThread
{
friend class GLFramebuffer;
friend class cDemux;