mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
spark: let cRecord use the demux passed as parameter
This commit is contained in:
@@ -22,13 +22,14 @@ void *execute_record_thread(void *c)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cRecord::cRecord(int /*num*/)
|
cRecord::cRecord(int num)
|
||||||
{
|
{
|
||||||
lt_info("%s\n", __func__);
|
lt_info("%s %d\n", __func__, num);
|
||||||
dmx = NULL;
|
dmx = NULL;
|
||||||
record_thread_running = false;
|
record_thread_running = false;
|
||||||
file_fd = -1;
|
file_fd = -1;
|
||||||
exit_flag = RECORD_STOPPED;
|
exit_flag = RECORD_STOPPED;
|
||||||
|
dmx_num = num;
|
||||||
}
|
}
|
||||||
|
|
||||||
cRecord::~cRecord()
|
cRecord::~cRecord()
|
||||||
@@ -59,7 +60,7 @@ bool cRecord::Start(int fd, unsigned short vpid, unsigned short * apids, int num
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!dmx)
|
if (!dmx)
|
||||||
dmx = new cDemux(1);
|
dmx = new cDemux(dmx_num);
|
||||||
|
|
||||||
dmx->Open(DMX_TP_CHANNEL, NULL, 512*1024);
|
dmx->Open(DMX_TP_CHANNEL, NULL, 512*1024);
|
||||||
dmx->pesFilter(vpid);
|
dmx->pesFilter(vpid);
|
||||||
|
@@ -17,6 +17,7 @@ class cRecord
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int file_fd;
|
int file_fd;
|
||||||
|
int dmx_num;
|
||||||
cDemux *dmx;
|
cDemux *dmx;
|
||||||
pthread_t record_thread;
|
pthread_t record_thread;
|
||||||
bool record_thread_running;
|
bool record_thread_running;
|
||||||
|
Reference in New Issue
Block a user