RemoteEncoder Class Reference

#include <remoteencoder.h>

List of all members.


Detailed Description

Definition at line 15 of file remoteencoder.h.


Public Member Functions

 RemoteEncoder (int num, const QString &host, short port)
 ~RemoteEncoder (void)
void Setup (void)
bool IsValidRecorder (void)
int GetRecorderNumber (void)
ProgramInfoGetRecording (void)
bool IsRecording (void)
float GetFrameRate (void)
 Returns recordering frame rate set by nvr.
long long GetFramesWritten (void)
 Returns number of frames written to disk by TVRec's RecorderBase instance.
long long GetCachedFramesWritten (void) const
 Return value last returned by GetFramesWritten().
long long GetFilePosition (void)
 Returns total number of bytes written by TVRec's RingBuffer.
long long GetFreeDiskSpace ()
long long GetMaxBitrate ()
long long GetKeyframePosition (long long desired)
 Returns byte position in RingBuffer of a keyframe.
void FillPositionMap (int start, int end, QMap< long long, long long > &positionMap)
void StopPlaying (void)
 Tells TVRec to stop streaming a recording to the frontend.
void SpawnLiveTV (QString chainid, bool pip, QString startchan)
 Tells TVRec to Spawn a "Live TV" recorder.
void StopLiveTV (void)
 Tells TVRec to stop a "Live TV" recorder.
void PauseRecorder (void)
 Tells TVRec to pause a recorder, used for channel and input changes.
void FinishRecording (void)
void FrontendReady (void)
void CancelNextRecording (bool cancel)
void SetLiveRecording (bool recording)
QString GetInput (void)
QString SetInput (QString)
int GetPictureAttribute (PictureAttribute attr)
int ChangePictureAttribute (PictureAdjustType type, PictureAttribute attr, bool up)
 Changes brightness/contrast/colour/hue of a recording.
void ChangeChannel (int channeldirection)
void ChangeDeinterlacer (int deint_mode)
void ToggleChannelFavorite (void)
void SetChannel (QString channel)
int SetSignalMonitoringRate (int msec, bool notifyFrontend=true)
 Sets the signal monitoring rate.
uint GetSignalLockTimeout (QString input)
bool CheckChannel (QString channel)
 Checks if named channel exists on current tuner.
bool ShouldSwitchToAnotherCard (QString channelid)
 Checks if named channel exists on current tuner, or another tuner.
bool CheckChannelPrefix (const QString &, uint &, bool &, QString &)
 Checks a prefix against the channels in the DB.
void GetNextProgram (int direction, QString &title, QString &subtitle, QString &desc, QString &category, QString &starttime, QString &endtime, QString &callsign, QString &iconpath, QString &channelname, QString &chanid, QString &seriesid, QString &programid)
 Returns information about the program that would be seen if we changed the channel using ChangeChannel(int) with "direction".
void GetChannelInfo (QMap< QString, QString > &infoMap, uint chanid=0)
bool SetChannelInfo (const QMap< QString, QString > &infoMap)
bool GetErrorStatus (void)

Private Member Functions

MythSocketopenControlSocket (const QString &host, short port)
void SendReceiveStringList (QStringList &strlist)

Private Attributes

int recordernum
MythSocketcontrolSock
QMutex lock
QString remotehost
short remoteport
QString lastchannel
QString lastinput
bool backendError
long long cachedFramesWritten
QMap< QString, uintcachedTimeout

Constructor & Destructor Documentation

RemoteEncoder::RemoteEncoder ( int  num,
const QString &  host,
short  port 
)

Definition at line 15 of file remoteencoder.cpp.

RemoteEncoder::~RemoteEncoder ( void   ) 

Definition at line 22 of file remoteencoder.cpp.


Member Function Documentation

void RemoteEncoder::Setup ( void   ) 

bool RemoteEncoder::IsValidRecorder ( void   ) 

int RemoteEncoder::GetRecorderNumber ( void   ) 

ProgramInfo * RemoteEncoder::GetRecording ( void   ) 

Definition at line 103 of file remoteencoder.cpp.

Referenced by TV::RunTV().

bool RemoteEncoder::IsRecording ( void   ) 

Definition at line 92 of file remoteencoder.cpp.

Referenced by TV::RunTV(), and TV::StartRecorder().

float RemoteEncoder::GetFrameRate ( void   ) 

Returns recordering frame rate set by nvr.

See also:
TVRec::GetFramerate(void), EncoderLink::GetFramerate(void), RecorderBase::GetFrameRate(void)
Returns:
Frames per second if query succeeds -1 otherwise.

Definition at line 121 of file remoteencoder.cpp.

Referenced by TV::StartRecorder(), and TV::SwapPIP().

long long RemoteEncoder::GetFramesWritten ( void   ) 

long long RemoteEncoder::GetCachedFramesWritten ( void   )  const [inline]

Return value last returned by GetFramesWritten().

Definition at line 30 of file remoteencoder.h.

Referenced by NuppelVideoPlayer::IsNearEnd().

long long RemoteEncoder::GetFilePosition ( void   ) 

Returns total number of bytes written by TVRec's RingBuffer.

See also:
TVRec::GetFilePosition(void), EncoderLink::GetFilePosition(void)
Returns:
Bytes written if query succeeds, -1 otherwise.

Definition at line 157 of file remoteencoder.cpp.

long long RemoteEncoder::GetFreeDiskSpace (  ) 

long long RemoteEncoder::GetMaxBitrate ( void   ) 

Definition at line 173 of file remoteencoder.cpp.

long long RemoteEncoder::GetKeyframePosition ( long long  desired  ) 

Returns byte position in RingBuffer of a keyframe.

See also:
TVRec::GetKeyframePosition(long long), EncoderLink::GetKeyframePosition(long long)
Returns:
Byte position of keyframe if query succeeds, -1 otherwise.

Definition at line 192 of file remoteencoder.cpp.

void RemoteEncoder::FillPositionMap ( int  start,
int  end,
QMap< long long, long long > &  positionMap 
)

Definition at line 205 of file remoteencoder.cpp.

Referenced by DecoderBase::PosMapFromEnc().

void RemoteEncoder::StopPlaying ( void   ) 

Tells TVRec to stop streaming a recording to the frontend.

See also:
TVRec::StopPlaying(void), EncoderLink::StopPlaying(void)

Definition at line 250 of file remoteencoder.cpp.

void RemoteEncoder::SpawnLiveTV ( QString  chainid,
bool  pip,
QString  startchan 
)

void RemoteEncoder::StopLiveTV ( void   ) 

Tells TVRec to stop a "Live TV" recorder.

This only works on local recorders.

See also:
TVRec::StopLiveTV(void), EncoderLink::StopLiveTV(void)

Definition at line 279 of file remoteencoder.cpp.

Referenced by TV::StopStuff(), TV::SwitchCards(), and TV::TogglePIPView().

void RemoteEncoder::PauseRecorder ( void   ) 

Tells TVRec to pause a recorder, used for channel and input changes.

See also:
TVRec::PauseRecorder(void), EncoderLink::PauseRecorder(void), RecorderBase::Pause(void)

Definition at line 292 of file remoteencoder.cpp.

Referenced by TV::PauseLiveTV().

void RemoteEncoder::FinishRecording ( void   ) 

Definition at line 302 of file remoteencoder.cpp.

Referenced by TV::FinishRecording().

void RemoteEncoder::FrontendReady ( void   ) 

Definition at line 238 of file remoteencoder.cpp.

Referenced by TV::HandleStateChange().

void RemoteEncoder::CancelNextRecording ( bool  cancel  ) 

Definition at line 229 of file remoteencoder.cpp.

Referenced by TV::HandleOSDAskAllowResponse().

void RemoteEncoder::SetLiveRecording ( bool  recording  ) 

Definition at line 310 of file remoteencoder.cpp.

Referenced by TV::ToggleRecord().

QString RemoteEncoder::GetInput ( void   ) 

QString RemoteEncoder::SetInput ( QString  input  ) 

Definition at line 333 of file remoteencoder.cpp.

Referenced by TV::ToggleInputs().

int RemoteEncoder::GetPictureAttribute ( PictureAttribute  attr  ) 

Definition at line 443 of file remoteencoder.cpp.

Referenced by TV::DoTogglePictureAttribute().

int RemoteEncoder::ChangePictureAttribute ( PictureAdjustType  type,
PictureAttribute  attr,
bool  up 
)

Changes brightness/contrast/colour/hue of a recording.

Note: In practice this only works with frame grabbing recorders.

Returns:
contrast if it succeeds, -1 otherwise.

Definition at line 471 of file remoteencoder.cpp.

Referenced by TV::DoChangePictureAttribute().

void RemoteEncoder::ChangeChannel ( int  channeldirection  ) 

Definition at line 355 of file remoteencoder.cpp.

Referenced by TV::ChangeChannel().

void RemoteEncoder::ChangeDeinterlacer ( int  deint_mode  ) 

Definition at line 496 of file remoteencoder.cpp.

void RemoteEncoder::ToggleChannelFavorite ( void   ) 

Definition at line 347 of file remoteencoder.cpp.

Referenced by TV::ToggleChannelFavorite().

void RemoteEncoder::SetChannel ( QString  channel  ) 

Definition at line 367 of file remoteencoder.cpp.

Referenced by TV::ChangeChannel().

int RemoteEncoder::SetSignalMonitoringRate ( int  msec,
bool  notifyFrontend = true 
)

Sets the signal monitoring rate.

This will actually call SetupSignalMonitor() and TeardownSignalMonitor(bool) as needed, so it can be used directly, without worrying about the SignalMonitor instance.

See also:
TVRec::SetSignalMonitoringRate(int,int), EncoderLink::SetSignalMonitoringRate(int,bool)
Parameters:
rate The update rate to use in milliseconds, use 0 to disable.
notifyFrontend If true, SIGNAL messages will be sent to the frontend using this recorder.
Returns:
Previous update rate

Definition at line 395 of file remoteencoder.cpp.

Referenced by TV::ProcessKeypress().

uint RemoteEncoder::GetSignalLockTimeout ( QString  input  ) 

bool RemoteEncoder::CheckChannel ( QString  channel  ) 

Checks if named channel exists on current tuner.

Parameters:
channel Channel to verify against current tuner.
Returns:
true if it succeeds, false otherwise.
See also:
TVRec::CheckChannel(QString), EncoderLink::CheckChannel(const QString&), ShouldSwitchToAnotherCard(QString)

Definition at line 514 of file remoteencoder.cpp.

Referenced by TV::BrowseChannel(), and TV::ChangeChannel().

bool RemoteEncoder::ShouldSwitchToAnotherCard ( QString  channelid  ) 

Checks if named channel exists on current tuner, or another tuner.

This only works on local recorders.

Parameters:
channelid channel to verify against tuners.
Returns:
true if the channel on another tuner and not current tuner, false otherwise.
See also:
CheckChannel(const QString&)

Definition at line 535 of file remoteencoder.cpp.

Referenced by TV::ChangeChannel().

bool RemoteEncoder::CheckChannelPrefix ( const QString &  prefix,
uint is_complete_valid_channel_on_rec,
bool is_extra_char_useful,
QString &  needed_spacer 
)

Checks a prefix against the channels in the DB.

See also:
TVRec::CheckChannelPrefix(const QString&,uint&,bool&,QString&) for details.

Definition at line 556 of file remoteencoder.cpp.

Referenced by TV::ChangeChannel(), and TV::ProcessSmartChannel().

void RemoteEncoder::GetNextProgram ( int  direction,
QString &  title,
QString &  subtitle,
QString &  desc,
QString &  category,
QString &  starttime,
QString &  endtime,
QString &  callsign,
QString &  iconpath,
QString &  channelname,
QString &  chanid,
QString &  seriesid,
QString &  programid 
)

void RemoteEncoder::GetChannelInfo ( QMap< QString, QString > &  infoMap,
uint  chanid = 0 
)

bool RemoteEncoder::SetChannelInfo ( const QMap< QString, QString > &  infoMap  ) 

Definition at line 645 of file remoteencoder.cpp.

Referenced by TV::ChannelEditKey().

bool RemoteEncoder::GetErrorStatus ( void   )  [inline]

Definition at line 68 of file remoteencoder.h.

Referenced by TV::RunTV(), and NuppelVideoPlayer::StartPlaying().

MythSocket * RemoteEncoder::openControlSocket ( const QString &  host,
short  port 
) [private]

Definition at line 63 of file remoteencoder.cpp.

Referenced by Setup().

void RemoteEncoder::SendReceiveStringList ( QStringList &  strlist  )  [private]


Member Data Documentation

Definition at line 77 of file remoteencoder.h.

Referenced by SendReceiveStringList(), Setup(), and ~RemoteEncoder().

QMutex RemoteEncoder::lock [private]

Definition at line 78 of file remoteencoder.h.

Referenced by GetSignalLockTimeout(), and SendReceiveStringList().

QString RemoteEncoder::remotehost [private]

Definition at line 80 of file remoteencoder.h.

Referenced by Setup().

short RemoteEncoder::remoteport [private]

Definition at line 81 of file remoteencoder.h.

Referenced by Setup().

QString RemoteEncoder::lastchannel [private]

Definition at line 83 of file remoteencoder.h.

Referenced by ChangeChannel(), SetChannel(), and SetInput().

QString RemoteEncoder::lastinput [private]

Definition at line 84 of file remoteencoder.h.

Referenced by ChangeChannel(), GetInput(), PauseRecorder(), SetChannel(), and SetInput().

Definition at line 86 of file remoteencoder.h.

Referenced by SendReceiveStringList().

Definition at line 87 of file remoteencoder.h.

Referenced by GetFramesWritten().

QMap<QString,uint> RemoteEncoder::cachedTimeout [private]

Definition at line 88 of file remoteencoder.h.

Referenced by GetSignalLockTimeout().


The documentation for this class was generated from the following files:

Generated on Sat Sep 4 05:16:08 2010 for MythTV by  doxygen 1.5.5