From d6072f4c91cebdd16476023b1ac62404d6b04bda Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 24 Feb 2013 16:29:59 +0100 Subject: [PATCH] implement cDemux::GetSource() Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/afdca9c02b582ba59101313ca845986d0af7b9a9 Author: Stefan Seyfried Date: 2013-02-24 (Sun, 24 Feb 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- azbox/dmx.cpp | 6 ++++++ azbox/dmx_lib.h | 1 + generic-pc/dmx.cpp | 6 ++++++ generic-pc/dmx_lib.h | 1 + libspark/dmx.cpp | 10 ++++++++++ libspark/dmx_lib.h | 1 + libtriple/dmx_td.h | 1 + 7 files changed, 26 insertions(+) diff --git a/azbox/dmx.cpp b/azbox/dmx.cpp index a4ab3b1..1fe5561 100644 --- a/azbox/dmx.cpp +++ b/azbox/dmx.cpp @@ -514,3 +514,9 @@ bool cDemux::SetSource(int unit, int 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; +} diff --git a/azbox/dmx_lib.h b/azbox/dmx_lib.h index ffd293e..ed38048 100644 --- a/azbox/dmx_lib.h +++ b/azbox/dmx_lib.h @@ -55,6 +55,7 @@ class cDemux void getSTC(int64_t * STC); int getUnit(void); static bool SetSource(int unit, int source); + static int GetSource(int unit); // TD only functions int getFD(void) { return fd; }; /* needed by cPlayback class */ void removePid(unsigned short Pid); /* needed by cRecord class */ diff --git a/generic-pc/dmx.cpp b/generic-pc/dmx.cpp index 7a59928..91525fd 100644 --- a/generic-pc/dmx.cpp +++ b/generic-pc/dmx.cpp @@ -477,3 +477,9 @@ bool cDemux::SetSource(int unit, int 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; +} diff --git a/generic-pc/dmx_lib.h b/generic-pc/dmx_lib.h index ffd293e..ed38048 100644 --- a/generic-pc/dmx_lib.h +++ b/generic-pc/dmx_lib.h @@ -55,6 +55,7 @@ class cDemux void getSTC(int64_t * STC); int getUnit(void); static bool SetSource(int unit, int source); + static int GetSource(int unit); // TD only functions int getFD(void) { return fd; }; /* needed by cPlayback class */ void removePid(unsigned short Pid); /* needed by cRecord class */ diff --git a/libspark/dmx.cpp b/libspark/dmx.cpp index 332e107..75aa87a 100644 --- a/libspark/dmx.cpp +++ b/libspark/dmx.cpp @@ -595,3 +595,13 @@ bool cDemux::SetSource(int unit, int source) dmx_source[unit] = source; return true; } + +int cDemux::GetSource(int unit) +{ + 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]; +} diff --git a/libspark/dmx_lib.h b/libspark/dmx_lib.h index 99ac526..e85dc3c 100644 --- a/libspark/dmx_lib.h +++ b/libspark/dmx_lib.h @@ -57,6 +57,7 @@ class cDemux void getSTC(int64_t * STC); int getUnit(void); static bool SetSource(int unit, int source); + static int GetSource(int unit); // TD only functions int getFD(void) { return fd; }; /* needed by cPlayback class */ void removePid(unsigned short Pid); /* needed by cRecord class */ diff --git a/libtriple/dmx_td.h b/libtriple/dmx_td.h index 4b35ece..e657592 100644 --- a/libtriple/dmx_td.h +++ b/libtriple/dmx_td.h @@ -63,6 +63,7 @@ class cDemux int getUnit(void); /* tripledragon is unlikely to get a second tuner, so stub it out right here */ static bool SetSource(int /*unit*/, int /*source*/) { return true; }; + static int GetSource(int /*unit*/) { return 0; }; // TD only functions int getFD(void) { return fd; }; /* needed by cPlayback class */ void removePid(unsigned short Pid); /* needed by cRecord class */