cRecordingPlayer Class Reference

#include <recplayer.h>

Inheritance diagram for cRecordingPlayer:

Inheritance graph
[legend]
Collaboration diagram for cRecordingPlayer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void open (UpnpOpenFileMode mode)
virtual int read (char *buf, size_t buflen)
virtual int write (char *buf, size_t buflen)
virtual int seek (off_t offset, int origin)
virtual void close ()

Static Public Member Functions

static cRecordingPlayernewInstance (cRecording *Recording)


Detailed Description

The recording player

This class provides the ability to play VDR records. The difference between usual files and VDR recording files is, that recordings are possibly splitted into multiple files. The class will scan those files and tries to dynamically navigate in them like it would do, if it is a single file.


Member Function Documentation

void cRecordingPlayer::close (  )  [virtual]

Closes the open file

This will close open file handles and frees the memory obtained by it.

Implements cFileHandle.

cRecordingPlayer * cRecordingPlayer::newInstance ( cRecording *  Recording  )  [static]

Get a new instance of a recording player

This returns a new instance of a recording player which plays the specified VDR recording.

Parameters:
Recording the recording to play
Returns:
the new instance of the recording player

void cRecordingPlayer::open ( UpnpOpenFileMode  mode  )  [virtual]

Opens the file

Opens the file at the given mode. These can be:

  • UPNP_READ, to read from the file
  • UPNP_WRITE, to write to the file

Parameters:
mode The file mode, i.e. one of the following
  • UPNP_READ
  • UPNP_WRITE

Implements cFileHandle.

int cRecordingPlayer::read ( char *  buf,
size_t  buflen 
) [virtual]

Reads from the file

Reads from the file a certain amount of bytes and stores them in a buffer

Returns:
returns
  • <0, in case of an error
  • 0, when reading was successful
Parameters:
buf The char buffer
buflen The size of the buffer

Implements cFileHandle.

int cRecordingPlayer::seek ( off_t  offset,
int  whence 
) [virtual]

Seeks in the file

Seeks in the file where the offset is the relativ position depending on the second parameter. This means, in case of

  • SEEK_SET, the offset is relative to the beginning of the file
  • SEEK_CUR, it is relative to the current position or
  • SEEK_END, relative to the end of the file.

Returns:
returns
  • <0, in case of an error
  • 0, when reading was successful
Parameters:
offset The byte offset in the file
whence one of the following
  • SEEK_SET,
  • SEEK_CUR,
  • SEEK_END

Implements cFileHandle.

int cRecordingPlayer::write ( char *  buf,
size_t  buflen 
) [virtual]

Writes to the file

Writes to the file a certain amount of bytes which are stored in a buffer

Returns:
returns
  • <0, in case of an error
  • 0, when reading was successful
Parameters:
buf The char buffer
buflen The size of the buffer

Implements cFileHandle.


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

Generated on Sun Nov 8 15:44:09 2009 for UPnP/DLNA plugin for VDR by  doxygen 1.5.8