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

cDevice::TrickSpeed() now has an additional parameter named Forward

This commit is contained in:
Klaus Schmidinger 2013-12-25 13:36:51 +01:00
parent 21c8829783
commit 4e22b62192
11 changed files with 28 additions and 16 deletions

View File

@ -3225,3 +3225,4 @@ Guido Cordaro <guido.cordaro@tiscali.it>
Thomas Reufer <thomas@reufer.ch>
for making it clear that the Data parameter in cDevice::StillPicture() may point to a
series of packets, not just a single one
for suggesting to add an additional parameter named Forward to cDevice::TrickSpeed()

View File

@ -8078,3 +8078,9 @@ Video Disk Recorder Revision History
- Added handling UTF-8 'umlaut' characters to cKbdRemote (thanks to Lars Hanisch).
- Made it clear that the Data parameter in cDevice::StillPicture() may point to a
series of packets, not just a single one (thanks to Thomas Reufer).
- cDevice::TrickSpeed() now has an additional parameter named Forward, which indicates
the direction in which replay is being done (suggested by Thomas Reufer). This
information may be necessary for some output devices in order to properly implement
trick modes. Authors of plugins that implement output devices will need to add this
parameter to their derived cDevice class, regardless of whether they will make use
of it or not.

View File

@ -1877,7 +1877,7 @@ virtual bool SetPlayMode(ePlayMode PlayMode);
virtual int64_t GetSTC(void);
virtual bool IsPlayingVideo(void) const;
virtual bool HasIBPTrickSpeed(void);
virtual void TrickSpeed(int Speed);
virtual void TrickSpeed(int Speed<modified>, bool Forward</modified>);
virtual void Clear(void);
virtual void Play(void);
virtual void Freeze(void);

View File

@ -50,3 +50,7 @@ VDR Plugin 'dvbsddevice' Revision History
- Fixed handling the -o option (short form of --outputonly; problem reported by
Mario Edelmann).
2014-01-01: Version 2.1.1
- cDevice::TrickSpeed() now has an additional parameter named Forward.

View File

@ -3,14 +3,14 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbsddevice.c 3.1 2013/08/22 08:20:18 kls Exp $
* $Id: dvbsddevice.c 3.2 2013/12/25 13:27:00 kls Exp $
*/
#include <getopt.h>
#include <vdr/plugin.h>
#include "dvbsdffdevice.h"
static const char *VERSION = "2.0.1";
static const char *VERSION = "2.1.1";
static const char *DESCRIPTION = "SD Full Featured DVB device";
class cPluginDvbsddevice : public cPlugin {

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbsdffdevice.c 2.35 2013/02/17 13:16:18 kls Exp $
* $Id: dvbsdffdevice.c 3.1 2013/12/25 13:27:00 kls Exp $
*/
#include "dvbsdffdevice.h"
@ -593,7 +593,7 @@ int64_t cDvbSdFfDevice::GetSTC(void)
return -1;
}
void cDvbSdFfDevice::TrickSpeed(int Speed)
void cDvbSdFfDevice::TrickSpeed(int Speed, bool Forward)
{
if (fd_video >= 0)
CHECK(ioctl(fd_video, VIDEO_SLOWMOTION, Speed));

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbsdffdevice.h 2.16 2013/02/17 13:16:29 kls Exp $
* $Id: dvbsdffdevice.h 3.1 2013/12/25 13:27:00 kls Exp $
*/
#ifndef __DVBSDFFDEVICE_H
@ -94,7 +94,7 @@ protected:
virtual int PlayTsAudio(const uchar *Data, int Length);
public:
virtual int64_t GetSTC(void);
virtual void TrickSpeed(int Speed);
virtual void TrickSpeed(int Speed, bool Forward);
virtual void Clear(void);
virtual void Play(void);
virtual void Freeze(void);

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 3.3 2013/08/22 10:28:55 kls Exp $
* $Id: device.c 3.4 2013/12/25 13:20:19 kls Exp $
*/
#include "device.h"
@ -1121,7 +1121,7 @@ int64_t cDevice::GetSTC(void)
return -1;
}
void cDevice::TrickSpeed(int Speed)
void cDevice::TrickSpeed(int Speed, bool Forward)
{
}

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 3.4 2013/12/25 13:08:44 kls Exp $
* $Id: device.h 3.5 2013/12/25 13:19:58 kls Exp $
*/
#ifndef __DEVICE_H
@ -698,10 +698,11 @@ public:
virtual bool HasIBPTrickSpeed(void) { return false; }
///< Returns true if this device can handle all frames in 'fast forward'
///< trick speeds.
virtual void TrickSpeed(int Speed);
virtual void TrickSpeed(int Speed, bool Forward);
///< Sets the device into a mode where replay is done slower.
///< Every single frame shall then be displayed the given number of
///< times.
///< times. Forward is true if replay is done in the normal (forward)
///< direction, false if it is done reverse.
///< The cDvbPlayer uses the following values for the various speeds:
///< 1x 2x 3x
///< Fast Forward 6 3 1

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbplayer.c 2.35 2013/03/08 13:44:19 kls Exp $
* $Id: dvbplayer.c 3.1 2013/12/25 13:24:07 kls Exp $
*/
#include "dvbplayer.h"
@ -324,7 +324,7 @@ void cDvbPlayer::TrickSpeed(int Increment)
int sp = (Speeds[nts] > 0) ? Mult / Speeds[nts] : -Speeds[nts] * Mult;
if (sp > MAX_VIDEO_SLOWMOTION)
sp = MAX_VIDEO_SLOWMOTION;
DeviceTrickSpeed(sp);
DeviceTrickSpeed(sp, playDir == pdForward);
}
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: player.h 2.6 2012/04/28 13:04:17 kls Exp $
* $Id: player.h 3.1 2013/12/25 13:25:02 kls Exp $
*/
#ifndef __PLAYER_H
@ -27,7 +27,7 @@ protected:
bool DeviceFlush(int TimeoutMs = 0) { return device ? device->Flush(TimeoutMs) : true; }
bool DeviceHasIBPTrickSpeed(void) { return device ? device->HasIBPTrickSpeed() : false; }
bool DeviceIsPlayingVideo(void) { return device ? device->IsPlayingVideo() : false; }
void DeviceTrickSpeed(int Speed) { if (device) device->TrickSpeed(Speed); }
void DeviceTrickSpeed(int Speed, bool Forward) { if (device) device->TrickSpeed(Speed, Forward); }
void DeviceClear(void) { if (device) device->Clear(); }
void DevicePlay(void) { if (device) device->Play(); }
void DeviceFreeze(void) { if (device) device->Freeze(); }