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 */