mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
VDR developer version 2.1.1 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-2.1.1.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-2.0.0-2.1.1.diff MD5 checksums: b17f9838bb8ddee9620f838fea7a171d vdr-2.1.1.tar.bz2 8b8ca593885c380cd370e6d19a5b16a1 vdr-2.0.0-2.1.1.diff WARNING: ======== This is a *developer* version. Even though *I* use it in my productive environment, I strongly recommend that you only use it under controlled conditions and for testing and debugging. The main focus of this version is on adding basic support for positioners to control steerable satellite dishes. Manually controlling the dish position and storing individual positions will follow later. The fixes contained in this version will be released in a stable version 2.0.3 later, if there are no problems. From the HISTORY file: - Fixed initializing cDevice::keepTracks. - Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than one character (reported by Stefan Braun). - Removed all "modified since version 1.6" markers from PLUGINS.html. - Added definitions for older DVB API versions, back until 5.0 (based on a patch from Udo Richter). - Changed cThread::SetIOPriority() from "best effort class" to "idle class" in order to improve overall performance when an editing process is running (thanks to Jochen Dolze). - Fixed handling '/' and '~' in recording file names in case DirectoryEncoding is used (thanks to Lars Hanisch). - Changed the sign of the satellite position value in cSource to reflect the standard of western values being negative. The new member function cSource::Position() can be used to retrieve the orbital position of a satellite. - Fixed multiple occurrences of the same directory in the recordings list in case there are directories that only differ in non-alphanumeric characters (was broken by "Fixed selecting the last replayed recording in the Recordings menu in case there are folders and plain recordings with names that differ only in non-alphanumeric characters" in version 1.7.36). - Fixed displaying the frame number when setting an editing mark (thanks to Thomas Günther). - Fixed no longer generating any editing marks if the edited recording results in just one single sequence (reported by Halim Sahin). - Fixed an error message when parsing SCR values in diseqc.conf. - Fixed an unexpected RCS version tag in the newplugin script. - Fixed an endless loop in the DrawEllipse() functions for very small ellipses (reported by Stefan Braun). - Fixed a crash in the LCARS skin's main menu in case there is no current channel (reported by Dominique Dumont). - Added basic support for positioners to control steerable satellite dishes (based on a patch from Seppo Ingalsuo and Ales Jurik). + Supports GotoN (aka "DiSEqC 1.2") and GotoX (aka "USALS"). + The new DiSEqC command code 'P' can be used to instruct a positioner to move the dish to the required satellite position. When a 'P' code is processed, further execution of the remaining DiSEqC sequence (if any) is postponed until the positioner has reached the new satellite position. + The new special source value of "S360E" can be used in diseqc.conf to indicate that an entry using a positioner can move the dish to any requested position within its range. Think of it as "full circle". + The devices a particular cDiseqc or cScr applies to are now stored directly in each cDiseqc or cScr, respectively. + A plugin can implement a custom positioner control (see PLUGINS.html, section "Positioners"). + The new function cSkinDisplayChannel::SetPositioner() can be implemented by skins to show the user a progress display when the dish is being moved. The default implementation calls SetMessage() with a string indicating the new position the dish is being moved to. The LCARS skin shows a progress bar indicating the movement of the dish. + The new parameters "Site latitude", "Site longitude", "Positioner speed", and "Positioner swing" in the "Setup/LNB" menu can be used to configure the necessary values for a steerable dish. + The cDvbTuner now has a new status tsPositioning, in which it waits until a steerable dish has reached its target position. Parsing SI data is paused until the target position has been reached. - The LCARS skin now shows the source value of the current channel in its channel display. - Fixed asserting free disk space in the cutter. - No longer trying to delete old recordings in AssertFreeDiskSpace() if the given Priority is less than 1. - Fixed handling LIRC events in case repeated events are lost. - Fixed a possible crash when shutting down VDR while subtitles are being displayed (reported by Ville Skyttä). - cDevice::IsPrimaryDevice() now also checks whether the primary device actually has a decoder and returns false otherwise. This should improve device allocation on systems that are only used as a receiver and don't actually display anything. - Increased the value of MAXRETRIES to 20 to reduce the probability of disturbances in transfer mode. - All bonded devices (except for the master) now turn off their LNB power completely to avoid problems when receiving vertically polarized transponders (suggested by Manfred Völkel and Oliver Endriss). - Reverted the change from version 1.5.7 that made all logging go to LOG_ERR (thanks to Christopher Reimer). - Added Begin/EndSegmentTransfer() to the EPG handler interface (thanks to Jörg Wendel). - The code for distributing recordings over several video directories is now deprecated and disabled by default. You can re-enable this feature by removing the comment sign ('//') from the beginning of the line //#define DEPRECATED_DISTRIBUTED_VIDEODIR // Code enclosed with this macro is ... in the file videodir.c. Note, though, that this can only be a temporary workaround. This feature will be completely removed in one of the next developer versions. Distributing the video directory over several disks was a useful feature in times when disks were still relatively small, but it also caused serious problems in case one of the disks failed. Nowadays hard disks come in sizes measured in terabytes, and tools like "mhddfs" can be used to combine several disks to form one large volume. A recommended method for a relatively safe disk setup in a VDR system is to use two 1TB (or larger) disks and use them as a RAID-1 (mirrored). That way, if one disk fails, you can replace it without data loss.
114 lines
6.0 KiB
C++
114 lines
6.0 KiB
C++
/*
|
|
* player.h: The basic player interface
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: player.h 3.0 2012/04/28 13:04:17 kls Exp $
|
|
*/
|
|
|
|
#ifndef __PLAYER_H
|
|
#define __PLAYER_H
|
|
|
|
#include "device.h"
|
|
#include "osdbase.h"
|
|
|
|
class cPlayer {
|
|
friend class cDevice;
|
|
private:
|
|
cDevice *device;
|
|
ePlayMode playMode;
|
|
protected:
|
|
void DeviceClrAvailableTracks(bool DescriptionsOnly = false) { if (device) device->ClrAvailableTracks(DescriptionsOnly); }
|
|
bool DeviceSetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const char *Language = NULL, const char *Description = NULL) { return device ? device->SetAvailableTrack(Type, Index, Id, Language, Description) : false; }
|
|
bool DeviceSetCurrentAudioTrack(eTrackType Type) { return device ? device->SetCurrentAudioTrack(Type) : false; }
|
|
bool DeviceSetCurrentSubtitleTrack(eTrackType Type) { return device ? device->SetCurrentSubtitleTrack(Type) : false; }
|
|
bool DevicePoll(cPoller &Poller, int TimeoutMs = 0) { return device ? device->Poll(Poller, TimeoutMs) : false; }
|
|
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 DeviceClear(void) { if (device) device->Clear(); }
|
|
void DevicePlay(void) { if (device) device->Play(); }
|
|
void DeviceFreeze(void) { if (device) device->Freeze(); }
|
|
void DeviceMute(void) { if (device) device->Mute(); }
|
|
void DeviceSetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat) { if (device) device->SetVideoDisplayFormat(VideoDisplayFormat); }
|
|
void DeviceStillPicture(const uchar *Data, int Length) { if (device) device->StillPicture(Data, Length); }
|
|
uint64_t DeviceGetSTC(void) { return device ? device->GetSTC() : -1; }
|
|
void Detach(void);
|
|
virtual void Activate(bool On) {}
|
|
// This function is called right after the cPlayer has been attached to
|
|
// (On == true) or before it gets detached from (On == false) a cDevice.
|
|
// It can be used to do things like starting/stopping a thread.
|
|
int PlayPes(const uchar *Data, int Length, bool VideoOnly = false);
|
|
// Sends the given PES Data to the device and returns the number of
|
|
// bytes that have actually been accepted by the device (or a
|
|
// negative value in case of an error).
|
|
int PlayTs(const uchar *Data, int Length, bool VideoOnly = false) { return device ? device->PlayTs(Data, Length, VideoOnly) : -1; }
|
|
// Sends the given TS packet to the device and returns a positive number
|
|
// if the packet has been accepted by the device, or a negative value in
|
|
// case of an error.
|
|
public:
|
|
cPlayer(ePlayMode PlayMode = pmAudioVideo);
|
|
virtual ~cPlayer();
|
|
bool IsAttached(void) { return device != NULL; }
|
|
virtual double FramesPerSecond(void) { return DEFAULTFRAMESPERSECOND; }
|
|
// Returns the number of frames per second of the currently played material.
|
|
virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) { return false; }
|
|
// Returns the current and total frame index, optionally snapped to the
|
|
// nearest I-frame.
|
|
virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed) { return false; }
|
|
// Returns the current replay mode (if applicable).
|
|
// 'Play' tells whether we are playing or pausing, 'Forward' tells whether
|
|
// we are going forward or backward and 'Speed' is -1 if this is normal
|
|
// play/pause mode, 0 if it is single speed fast/slow forward/back mode
|
|
// and >0 if this is multi speed mode.
|
|
virtual void SetAudioTrack(eTrackType Type, const tTrackId *TrackId) {}
|
|
// Sets the current audio track to the given value.
|
|
// This is just a virtual hook for players that need to do special things
|
|
// in order to switch audio tracks.
|
|
virtual void SetSubtitleTrack(eTrackType Type, const tTrackId *TrackId) {}
|
|
// Sets the current subtitle track to the given value.
|
|
// This is just a virtual hook for players that need to do special things
|
|
// in order to switch subtitle tracks.
|
|
};
|
|
|
|
class cControl : public cOsdObject {
|
|
private:
|
|
static cControl *control;
|
|
static cMutex mutex;
|
|
bool attached;
|
|
bool hidden;
|
|
protected:
|
|
cPlayer *player;
|
|
public:
|
|
cControl(cPlayer *Player, bool Hidden = false);
|
|
virtual ~cControl();
|
|
virtual void Hide(void) = 0;
|
|
virtual cOsdObject *GetInfo(void);
|
|
///< Returns an OSD object that displays information about the currently
|
|
///< played programme. If no such information is available, NULL will be
|
|
///< returned.
|
|
virtual const cRecording *GetRecording(void);
|
|
///< Returns the cRecording that is currently being replayed, or NULL if
|
|
///< this player is not playing a cRecording.
|
|
virtual cString GetHeader(void);
|
|
///< This can be used by players that don't play a cRecording, but rather
|
|
///< do something completely different. The resulting string may be used by
|
|
///< skins as a last resort, in case they want to display the state of the
|
|
///< current player. The return value is expected to be a short, single line
|
|
///< string. The default implementation returns an empty string.
|
|
double FramesPerSecond(void) { return player->FramesPerSecond(); }
|
|
bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) { return player->GetIndex(Current, Total, SnapToIFrame); }
|
|
bool GetReplayMode(bool &Play, bool &Forward, int &Speed) { return player->GetReplayMode(Play, Forward, Speed); }
|
|
static void Launch(cControl *Control);
|
|
static void Attach(void);
|
|
static void Shutdown(void);
|
|
static cControl *Control(bool Hidden = false);
|
|
///< Returns the current replay control (if any) in case it is currently
|
|
///< visible. If Hidden is true, the control will be returned even if it is
|
|
///< currently hidden.
|
|
};
|
|
|
|
#endif //__PLAYER_H
|