1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added an 'Id' parameter to cDevice::PlayAudio() to allow plugins to easier process the audio data

This commit is contained in:
Klaus Schmidinger 2006-02-04 10:24:43 +01:00
parent f0741c95c0
commit 5fdc421a10
6 changed files with 17 additions and 12 deletions

View File

@ -1296,6 +1296,8 @@ Marco Schl
for fixing handling OSD areas that have invalid sizes
for removing unused variables in skinclassic.c and skinsttng.c
for removing leftover 'needsBufferReserve' variable from cTransfer
for adding an 'Id' parameter to cDevice::PlayAudio() to allow plugins to easier
process the audio data
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP

View File

@ -4271,7 +4271,7 @@ Video Disk Recorder Revision History
- Separated the 'install' target into several individual targets; renamed the
'plugins-install' target to 'install-plugins' (thanks to Helmut Auer).
2006-02-03: Version 1.3.42
2006-02-04: Version 1.3.42
- Removed leftover 'needsBufferReserve' variable from cTransfer (thanks to Marco
Schlüßler).
@ -4281,3 +4281,5 @@ Video Disk Recorder Revision History
- Fixed handling "pending" timers that blocked others that actually could record
(reported by Thomas Koch).
- Speeded up cVideoRepacker (thanks to Reinhard Nissl).
- Added an 'Id' parameter to cDevice::PlayAudio() to allow plugins to easier
process the audio data (thanks to Marco Schlüßler).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.121 2006/01/08 11:39:37 kls Exp $
* $Id: device.c 1.122 2006/02/04 10:21:51 kls Exp $
*/
#include "device.h"
@ -977,7 +977,7 @@ int cDevice::PlayVideo(const uchar *Data, int Length)
return -1;
}
int cDevice::PlayAudio(const uchar *Data, int Length)
int cDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
{
return -1;
}
@ -1000,7 +1000,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
case 0xC0 ... 0xDF: // audio
SetAvailableTrack(ttAudio, c - 0xC0, c);
if (!VideoOnly && c == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
w = PlayAudio(Start, d, c);
if (FirstLoop)
Audios.PlayAudio(Data, Length, c);
}
@ -1026,7 +1026,7 @@ pre_1_3_19_PrivateStreamDeteced:
if (Setup.UseDolbyDigital) {
SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId);
if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
w = PlayAudio(Start, d, SubStreamId);
if (FirstLoop)
Audios.PlayAudio(Data, Length, SubStreamId);
}
@ -1035,7 +1035,7 @@ pre_1_3_19_PrivateStreamDeteced:
case 0xA0: // LPCM
SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId);
if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
w = PlayAudio(Start, d, SubStreamId);
if (FirstLoop)
Audios.PlayAudio(Data, Length, SubStreamId);
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.h 1.70 2006/01/08 10:10:26 kls Exp $
* $Id: device.h 1.71 2006/02/04 10:22:54 kls Exp $
*/
#ifndef __DEVICE_H
@ -424,9 +424,10 @@ protected:
///< Length) or not at all (returning 0 or -1 and setting 'errno' to EAGAIN).
///< \return Returns the number of bytes actually taken from Data, or -1
///< in case of an error.
virtual int PlayAudio(const uchar *Data, int Length);
virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
///< Plays the given data block as audio.
///< Data points to exactly one complete PES packet of the given Length.
///< Id indicates the type of audio data this packet holds.
///< PlayAudio() shall process the packet either as a whole (returning
///< Length) or not at all (returning 0 or -1 and setting 'errno' to EAGAIN).
///< \return Returns the number of bytes actually taken from Data, or -1

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 1.151 2006/01/28 15:37:01 kls Exp $
* $Id: dvbdevice.c 1.152 2006/02/04 10:21:51 kls Exp $
*/
#include "dvbdevice.h"
@ -1169,7 +1169,7 @@ int cDvbDevice::PlayVideo(const uchar *Data, int Length)
return WriteAllOrNothing(fd_video, Data, Length, 1000, 10);
}
int cDvbDevice::PlayAudio(const uchar *Data, int Length)
int cDvbDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
{
return WriteAllOrNothing(fd_audio, Data, Length, 1000, 10);
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.h 1.37 2005/12/29 13:33:12 kls Exp $
* $Id: dvbdevice.h 1.38 2006/02/04 10:21:51 kls Exp $
*/
#ifndef __DVBDEVICE_H
@ -119,7 +119,7 @@ protected:
virtual bool CanReplay(void) const;
virtual bool SetPlayMode(ePlayMode PlayMode);
virtual int PlayVideo(const uchar *Data, int Length);
virtual int PlayAudio(const uchar *Data, int Length);
virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
public:
virtual int64_t GetSTC(void);
virtual void TrickSpeed(int Speed);