aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb/decoder.cpp
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-16 14:58:11 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-16 14:58:11 +0000
commit4e8cae716ad3fdf29a7b2a45e5eec0a530f93277 (patch)
tree33cc04ae9577a5dd03dd4a52c9205fcc957236ee /lib/dvb/decoder.cpp
parent193333b7bc72ab13d4dee5750b31c3c33041c696 (diff)
downloadenigma2-4e8cae716ad3fdf29a7b2a45e5eec0a530f93277.tar.gz
enigma2-4e8cae716ad3fdf29a7b2a45e5eec0a530f93277.zip
add ability to selecte the audio channel (mono left, stereo, mono right) from python
store the current selected audio channel then per service in servicelist TODO: extend the audio track selection screen to make audio channel selection usable :)
Diffstat (limited to 'lib/dvb/decoder.cpp')
-rw-r--r--lib/dvb/decoder.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp
index 1bec997d..76d0f504 100644
--- a/lib/dvb/decoder.cpp
+++ b/lib/dvb/decoder.cpp
@@ -137,6 +137,22 @@ void eDVBAudio::unfreeze()
eDebug("video: AUDIO_CONTINUE: %m");
}
+void eDVBAudio::setChannel(int channel)
+{
+ int val = AUDIO_STEREO;
+ switch (channel)
+ {
+ case aMonoLeft: val = AUDIO_MONO_LEFT; break;
+ case aMonoRight: val = AUDIO_MONO_RIGHT; break;
+ default:
+ break;
+ }
+ if (::ioctl(m_fd, AUDIO_CHANNEL_SELECT, val) < 0)
+ eDebug("video: AUDIO_CHANNEL_SELECT: %m");
+ else
+ eDebug("AUDIO_CHANNEL_SELECT ok");
+}
+
int eDVBAudio::getPTS(pts_t &now)
{
return ::ioctl(m_fd, AUDIO_GET_PTS, &now);
@@ -552,6 +568,15 @@ RESULT eTSMPEGDecoder::setAudioPID(int apid, int type)
return 0;
}
+RESULT eTSMPEGDecoder::setAudioChannel(int channel)
+{
+ if (m_audio)
+ m_audio->setChannel(channel);
+ else
+ eDebug("eTSMPEGDecoder::setAudioChannel but no audio decoder exist");
+ return 0;
+}
+
RESULT eTSMPEGDecoder::setSyncPCR(int pcrpid)
{
if (m_pcrpid != pcrpid)