mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 23:43:00 +02:00
generic-pc: allow to disable softdecoder for debugging
This commit is contained in:
@@ -45,12 +45,15 @@ extern cDemux *audioDemux;
|
||||
static uint8_t *dmxbuf = NULL;
|
||||
static int bufpos;
|
||||
|
||||
extern bool HAL_nodec;
|
||||
|
||||
static cAudio *gThiz = NULL;
|
||||
|
||||
cAudio::cAudio(void *, void *, void *)
|
||||
{
|
||||
thread_started = false;
|
||||
dmxbuf = (uint8_t *)malloc(DMX_BUF_SZ);
|
||||
if (!HAL_nodec)
|
||||
dmxbuf = (uint8_t *)malloc(DMX_BUF_SZ);
|
||||
bufpos = 0;
|
||||
curr_pts = 0;
|
||||
gThiz = this;
|
||||
@@ -89,7 +92,8 @@ int cAudio::setVolume(unsigned int left, unsigned int right)
|
||||
int cAudio::Start(void)
|
||||
{
|
||||
lt_info("%s >\n", __func__);
|
||||
OpenThreads::Thread::start();
|
||||
if (! HAL_nodec)
|
||||
OpenThreads::Thread::start();
|
||||
lt_info("%s <\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -76,6 +76,8 @@ static const char *devname[] = {
|
||||
static int dmx_tp_count = 0;
|
||||
#define MAX_TS_COUNT 8
|
||||
|
||||
extern bool HAL_nodec;
|
||||
|
||||
cDemux::cDemux(int n)
|
||||
{
|
||||
if (n < 0 || n > 2)
|
||||
@@ -383,10 +385,14 @@ bool cDemux::pesFilter(const unsigned short pid)
|
||||
case DMX_AUDIO_CHANNEL:
|
||||
p_flt.pes_type = DMX_PES_OTHER;
|
||||
p_flt.output = DMX_OUT_TSDEMUX_TAP;
|
||||
if (HAL_nodec) /* no need to demux if we don't decode... */
|
||||
return true;
|
||||
break;
|
||||
case DMX_VIDEO_CHANNEL:
|
||||
p_flt.pes_type = DMX_PES_OTHER;
|
||||
p_flt.output = DMX_OUT_TSDEMUX_TAP;
|
||||
if (HAL_nodec)
|
||||
return true;
|
||||
break;
|
||||
case DMX_PES_CHANNEL:
|
||||
p_flt.pes_type = DMX_PES_OTHER;
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
static bool initialized = false;
|
||||
GLFramebuffer *glfb = NULL;
|
||||
bool HAL_nodec = false;
|
||||
|
||||
void init_td_api()
|
||||
{
|
||||
@@ -35,6 +36,10 @@ void init_td_api()
|
||||
|
||||
glfb = new GLFramebuffer(x, y); /* hard coded to PAL resolution for now */
|
||||
}
|
||||
/* allow disabling of Audio/video decoders in case we just want to
|
||||
* valgrind-check other parts... export HAL_NOAVDEC=1 */
|
||||
if (getenv("HAL_NOAVDEC"))
|
||||
HAL_nodec = true;
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
|
@@ -50,6 +50,8 @@ extern cDemux *videoDemux;
|
||||
extern GLFramebuffer *glfb;
|
||||
int system_rev = 0;
|
||||
|
||||
extern bool HAL_nodec;
|
||||
|
||||
static uint8_t *dmxbuf;
|
||||
static int bufpos;
|
||||
|
||||
@@ -66,7 +68,8 @@ cVideo::cVideo(int, void *, void *)
|
||||
{
|
||||
lt_debug("%s\n", __func__);
|
||||
av_register_all();
|
||||
dmxbuf = (uint8_t *)malloc(DMX_BUF_SZ);
|
||||
if (!HAL_nodec)
|
||||
dmxbuf = (uint8_t *)malloc(DMX_BUF_SZ);
|
||||
bufpos = 0;
|
||||
thread_running = false;
|
||||
w_h_changed = false;
|
||||
@@ -135,7 +138,7 @@ int cVideo::setCroppingMode(int)
|
||||
int cVideo::Start(void *, unsigned short, unsigned short, void *)
|
||||
{
|
||||
lt_info("%s running %d >\n", __func__, thread_running);
|
||||
if (!thread_running)
|
||||
if (!thread_running && !HAL_nodec)
|
||||
OpenThreads::Thread::start();
|
||||
lt_info("%s running %d <\n", __func__, thread_running);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user