mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Original announce message: VDR developer version 1.7.28 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.28.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.27-1.7.28.diff MD5 checksums: 3ccff2dcc42d112e23dd64f2c39f02f1 vdr-1.7.28.tar.bz2 7249ead4aca4b24e53d49d11c67e1613 vdr-1.7.27-1.7.28.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 new default skin "LCARS" displays the signal strengths and qualities of all devices in its main menu. For devices that have an stb0899 frontend chip (like the TT-budget S2-3200) retrieving this information from the driver is rather slow, which results in a sluggish response to user input in the main menu. To speed this up you may want to apply the patches from From the HISTORY file: - Fixed cPixmapMemory::DrawEllipse() for quadrants -1 and -4. - Fixed getting the maximum short channel name length in case there are no short names at all (reported by Derek Kelly). - The new function cDevice::DeviceType() returns a string identifying the type of the given device. - Now limiting the number of characters of a channel's (short) name to 16 in the schedules menus, to keep that column from getting overly wide in case there is a channel with a very long name that has no short name. - Fixed EPG scan on systems with only a single DVB device that use software output (reported by Juergen Lock). - Skins can now inquire the menu category for which their cSkinDisplayMenu is currently being used. This can be done either through a call to cSkinDisplayMenu::MenuCategory() or by reimplementing cSkinDisplayMenu::SetMenuCategory(). This information allows a skin to use special icons or decorations for the various types of menus in VDR. - The new setup option "DVB/Standard compliance" can be used to switch between different variations of the DVB standard (thanks to Rolf Ahrenberg). Currently there is "DVB" (for the original DVB standard) and "ANSI/SCTE", which is used to properly handle certain private stream types. - The disk usage is no longer automatically added to the title of the main and "Recordings" menus. This has always been a mekeshift solution and it is now up to the individual skin if, where and how it wants to display this information. A skin can use the new cVideoDiskUsage class to implement such a display. For compatibility, the default skins "Classic VDR", "ST:TNG Panels" and "Text mode" (i.e. curses) have been changed to behave like before. Other skins may want to display the disk usage in totally different ways. - A cOsdMenu can now handle skins that display different numbers of items in the various menu categories. - OSD and skin are now reinitialized after a plugin setup page has been confirmed, to have them react immediately in case any change to a plugin's setup parameter has an effect on the OSD. - The Timers list is now marked as modified whenever a recording starts or ends. - Fixed cDevice::StillPicture(), making sure it doesn't call the derived class's function if no buffer has been allocated (reported by Marcus Roscher). - Fixed the SVDRP command UPDR, which didn't update the global recordings list (reported by Lars Hanisch). - cControl::Control() now has an additional boolean parameter, which can be set to true to get the current player control even if it is hidden. - The new functions cControl::GetRecording() and cControl::GetHeader() can be used to retrieve information about what the current player is playing. - Fixed a possible high CPU load when pausing replay (thanks to Reinhard Nissl). - Fixed character comparisons in cSubtitleObject::DecodeCharacterString() (reported by Reinhard Mantey). - Renamed the function cString::sprintf(const char *fmt, va_list &ap) to vsprintf(), because it might inadvertently be called with a 'char *' as the second argument on some compilers and cause a crash (reported by Sundararaj Reel). - Removed the "bondedMasterFailed" mechanism from cDvbTuner, because it caused problems with the EPG scan in case a transponder is not receivable in a setup with bonded devices (reported by Michael Schneider). - Making sure setup strings don't contain any newline characters (thanks to Joachim Wilke). - The new member function cSkinDisplayReplay::SetRecording() allows a skin to display more information about the currently played recording. - Fixed a mismatched 'delete' in cSchedules::SetEpgDataFileName() (thanks to Reinhard Mantey). - The DrawText() functions of the OSD now accept the new alignment flag taBorder, which triggers keeping a proper distance from the edge that taLeft or taRight aligns to. - Fixed checking for UTF-8 support in cFont::Bidi() (reported by Torsten Lang). - If a recording has no info file, the 'title' of the recording's info is now set to the recording's name. - cVector::Clear() now reinitializes any previously used members. - Fixed resetting CAMs (thanks to Marco Skambraks). - The new function RgbShade() (include osd.h) can be used to generate a brighter or darker version of a given color. - The new class cSortedTimers can be used to quickly get a list of all timers, sorted by their start time. - The new skin "LCARS" is an enhanced version of the "ST:TNG" skin (which is still there in its original layout, for those who don't like the LCARS skin, or can't use it due to OSD limitations). The LCARS skin utilizes the new "menu category" feature to display additional information on the main menu page. It shows upcoming timers and the system's devices, as well as which device is recording which timers. The upper pane of the main menu displays the programme data in live and replay mode, and a progress bar. An indicator on the right side of the device list shows which device is currently used for live viewing, and whether it is in transfer mode. The individual device displays show the device number, the device type, which CAM (if any ) is currently assigned to the device, and the signal strength and quality. On the left side of the OSD there is a permanent display of the current date and time, the disk usage and the system load. "LCARS" is the new default skin of VDR. It requires at least a 4bpp (16 color) full screen OSD, but you can still operate it if your OSD can handle only fewer colors (in which case you may want to switch to the "ST:TNG" or "Classic VDR" skin). - Finally removed the code marked with __RECORDING_H_DEPRECATED_DIRECT_MEMBER_ACCESS and LEGACY_CRECEIVER. - Now making sure that the "small font" is never larger than the "osd font". - Fixed font handling with fontconfig 2.9.0 or newer (thanks to Joerg Bornkessel). - Extended the interface to the script that gets called for recordings, so that in the "edited" case it also provides the name of the original recording (thanks to Christian Richter). - Added DeleteEvent() to the EPG handler interface, so that an EPG handler can trigger deleting of an event (thanks to Christian Kaiser). - Speeded up opening menus on systems with many (several thousands) of recordings, by caching the information whether a recording is stored on the video directory file system within the cRecording data (based on a patch from Torsten Lang).
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 2.6 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
|