mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
spark: add demuxer init hack
Origin commit data
------------------
Branch: master
Commit: ea7a8428f0
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-09-29 (Sat, 29 Sep 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <linux/dvb/dmx.h>
|
||||||
|
|
||||||
#include "lirmp_input.h"
|
#include "lirmp_input.h"
|
||||||
#include "pwrmngr.h"
|
#include "pwrmngr.h"
|
||||||
|
|
||||||
@@ -32,6 +34,24 @@ void init_td_api()
|
|||||||
start_input_thread();
|
start_input_thread();
|
||||||
else
|
else
|
||||||
lt_info("%s: lircd pidfile present, not starting input thread\n", __func__);
|
lt_info("%s: lircd pidfile present, not starting input thread\n", __func__);
|
||||||
|
|
||||||
|
/* this is a strange hack: the drivers seem to only work correctly after
|
||||||
|
* demux0 has been used once. After that, we can use demux1,2,... */
|
||||||
|
struct dmx_pes_filter_params p;
|
||||||
|
int dmx = open("/dev/dvb/adapter0/demux0", O_RDWR|O_CLOEXEC);
|
||||||
|
if (dmx < 0)
|
||||||
|
lt_info("%s: ERROR open /dev/dvb/adapter0/demux0 (%m)\n", __func__);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
memset(&p, 0, sizeof(p));
|
||||||
|
p.output = DMX_OUT_DECODER;
|
||||||
|
p.input = DMX_IN_FRONTEND;
|
||||||
|
p.flags = DMX_IMMEDIATE_START;
|
||||||
|
p.pes_type = DMX_PES_VIDEO;
|
||||||
|
ioctl(dmx, DMX_SET_PES_FILTER, &p);
|
||||||
|
ioctl(dmx, DMX_STOP);
|
||||||
|
close(dmx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
initialized = true;
|
initialized = true;
|
||||||
lt_info("%s end\n", __FUNCTION__);
|
lt_info("%s end\n", __FUNCTION__);
|
||||||
|
Reference in New Issue
Block a user