vdr
2.7.6
|
#include <dvbhdffdevice.h>
Public Member Functions | |
cDvbHdFfDevice (int Adapter, int Frontend, bool OutputOnly) | |
virtual | ~cDvbHdFfDevice () |
virtual bool | HasDecoder (void) const |
virtual cSpuDecoder * | GetSpuDecoder (void) |
virtual bool | ProvidesSource (int Source) const |
virtual int | NumProvidedSystems (void) const |
virtual uchar * | GrabImage (int &Size, bool Jpeg=true, int Quality=-1, int SizeX=-1, int SizeY=-1) |
virtual void | SetVideoDisplayFormat (eVideoDisplayFormat VideoDisplayFormat) |
virtual void | GetVideoSize (int &Width, int &Height, double &VideoAspect) |
virtual void | GetOsdSize (int &Width, int &Height, double &PixelAspect) |
virtual int64_t | GetSTC (void) |
virtual cRect | CanScaleVideo (const cRect &Rect, int Alignment=taCenter) |
virtual void | ScaleVideo (const cRect &Rect=cRect::Null) |
virtual void | TrickSpeed (int Speed) |
virtual void | Clear (void) |
virtual void | Play (void) |
virtual void | Freeze (void) |
virtual void | Mute (void) |
virtual void | StillPicture (const uchar *Data, int Length) |
virtual bool | Poll (cPoller &Poller, int TimeoutMs=0) |
virtual bool | Flush (int TimeoutMs=0) |
![]() | |
cDvbDevice (int Adapter, int Frontend) | |
virtual | ~cDvbDevice () override |
int | Adapter (void) const |
int | Frontend (void) const |
virtual cString | DeviceType (void) const override |
virtual cString | DeviceName (void) const override |
bool | Bond (cDvbDevice *Device) |
void | UnBond (void) |
bool | BondingOk (const cChannel *Channel, bool ConsiderOccupied=false) const |
virtual bool | ProvidesDeliverySystem (int DeliverySystem) const |
virtual bool | ProvidesTransponder (const cChannel *Channel) const override |
virtual bool | ProvidesChannel (const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const override |
virtual bool | ProvidesEIT (void) const override |
virtual const cPositioner * | Positioner (void) const override |
virtual bool | SignalStats (int &Valid, double *Strength=NULL, double *Cnr=NULL, double *BerPre=NULL, double *BerPost=NULL, double *Per=NULL, int *Status=NULL) const override |
virtual int | SignalStrength (void) const override |
virtual int | SignalQuality (void) const override |
virtual const cChannel * | GetCurrentlyTunedTransponder (void) const override |
virtual bool | IsTunedToTransponder (const cChannel *Channel) const override |
virtual bool | MaySwitchTransponder (const cChannel *Channel) const override |
virtual void | SetPowerSaveMode (bool On) override |
virtual bool | HasLock (int TimeoutMs=0) const override |
virtual bool | HasCi (void) override |
![]() | |
bool | IsPrimaryDevice (bool CheckDecoder=true) const |
int | CardIndex (void) const |
int | DeviceNumber (void) const |
virtual bool | AvoidRecording (void) const |
virtual bool | ProvidesTransponderExclusively (const cChannel *Channel) const |
void | SetPowerSaveIfUnused (void) |
bool | SwitchChannel (const cChannel *Channel, bool LiveView) |
void | ForceTransferMode (void) |
int | Occupied (int Priority=MINPRIORITY) const |
void | SetOccupied (int Seconds, int Priority=MINPRIORITY, time_t From=0) |
virtual bool | HasProgramme (void) const |
void | DelLivePids (void) |
virtual int | ReadFilter (int Handle, void *Buffer, size_t Length) |
void | AttachFilter (cFilter *Filter) |
void | Detach (cFilter *Filter) |
const cSdtFilter * | SdtFilter (void) const |
cSectionHandler * | SectionHandler (void) const |
virtual bool | HasInternalCam (void) |
void | SetCamSlot (cCamSlot *CamSlot) |
cCamSlot * | CamSlot (void) const |
bool | GrabImageFile (const char *FileName, bool Jpeg=true, int Quality=-1, int SizeX=-1, int SizeY=-1) |
virtual void | SetVideoFormat (bool VideoFormat16_9) |
void | ClrAvailableTracks (bool DescriptionsOnly=false, bool IdsOnly=false) |
bool | SetAvailableTrack (eTrackType Type, int Index, uint16_t Id, const char *Language=NULL, const char *Description=NULL) |
const tTrackId * | GetTrack (eTrackType Type) |
int | NumTracks (eTrackType FirstTrack, eTrackType LastTrack) const |
int | NumAudioTracks (void) const |
int | NumSubtitleTracks (void) const |
eTrackType | GetCurrentAudioTrack (void) const |
bool | SetCurrentAudioTrack (eTrackType Type) |
eTrackType | GetCurrentSubtitleTrack (void) const |
bool | SetCurrentSubtitleTrack (eTrackType Type, bool Manual=false) |
void | SetTempSubtitles (void) |
void | EnsureAudioTrack (bool Force=false) |
void | EnsureSubtitleTrack (void) |
void | SetKeepTracks (bool KeepTracks) |
bool | IsMute (void) const |
bool | ToggleMute (void) |
int | GetAudioChannel (void) |
void | SetAudioChannel (int AudioChannel) |
void | SetVolume (int Volume, bool Absolute=false) |
virtual bool | IsPlayingVideo (void) const |
virtual bool | HasIBPTrickSpeed (void) |
virtual void | TrickSpeed (int Speed, bool Forward) |
virtual int | PlayPes (const uchar *Data, int Length, bool VideoOnly=false) |
virtual int | PlayTs (const uchar *Data, int Length, bool VideoOnly=false) |
bool | Replaying (void) const |
bool | Transferring (void) const |
void | StopReplay (void) |
bool | AttachPlayer (cPlayer *Player) |
void | Detach (cPlayer *Player) |
int | Priority (bool IgnoreOccupied=false) const |
bool | Receiving (bool Dummy=false) const |
bool | AttachReceiver (cReceiver *Receiver) |
void | Detach (cReceiver *Receiver, bool ReleaseCam=true) |
void | DetachAll (int Pid) |
![]() | |
cThread (const char *Description=NULL, bool LowPriority=false) | |
virtual | ~cThread () |
void | SetDescription (const char *Description,...) __attribute__((format(printf |
void bool | Start (void) |
bool | Active (void) |
Static Public Member Functions | |
static bool | Probe (int Adapter, int Frontend) |
static HDFF::cHdffCmdIf * | GetHdffCmdHandler (void) |
![]() | |
static bool | Initialize (void) |
static bool | BondDevices (const char *Bondings) |
static void | UnBondDevices (void) |
static void | SetTransferModeForDolbyDigital (int Mode) |
![]() | |
static int | NumDevices (void) |
static bool | WaitForAllDevicesReady (int Timeout=0) |
static void | SetUseDevice (int n) |
static bool | UseDevice (int n) |
static bool | SetPrimaryDevice (int n) |
static cDevice * | PrimaryDevice (void) |
static cDevice * | ActualDevice (void) |
static cDevice * | GetDevice (int Index) |
static cDevice * | GetDevice (const cChannel *Channel, int Priority, bool LiveView, bool Query=false) |
static cDevice * | GetDeviceForTransponder (const cChannel *Channel, int Priority) |
static void | Shutdown (void) |
static bool | SwitchChannel (int Direction) |
static int | CurrentChannel (void) |
static void | SetCurrentChannel (int ChannelNumber) |
static int | CurrentVolume (void) |
![]() | |
static tThreadId | ThreadId (void) |
static tThreadId | IsMainThread (void) |
static void | SetMainThreadId (void) |
Protected Member Functions | |
virtual void | MakePrimaryDevice (bool On) |
virtual bool | SetChannelDevice (const cChannel *Channel, bool LiveView) |
virtual bool | SetPid (cPidHandle *Handle, int Type, bool On) |
virtual void | SetAudioTrackDevice (eTrackType Type) |
virtual int | GetAudioChannelDevice (void) |
virtual void | SetAudioChannelDevice (int AudioChannel) |
virtual void | SetVolumeDevice (int Volume) |
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, uchar Id) |
virtual int | PlayTsVideo (const uchar *Data, int Length) |
virtual int | PlayTsAudio (const uchar *Data, int Length) |
![]() | |
virtual bool | IsBonded (void) const override |
virtual int | OpenFilter (u_short Pid, u_char Tid, u_char Mask) override |
virtual void | CloseFilter (int Handle) override |
virtual bool | OpenDvr (void) override |
virtual void | CloseDvr (void) override |
virtual bool | GetTSPacket (uchar *&Data) override |
virtual void | DetachAllReceivers (void) override |
![]() | |
cDevice (void) | |
virtual | ~cDevice () override |
virtual bool | Ready (void) |
bool | DeviceHooksProvidesTransponder (const cChannel *Channel) const |
bool | DeviceHooksProvidesEIT (void) const |
bool | HasPid (int Pid) const |
bool | AddPid (int Pid, ePidType PidType=ptOther, int StreamType=0) |
void | DelPid (int Pid, ePidType PidType=ptOther) |
void | StartSectionHandler (void) |
void | StopSectionHandler (void) |
virtual void | SetSubtitleTrackDevice (eTrackType Type) |
virtual void | SetDigitalAudioDevice (bool On) |
const cPatPmtParser * | PatPmtParser (void) const |
virtual int | PlaySubtitle (const uchar *Data, int Length) |
virtual int | PlayPesPacket (const uchar *Data, int Length, bool VideoOnly=false) |
virtual int | PlayTsSubtitle (const uchar *Data, int Length) |
![]() | |
void | SetPriority (int Priority) |
void | SetIOPriority (int Priority) |
void | Lock (void) |
void | Unlock (void) |
bool | Running (void) |
void | Cancel (int WaitSeconds=0) |
Protected Attributes | |
ePlayMode | playMode |
![]() | |
int | adapter |
int | frontend |
![]() | |
cPidHandle | pidHandles [MAXPIDHANDLES] |
Private Member Functions | |
void | TurnOffLiveMode (bool LiveView) |
void | BuildTsPacket (uint8_t *TsBuffer, bool PusiSet, uint16_t Pid, uint8_t Counter, const uint8_t *Data, uint32_t Length) |
uint32_t | PesToTs (uint8_t *TsBuffer, uint16_t Pid, uint8_t &Counter, const uint8_t *Data, uint32_t Length) |
Private Attributes | |
int | fd_osd |
int | fd_audio |
int | fd_video |
bool | outputOnly |
cDvbSpuDecoder * | spuDecoder |
int | audioChannel |
int | playVideoPid |
int | playAudioPid |
int | playPcrPid |
bool | freezed |
bool | trickMode |
bool | isPlayingVideo |
bool | isTransferMode |
bool | supportsPcrInTransferMode |
uint8_t | videoCounter |
uint8_t | audioCounter |
bool | isHdffPrimary |
HDFF::cHdffCmdIf * | mHdffCmdIf |
Static Private Attributes | |
static int | devHdffOffset = -1 |
Additional Inherited Members | |
![]() | |
static bool | useDvbDevices = true |
![]() | |
enum | ePidType { ptAudio , ptVideo , ptPcr , ptTeletext , ptDolby , ptOther } |
![]() | |
static int | NextCardIndex (int n=0) |
![]() | |
static int | setTransferModeForDolbyDigital = 1 |
![]() | |
static int | currentChannel = 1 |
The cDvbHdFfDevice implements a DVB device which can be accessed through the Linux DVB driver API.
Definition at line 24 of file dvbhdffdevice.h.
cDvbHdFfDevice::cDvbHdFfDevice | ( | int | Adapter, |
int | Frontend, | ||
bool | OutputOnly | ||
) |
Definition at line 31 of file dvbhdffdevice.c.
References cDvbDevice::adapter, cHdffSetup::AnalogueVideo, audioChannel, cHdffSetup::AudioDelay, cHdffSetup::AudioDownmix, cHdffSetup::AvSyncShift, HdffHdmiConfig_t::CecDeviceName, HdffHdmiConfig_t::CecEnabled, cHdffSetup::CecEnabled, HDFF::cHdffCmdIf::CmdAvEnableSync(), HDFF::cHdffCmdIf::CmdAvEnableVideoAfterStop(), HDFF::cHdffCmdIf::CmdAvSetAudioDelay(), HDFF::cHdffCmdIf::CmdAvSetAudioDownmix(), HDFF::cHdffCmdIf::CmdAvSetAudioPid(), HDFF::cHdffCmdIf::CmdAvSetAudioSpeed(), HDFF::cHdffCmdIf::CmdAvSetDecoderInput(), HDFF::cHdffCmdIf::CmdAvSetPcrPid(), HDFF::cHdffCmdIf::CmdAvSetPlayMode(), HDFF::cHdffCmdIf::CmdAvSetSyncShift(), HDFF::cHdffCmdIf::CmdAvSetVideoPid(), HDFF::cHdffCmdIf::CmdAvSetVideoSpeed(), HDFF::cHdffCmdIf::CmdGetFirmwareVersion(), HDFF::cHdffCmdIf::CmdHdmiConfigure(), HDFF::cHdffCmdIf::CmdHdmiSetVideoMode(), HDFF::cHdffCmdIf::CmdMuxSetVideoOut(), HDFF::cHdffCmdIf::CmdOsdReset(), HDFF::cHdffCmdIf::CmdRemoteSetAddressFilter(), HDFF::cHdffCmdIf::CmdRemoteSetProtocol(), DEV_DVB_AUDIO, DEV_DVB_OSD, DEV_DVB_VIDEO, devHdffOffset, DvbOpen(), fd_audio, fd_osd, fd_video, HdffHdmiConfig_t::ForceDviMode, cDvbDevice::frontend, cHdffSetup::GetVideoMode(), gHdffSetup, HDFF_AUDIO_STREAM_MPEG1, HDFF_VIDEO_STREAM_MPEG1, isHdffPrimary, mHdffCmdIf, outputOnly, playMode, pmNone, cHdffSetup::RemoteAddress, cHdffSetup::RemoteProtocol, spuDecoder, cDevice::StopSectionHandler(), supportsPcrInTransferMode, HdffHdmiConfig_t::TransmitAudio, HdffHdmiConfig_t::VideoModeAdaption, and cHdffSetup::VideoModeAdaption.
|
virtual |
Definition at line 103 of file dvbhdffdevice.c.
References isHdffPrimary, mHdffCmdIf, and spuDecoder.
|
private |
Definition at line 780 of file dvbhdffdevice.c.
Referenced by PesToTs().
|
protectedvirtual |
Returns true if this device can currently start a replay session.
Reimplemented from cDevice.
Definition at line 491 of file dvbhdffdevice.c.
References cDevice::CanReplay().
Asks the output device whether it can scale the currently shown video in such a way that it fits into the given Rect, while retaining its proper aspect ratio.
If the scaled video doesn't exactly fit into Rect, Alignment is used to determine how to align the actual rectangle with the requested one. The actual rectangle can be smaller, larger or the same size as the given Rect, and its location may differ, depending on the capabilities of the output device, which may not be able to display a scaled video at arbitrary sizes and locations. The device shall, however, do its best to match the requested Rect as closely as possible, preferring a size and location that fits completely into the requested Rect if possible. Returns the rectangle that can actually be used when scaling the video. A skin plugin using this function should rearrange its content according to the rectangle returned from calling this function, and should especially be prepared for cases where the returned rectangle is way off the requested Rect, or even Null. In such cases, the skin may want to fall back to working with full screen video. The coordinates of Rect are in the range of the width and height returned by GetOsdSize(). If this device can't scale the video, a Null rectangle is returned (this is also the default implementation).
Reimplemented from cDevice.
Definition at line 583 of file dvbhdffdevice.c.
|
virtual |
Clears all video and audio data from the device.
A derived class must call the base class function to make sure all registered cAudio objects are notified.
Reimplemented from cDevice.
Definition at line 643 of file dvbhdffdevice.c.
References CHECK, cDevice::Clear(), HDFF::cHdffCmdIf::CmdAvSetAudioPid(), HDFF::cHdffCmdIf::CmdAvSetVideoPid(), fd_video, HDFF_AUDIO_STREAM_MPEG1, HDFF_VIDEO_STREAM_MPEG1, mHdffCmdIf, playAudioPid, and playVideoPid.
|
virtual |
Returns true if the device's output buffers are empty, i.
e. any data which was buffered so far has been processed. If TimeoutMs is not zero, the device will wait up to the given number of milliseconds before returning in case there is still data in the buffers.
Reimplemented from cDevice.
Definition at line 774 of file dvbhdffdevice.c.
|
virtual |
Puts the device into "freeze frame" mode.
Reimplemented from cDevice.
Definition at line 665 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvSetAudioSpeed(), HDFF::cHdffCmdIf::CmdAvSetVideoSpeed(), cDevice::Freeze(), freezed, and mHdffCmdIf.
|
protectedvirtual |
Gets the current audio channel, which is stereo (0), mono left (1) or mono right (2).
Reimplemented from cDevice.
Definition at line 441 of file dvbhdffdevice.c.
References audioChannel.
|
static |
Definition at line 978 of file dvbhdffdevice.c.
References devHdffOffset, cDevice::device, and cDevice::GetDevice().
Referenced by cPluginDvbhddevice::MainMenuAction(), cPluginDvbhddevice::MainThreadHook(), cPluginDvbhddevice::SetupMenu(), and cPluginDvbhddevice::Stop().
|
virtual |
Returns the Width, Height and PixelAspect ratio the OSD should use to best fit the resolution of the output device.
If PixelAspect is not 1.0, the OSD may take this as a hint to scale its graphics in a way that, e.g., a circle will actually show up as a circle on the screen, and not as an ellipse. Values greater than 1.0 mean to stretch the graphics in the vertical direction (or shrink it in the horizontal direction, depending on which dimension shall be fixed). Values less than 1.0 work the other way round. Note that the OSD is not guaranteed to actually use this hint.
Reimplemented from cDevice.
Definition at line 287 of file dvbhdffdevice.c.
References cHdffSetup::GetOsdSize(), and gHdffSetup.
Referenced by ScaleVideo().
|
virtual |
Returns a pointer to the device's SPU decoder (or NULL, if this device doesn't have an SPU decoder).
Reimplemented from cDevice.
Definition at line 129 of file dvbhdffdevice.c.
References cDevice::IsPrimaryDevice(), and spuDecoder.
|
virtual |
Gets the current System Time Counter, which can be used to synchronize audio, video and subtitles.
If this device is able to replay, it must provide an STC. The value returned doesn't need to be an actual "clock" value, it is sufficient if it holds the PTS (Presentation Time Stamp) of the most recently presented frame. A proper value must be returned in normal replay mode as well as in any trick modes (like slow motion, fast forward/rewind). Only the lower 32 bit of this value are actually used, since some devices can't handle the msb correctly.
Reimplemented from cDevice.
Definition at line 554 of file dvbhdffdevice.c.
References AUDIO_GET_PTS, cDevice::CardIndex(), esyslog, fd_audio, fd_video, and isPlayingVideo.
|
virtual |
Returns the Width, Height and VideoAspect ratio of the currently displayed video material.
Width and Height are given in pixel (e.g. 720x576) and VideoAspect is e.g. 1.33333 for a 4:3 broadcast, or 1.77778 for 16:9. The default implementation returns 0 for Width and Height and 1.0 for VideoAspect.
Reimplemented from cDevice.
Definition at line 266 of file dvbhdffdevice.c.
References fd_video, cDevice::GetVideoSize(), and LOG_ERROR.
|
virtual |
Grabs the currently visible screen image.
Size is the size of the returned data block. If Jpeg is true it will write a JPEG file. Otherwise a PNM file will be written. Quality is the compression factor for JPEG. 1 will create a very blocky and small image, 70..80 will yield reasonable quality images while keeping the image file size around 50 KB for a full frame. The default will create a big but very high quality image. SizeX is the number of horizontal pixels in the frame (default is the current screen width). SizeY is the number of vertical pixels in the frame (default is the current screen height). Returns a pointer to the grabbed image data, or NULL in case of an error. The caller takes ownership of the returned memory and must free() it once it isn't needed any more.
Reimplemented from cDevice.
Definition at line 136 of file dvbhdffdevice.c.
References cDvbDevice::adapter, BUFFER_SIZE, DEV_DVB_VIDEO, dsyslog, DvbOpen(), esyslog, cDvbDevice::frontend, and YuvToJpeg().
|
virtual |
Tells whether this device has an MPEG decoder.
Reimplemented from cDevice.
Definition at line 124 of file dvbhdffdevice.c.
References isHdffPrimary.
|
protectedvirtual |
Informs a device that it will be the primary device.
If there is anything the device needs to set up when it becomes the primary device (On = true) or to shut down when it no longer is the primary device (On = false), it should do so in this function. A derived class must call the MakePrimaryDevice() function of its base class.
Reimplemented from cDevice.
Definition at line 114 of file dvbhdffdevice.c.
References gHdffSetup, cDevice::MakePrimaryDevice(), mHdffCmdIf, and cHdffSetup::SetVideoFormat().
|
virtual |
Turns off audio while replaying.
A derived class must call the base class function to make sure all registered cAudio objects are notified.
Reimplemented from cDevice.
Definition at line 673 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvMuteAudio(), mHdffCmdIf, and cDevice::Mute().
|
virtual |
Returns the number of individual "delivery systems" this device provides.
The default implementation returns 0, so any derived class that can actually provide channels must implement this function. The result of this function is used when selecting a device, in order to avoid devices that provide more than one system.
Reimplemented from cDvbDevice.
Definition at line 367 of file dvbhdffdevice.c.
References cDvbDevice::NumProvidedSystems(), and outputOnly.
|
private |
Definition at line 807 of file dvbhdffdevice.c.
References BuildTsPacket().
Referenced by PlayAudio(), and PlayVideo().
|
virtual |
Sets the device into play mode (after a previous trick mode).
Reimplemented from cDevice.
Definition at line 653 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvEnableSync(), HDFF::cHdffCmdIf::CmdAvMuteAudio(), HDFF::cHdffCmdIf::CmdAvSetAudioSpeed(), HDFF::cHdffCmdIf::CmdAvSetVideoSpeed(), freezed, isPlayingVideo, mHdffCmdIf, cDevice::Play(), and trickMode.
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' accordingly). Returns the number of bytes actually taken from Data, or -1 in case of an error.
Reimplemented from cDevice.
Definition at line 858 of file dvbhdffdevice.c.
References audioCounter, HDFF::cHdffCmdIf::CmdAvSetAudioPid(), fd_video, freezed, HDFF_AUDIO_STREAM_AC3, HDFF_AUDIO_STREAM_DTS, HDFF_AUDIO_STREAM_MPEG1, HDFF_AUDIO_STREAM_PCM, HDFF_AV_CONTAINER_PES, HDFF_AV_CONTAINER_PES_DVD, mHdffCmdIf, PesToTs(), playAudioPid, cDvbDevice::tsBuffer, and WriteAllOrNothing().
|
protectedvirtual |
Plays the given data block as audio.
Data points to exactly one complete TS packet of the given Length (which is always TS_SIZE). PlayTsAudio() shall process the packet either as a whole (returning Length) or not at all (returning 0 or -1 and setting 'errno' accordingly). The default implementation collects all incoming TS payload belonging to one PES packet and calls PlayAudio() with the resulting packet.
Reimplemented from cDevice.
Definition at line 951 of file dvbhdffdevice.c.
References cPatPmtParser::Apid(), cPatPmtParser::Atype(), HDFF::cHdffCmdIf::CmdAvSetAudioPid(), cPatPmtParser::Dpid(), cPatPmtParser::Dtype(), fd_video, freezed, MapAudioStreamTypes(), mHdffCmdIf, cDevice::PatPmtParser(), playAudioPid, TsPid(), and WriteAllOrNothing().
|
protectedvirtual |
Plays the given data block as video.
Data points to exactly one complete TS packet of the given Length (which is always TS_SIZE). PlayTsVideo() shall process the packet either as a whole (returning Length) or not at all (returning 0 or -1 and setting 'errno' accordingly). The default implementation collects all incoming TS payload belonging to one PES packet and calls PlayVideo() with the resulting packet.
Reimplemented from cDevice.
Definition at line 909 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvEnableSync(), HDFF::cHdffCmdIf::CmdAvSetPcrPid(), HDFF::cHdffCmdIf::CmdAvSetVideoPid(), fd_video, freezed, isPlayingVideo, isTransferMode, MapVideoStreamTypes(), mHdffCmdIf, cDevice::PatPmtParser(), playPcrPid, playVideoPid, supportsPcrInTransferMode, TsPid(), and WriteAllOrNothing().
|
protectedvirtual |
Plays the given data block as video.
Data points to exactly one complete PES packet of the given Length. PlayVideo() shall process the packet either as a whole (returning Length) or not at all (returning 0 or -1 and setting 'errno' accordingly). Returns the number of bytes actually taken from Data, or -1 in case of an error.
Reimplemented from cDevice.
Definition at line 828 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvEnableSync(), HDFF::cHdffCmdIf::CmdAvSetVideoPid(), fd_video, freezed, HDFF_VIDEO_STREAM_MPEG2, isPlayingVideo, mHdffCmdIf, PesToTs(), playVideoPid, cDvbDevice::tsBuffer, videoCounter, and WriteAllOrNothing().
|
virtual |
Returns true if the device itself or any of the file handles in Poller is ready for further action.
If TimeoutMs is not zero, the device will wait up to the given number of milliseconds before returning in case it can't accept any data.
Reimplemented from cDevice.
Definition at line 768 of file dvbhdffdevice.c.
References cPoller::Add(), fd_video, and cPoller::Poll().
|
static |
|
virtual |
Returns true if this device can provide the given source.
Reimplemented from cDvbDevice.
Definition at line 360 of file dvbhdffdevice.c.
References outputOnly, and cDvbDevice::ProvidesSource().
|
virtual |
Scales the currently shown video in such a way that it fits into the given Rect.
Rect should be one retrieved through a previous call to CanScaleVideo() (otherwise results may be undefined). Even if video output is scaled, the functions GetVideoSize() and GetOsdSize() must still return the same values as if in full screen mode! If this device can't scale the video, nothing happens. To restore full screen video, call this function with a Null rectangle.
Reimplemented from cDevice.
Definition at line 588 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvSetVideoWindow(), GetOsdSize(), cRect::Height(), mHdffCmdIf, cRect::Null, cRect::Width(), cRect::X(), and cRect::Y().
|
protectedvirtual |
Sets the audio channel to stereo (0), mono left (1) or mono right (2).
Reimplemented from cDevice.
Definition at line 446 of file dvbhdffdevice.c.
References audioChannel, HDFF::cHdffCmdIf::CmdAvSetAudioChannel(), and mHdffCmdIf.
|
protectedvirtual |
Sets the current audio track to the given value.
Reimplemented from cDevice.
Definition at line 457 of file dvbhdffdevice.c.
References cChannel::Atype(), cDevice::CamSlot(), cDevice::CurrentChannel(), cDevice::DetachAll(), cChannel::Dtype(), cDevice::GetTrack(), tTrackId::id, IS_AUDIO_TRACK, IS_DOLBY_TRACK, LOCK_CHANNELS_READ, cDevice::cPidHandle::pid, cDevice::pidHandles, cDevice::ptAudio, SetPid(), cCamSlot::SetPid(), cCamSlot::StartDecrypting(), cDevice::cPidHandle::streamType, ttAudioFirst, and ttDolbyFirst.
|
protectedvirtual |
Sets the device to the given channel (actual physical setup).
Reimplemented from cDvbDevice.
Definition at line 389 of file dvbhdffdevice.c.
References cDevice::AddPid(), cChannel::Apid(), cChannel::Ca(), CA_ENCRYPTED_MIN, cChannelCamRelations::CamDecrypt(), cDevice::CamSlot(), cDevice::CardIndex(), ChannelCamRelations, cChannel::Dpid(), cChannel::Dtype(), esyslog, cChannel::GetChannelID(), cDevice::HasPid(), cDevice::IsPrimaryDevice(), cDvbDevice::IsTunedToTransponder(), cControl::Launch(), cChannel::Number(), cDevice::cPidHandle::pid, cDevice::pidHandles, cChannel::Ppid(), cDevice::ptAudio, cDevice::ptPcr, cDevice::ptVideo, cDvbDevice::SetChannelDevice(), cCamSlot::SlotNumber(), TurnOffLiveMode(), cChannel::Vpid(), and cChannel::Vtype().
|
protectedvirtual |
Does the actual PID setting on this device.
On indicates whether the PID shall be added or deleted. Handle->handle can be used by the device to store information it needs to receive this PID (for instance a file handle). Handle->used indicates how many receivers are using this PID. Type indicates some special types of PIDs, which the device may need to set in a specific way.
Reimplemented from cDvbDevice.
Definition at line 292 of file dvbhdffdevice.c.
References SI::AC3DescriptorTag, cDvbDevice::adapter, CHECK, HDFF::cHdffCmdIf::CmdAvSetAudioPid(), HDFF::cHdffCmdIf::CmdAvSetPcrPid(), HDFF::cHdffCmdIf::CmdAvSetVideoPid(), DEV_DVB_DEMUX, DvbOpen(), SI::EnhancedAC3DescriptorTag, cDvbDevice::frontend, cDevice::cPidHandle::handle, HDFF_AUDIO_STREAM_AAC, HDFF_AUDIO_STREAM_AC3, HDFF_AUDIO_STREAM_EAC3, HDFF_AUDIO_STREAM_HE_AAC, HDFF_AUDIO_STREAM_MPEG1, HDFF_AUDIO_STREAM_MPEG2, HDFF_VIDEO_STREAM_H264, HDFF_VIDEO_STREAM_MPEG1, HDFF_VIDEO_STREAM_MPEG2, LOG_ERROR, mHdffCmdIf, cDevice::cPidHandle::pid, cDevice::ptAudio, cDevice::ptDolby, cDevice::ptPcr, cDevice::ptVideo, cDevice::cPidHandle::streamType, and cDevice::cPidHandle::used.
Referenced by SetAudioTrackDevice().
|
protectedvirtual |
Sets the device into the given play mode.
Returns true if the operation was successful.
Reimplemented from cDevice.
Definition at line 496 of file dvbhdffdevice.c.
References cDvbDevice::adapter, audioCounter, HDFF::cHdffCmdIf::CmdAvEnableSync(), HDFF::cHdffCmdIf::CmdAvEnableVideoAfterStop(), HDFF::cHdffCmdIf::CmdAvMuteAudio(), HDFF::cHdffCmdIf::CmdAvSetAudioPid(), HDFF::cHdffCmdIf::CmdAvSetAudioSpeed(), HDFF::cHdffCmdIf::CmdAvSetDecoderInput(), HDFF::cHdffCmdIf::CmdAvSetPcrPid(), HDFF::cHdffCmdIf::CmdAvSetPlayMode(), HDFF::cHdffCmdIf::CmdAvSetStc(), HDFF::cHdffCmdIf::CmdAvSetVideoPid(), HDFF::cHdffCmdIf::CmdAvSetVideoSpeed(), DEV_DVB_AUDIO, DEV_DVB_VIDEO, DvbOpen(), fd_audio, fd_video, freezed, cDvbDevice::frontend, HDFF_AUDIO_STREAM_MPEG1, HDFF_VIDEO_STREAM_MPEG1, isPlayingVideo, isTransferMode, mHdffCmdIf, playAudioPid, playMode, playPcrPid, playVideoPid, pmExtern_THIS_SHOULD_BE_AVOIDED, pmNone, cTransferControl::ReceiverDevice(), cDevice::Transferring(), trickMode, TurnOffLiveMode(), and videoCounter.
|
virtual |
Sets the video display format to the given one (only useful if this device has an MPEG decoder).
A derived class must first call the base class function! NOTE: this is only for SD devices. HD devices shall implement their own setup menu with the necessary parameters for controlling output.
Reimplemented from cDevice.
Definition at line 246 of file dvbhdffdevice.c.
References gHdffSetup, HDFF_TV_FORMAT_4_BY_3, HDFF_VIDEO_CONVERSION_CENTRE_CUT_OUT, HDFF_VIDEO_CONVERSION_LETTERBOX_16_BY_9, mHdffCmdIf, cDevice::SetVideoDisplayFormat(), cHdffSetup::SetVideoFormat(), cHdffSetup::TvFormat, vdfCenterCutOut, vdfLetterBox, vdfPanAndScan, and cHdffSetup::VideoConversion.
|
protectedvirtual |
Sets the audio volume on this device (Volume = 0...255).
Reimplemented from cDevice.
Definition at line 452 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdMuxSetVolume(), and mHdffCmdIf.
|
virtual |
Displays the given I-frame as a still picture.
Data points either to a series of TS (first byte is 0x47) or PES (first byte is 0x00) data of the given Length. The default implementation converts TS to PES and calls itself again, allowing a derived class to display PES if it can't handle TS directly.
Reimplemented from cDevice.
Definition at line 689 of file dvbhdffdevice.c.
References HDFF::cHdffCmdIf::CmdAvShowStillImage(), MALLOC, MapVideoStreamTypes(), mHdffCmdIf, cDevice::PatPmtParser(), cDevice::StillPicture(), and TS_SIZE.
|
virtual |
Definition at line 631 of file dvbhdffdevice.c.
References HDFF_AUDIO_STREAM_MPEG1.
|
private |
Definition at line 374 of file dvbhdffdevice.c.
References cDevice::DelPid(), cDevice::DetachAll(), cDevice::pidHandles, cDevice::ptAudio, cDevice::ptDolby, cDevice::ptPcr, cDevice::ptTeletext, and cDevice::ptVideo.
Referenced by SetChannelDevice(), and SetPlayMode().
|
private |
Definition at line 78 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), GetAudioChannelDevice(), and SetAudioChannelDevice().
|
private |
Definition at line 98 of file dvbhdffdevice.h.
Referenced by PlayAudio(), and SetPlayMode().
|
staticprivate |
Definition at line 132 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), and GetHdffCmdHandler().
|
private |
Definition at line 26 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), GetSTC(), and SetPlayMode().
|
private |
Definition at line 26 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice().
|
private |
Definition at line 26 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), Clear(), GetSTC(), GetVideoSize(), PlayAudio(), PlayTsAudio(), PlayTsVideo(), PlayVideo(), Poll(), and SetPlayMode().
|
private |
Definition at line 90 of file dvbhdffdevice.h.
Referenced by Freeze(), Play(), PlayAudio(), PlayTsAudio(), PlayTsVideo(), PlayVideo(), and SetPlayMode().
|
private |
Definition at line 133 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), HasDecoder(), and ~cDvbHdFfDevice().
|
private |
Definition at line 92 of file dvbhdffdevice.h.
Referenced by GetSTC(), Play(), PlayTsVideo(), PlayVideo(), and SetPlayMode().
|
private |
Definition at line 93 of file dvbhdffdevice.h.
Referenced by PlayTsVideo(), and SetPlayMode().
|
private |
Definition at line 134 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), Clear(), Freeze(), MakePrimaryDevice(), Mute(), Play(), PlayAudio(), PlayTsAudio(), PlayTsVideo(), PlayVideo(), ScaleVideo(), SetAudioChannelDevice(), SetPid(), SetPlayMode(), SetVideoDisplayFormat(), SetVolumeDevice(), StillPicture(), and ~cDvbHdFfDevice().
|
private |
Definition at line 27 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), NumProvidedSystems(), and ProvidesSource().
|
private |
Definition at line 88 of file dvbhdffdevice.h.
Referenced by Clear(), PlayAudio(), PlayTsAudio(), and SetPlayMode().
|
protected |
Definition at line 103 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), and SetPlayMode().
|
private |
Definition at line 89 of file dvbhdffdevice.h.
Referenced by PlayTsVideo(), and SetPlayMode().
|
private |
Definition at line 87 of file dvbhdffdevice.h.
Referenced by Clear(), PlayTsVideo(), PlayVideo(), and SetPlayMode().
|
private |
Definition at line 39 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), GetSpuDecoder(), and ~cDvbHdFfDevice().
|
private |
Definition at line 94 of file dvbhdffdevice.h.
Referenced by cDvbHdFfDevice(), and PlayTsVideo().
|
private |
Definition at line 91 of file dvbhdffdevice.h.
Referenced by Play(), and SetPlayMode().
|
private |
Definition at line 97 of file dvbhdffdevice.h.
Referenced by PlayVideo(), and SetPlayMode().