From e75bd2bcd25b7a0f20af3dceee9bac4ea6e12775 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 22 Sep 2012 11:09:30 +0200 Subject: [PATCH] spark: let cRecord use the demux passed as parameter Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/f0cee92240cac3a9838263400411ae23c1bcb8be Author: Stefan Seyfried Date: 2012-09-22 (Sat, 22 Sep 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libspark/record.cpp | 7 ++++--- libspark/record_lib.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libspark/record.cpp b/libspark/record.cpp index 0af74b3..79d1f5f 100644 --- a/libspark/record.cpp +++ b/libspark/record.cpp @@ -22,13 +22,14 @@ void *execute_record_thread(void *c) return NULL; } -cRecord::cRecord(int /*num*/) +cRecord::cRecord(int num) { - lt_info("%s\n", __func__); + lt_info("%s %d\n", __func__, num); dmx = NULL; record_thread_running = false; file_fd = -1; exit_flag = RECORD_STOPPED; + dmx_num = num; } cRecord::~cRecord() @@ -59,7 +60,7 @@ bool cRecord::Start(int fd, unsigned short vpid, unsigned short * apids, int num int i; if (!dmx) - dmx = new cDemux(1); + dmx = new cDemux(dmx_num); dmx->Open(DMX_TP_CHANNEL, NULL, 512*1024); dmx->pesFilter(vpid); diff --git a/libspark/record_lib.h b/libspark/record_lib.h index 8b882d6..e918e64 100644 --- a/libspark/record_lib.h +++ b/libspark/record_lib.h @@ -17,6 +17,7 @@ class cRecord { private: int file_fd; + int dmx_num; cDemux *dmx; pthread_t record_thread; bool record_thread_running;