summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-02-12 20:14:43 +0100
committerJohns <johns98@gmx.net>2012-02-12 20:14:43 +0100
commit0a2a221fa93bd4177b2a21d2499cef68b47424bd (patch)
tree8a39b18855a487c7830b121abce91bfcc4738734 /softhddevice.cpp
parent24a065e5de863ab78cd8dc1e9a1ecf5e24ec6176 (diff)
downloadvdr-plugin-softhddevice-0a2a221fa93bd4177b2a21d2499cef68b47424bd.tar.gz
vdr-plugin-softhddevice-0a2a221fa93bd4177b2a21d2499cef68b47424bd.tar.bz2
Add play/pause audio support.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 9854d97..ad9d0cb 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -657,7 +657,6 @@ class cSoftHdDevice:public cDevice
virtual void Play(void);
virtual void Freeze(void);
virtual void Mute(void);
- virtual void SetVolumeDevice(int);
virtual void StillPicture(const uchar *, int);
virtual bool Poll(cPoller &, int = 0);
virtual bool Flush(int = 0);
@@ -675,6 +674,7 @@ class cSoftHdDevice:public cDevice
virtual int GetAudioChannelDevice(void);
virtual void SetDigitalAudioDevice(bool);
virtual void SetAudioTrackDevice(eTrackType);
+ virtual void SetVolumeDevice(int);
virtual int PlayAudio(const uchar *, int, uchar);
// Image Grab facilities
@@ -700,6 +700,7 @@ cSoftHdDevice::cSoftHdDevice(void)
#if 0
spuDecoder = NULL;
#endif
+ SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat));
}
cSoftHdDevice::~cSoftHdDevice(void)
@@ -826,6 +827,9 @@ void cSoftHdDevice::Freeze(void)
::Freeze();
}
+/**
+** Turns off audio while replaying.
+*/
void cSoftHdDevice::Mute(void)
{
dsyslog("[softhddev]%s:\n", __FUNCTION__);
@@ -834,13 +838,6 @@ void cSoftHdDevice::Mute(void)
::Mute();
}
-void cSoftHdDevice::SetVolumeDevice(int volume)
-{
- dsyslog("[softhddev]%s: %d\n", __FUNCTION__, volume);
-
- ::SetVolumeDevice(volume);
-}
-
/**
** Display the given I-frame as a still picture.
*/
@@ -891,8 +888,8 @@ bool cSoftHdDevice::Flush(int timeout_ms)
**
** @note FIXME: this function isn't called on the initial channel
*/
-void cSoftHdDevice:: SetVideoDisplayFormat(eVideoDisplayFormat
- video_display_format)
+void cSoftHdDevice::SetVideoDisplayFormat(
+ eVideoDisplayFormat video_display_format)
{
static int last = -1;
@@ -965,6 +962,18 @@ int cSoftHdDevice::GetAudioChannelDevice(void)
return 0;
}
+/**
+** Sets the audio volume on this device (Volume = 0...255).
+**
+** @param volume device volume
+*/
+void cSoftHdDevice::SetVolumeDevice(int volume)
+{
+ dsyslog("[softhddev]%s: %d\n", __FUNCTION__, volume);
+
+ ::SetVolumeDevice(volume);
+}
+
// ----------------------------------------------------------------------------
/**