Fujitsu DTV/STB solution driver (FAPex driver) Documentation [VLR]


pvr.h File Reference


Data Structures

struct  PVR_DecoderControlT
struct  PVR_TargetControlT
struct  PVR_FileInfoT
 Information about a PVR file. More...
struct  PVR_RecordOpenT
 Parameters for opening a recording engine instance. More...
struct  PVR_RecordInfoT
 Information about recording. More...
struct  PVR_PlayMarkerT
 Structure to define markers to be used as jump markers or cut out areas. More...
struct  PVR_PlayOpenT
 Parameters for opening a playback engine instance. More...
struct  PVR_PlayInfoT
 Information about playback. More...
struct  PVR_TrackInfoT
 Track information. More...
struct  PVR_FastModeParamsIFramesT
struct  PVR_FastModeParamsAllT
struct  PVR_FastModeParamsNoneT
struct  PVR_FastModeParamsCtrlT
union  PVR_FastModeParamsT
struct  PVR_FastModeConfigT
 Fast mode configuration parameters. More...
struct  PVR_CryptoParamsT
 Crypto parameters. More...

Defines

#define PVR_DEFAULT_MOUNT_PATH   ""
 Default mount path used by the file system.
#define PVR_DEFAULT_FILE_EXTENSION   NULL
 Default extension appended to all files.
#define PVR_DEFAULT_SPLIT_DIGITS   2
 Default number of digits for split file numbering.
#define PVR_DEFAULT_SPLIT_USE_DEC   1
 Default numbering notation for split files.
#define PVR_PATH_NAME_LENGTH   63
 Maximum length of the mount path name.
#define PVR_FILE_NAME_LENGTH   31
 Maximum length of a filename.
#define PVR_FILE_SEP_LENGTH   1
 length of separator between filename and filename extension.
#define PVR_FILE_EXT_LENGTH   3
 Maximum length of file extension.
#define PVR_MAX_TRACKS   32
 Maximum number of tracks (PIDs) to be recorded in one file.
#define PVR_NAME_LENGTH   63
 Maximum length of a name stored in the recorded file.
#define PVR_TSPKT_SIZE   188
 TS packet size in bytes.
#define PVR_PKTS_PER_CHUNK   512
 Number of TS packets per data chunk (see PVR_CHUNK_SIZE).
#define PVR_CHUNK_SIZE   (PVR_TSPKT_SIZE * PVR_PKTS_PER_CHUNK)
 Size of one data chunk of PVR files in bytes.
#define PVR_USER_DATA_PACKETS   32
 Number of packets for user data.
#define PVR_MAX_FAST_MODES   64
 Number of available fast modes.
#define MIDDLEWARE_PVR_MODULE_BASE   -5000000
 PVR module base.
#define MIDDLEWARE_PVR_ERR_BAD_PARAMETER
#define MIDDLEWARE_PVR_ERR_OUT_OF_MEMORY
#define MIDDLEWARE_PVR_ERR_ALREADY_INITIALIZED
#define MIDDLEWARE_PVR_ERR_NOT_INITIALIZED
#define MIDDLEWARE_PVR_ERR_FEATURE_NOT_SUPPORTED
#define MIDDLEWARE_PVR_ERR_TIMEOUT
#define MIDDLEWARE_PVR_ERR_DEVICE_BUSY
#define MIDDLEWARE_PVR_ERR_INVALID_HANDLE
#define MIDDLEWARE_PVR_ERR_SEMAPHORE_CREATE
#define MIDDLEWARE_PVR_ERR_UNSUPPORTED_VERSION
#define MIDDLEWARE_PVR_ERR_BASE   (int32_t)(MIDDLEWARE_PVR_MODULE_BASE - 100)
#define MIDDLEWARE_PVR_ERR_FILE_HANDLING   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 0)
#define MIDDLEWARE_PVR_ERR_BAD_FILE_FORMAT   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 1)
#define MIDDLEWARE_PVR_ERR_FILE_READ   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 2)
#define MIDDLEWARE_PVR_ERR_BAD_PACKET_SIZE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 3)
#define MIDDLEWARE_PVR_ERR_FILE_EXISTS   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 4)
#define MIDDLEWARE_PVR_ERR_THREAD_ERROR   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 5)
#define MIDDLEWARE_PVR_ERR_BAD_MODE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 6)
#define MIDDLEWARE_PVR_ERR_DISK_WRITE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 7)
#define MIDDLEWARE_PVR_ERR_NO_VIDEO   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 8)
#define MIDDLEWARE_PVR_ERR_NO_TRACK_ASSIGNED   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 9)
#define MIDDLEWARE_PVR_ERR_WRONG_MARKER_TYPE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 10)
#define MIDDLEWARE_PVR_ERR_END_OF_DATA   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 11)
#define MIDDLEWARE_PVR_ERR_BEGIN_OF_DATA   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 12)
#define MIDDLEWARE_PVR_ERR_FILE_DOES_NOT_EXIST   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 13)
#define MIDDLEWARE_PVR_ERR_TSD   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 14)
#define MIDDLEWARE_PVR_ERR_BAD_FILE_VERSION   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 15)
#define MIDDLEWARE_PVR_ERR_NO_BUFFER_SPACE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 16)
#define MIDDLEWARE_PVR_ERR_CRYPTO_OP_FAILED   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 17)
#define PVR_TRACK_TYPE_VIDEO   0x00
 Video stream track.
#define PVR_TRACK_TYPE_AUDIO   0x01
 Audio stream track.
#define PVR_TRACK_TYPE_DEPRECATED   0x02
 Deprecated audio stream track.
#define PVR_TRACK_TYPE_TTX   0x03
 Teletext stream track.
#define PVR_TRACK_TYPE_NUMS   0x04
 controlled streams.
#define PVR_TRACK_TYPE_OTHER   0xFF
 Invalid/unspecified track type.
#define PVR_TRACK_FORMAT_OTHER   0x00
 Unknown/other format.
#define PVR_TRACK_FORMAT_VIDEO_MPEG1   0x01
 DVB stream_type: 0x01.
#define PVR_TRACK_FORMAT_VIDEO_MPEG2   0x02
 DVB stream_type: 0x02.
#define PVR_TRACK_FORMAT_VIDEO_H264   0x03
 DVB stream_type: 0x1B.
#define PVR_TRACK_FORMAT_AUDIO_MPEG1   0x01
 DVB stream_type: 0x03.
#define PVR_TRACK_FORMAT_AUDIO_MPEG2   0x02
 DVB stream_type: 0x04.
#define PVR_TRACK_FORMAT_AUDIO_AC3   0x03
 descr.
#define PVR_TRACK_FORMAT_AUDIO_AAC_MPEG2   0x04
 AAC: (str_type: 0x0F).
#define PVR_TRACK_FORMAT_AUDIO_AAC_MPEG4   0x05
 HE-AAC: (str_type: 0x11).
#define PVR_TRACK_FORMAT_AUDIO_DDPDCV   0x06
 0x06 + descr.)

Typedefs

typedef uint8_t PVR_TrackTypeT
 Streaming data types.
typedef void(* PVR_RecordCallback )(FAPEX_SYS_HandleT recHandle, PVR_RecordNotifyT reason)
 Notification function called by recording engine.
typedef uint8_t(* PVR_PlaybackFeedOutput )(uint8_t tsd, const uint32_t *pData, uint32_t packets, uint8_t discardStuffing, uint64_t *pMillisNeeded, int32_t tsd_block_fd)
 Generic playback function called by playback engine.
typedef void(* PVR_PlayCallback )(FAPEX_SYS_HandleT playHandle, PVR_PlayNotifyT reason)
 Notification function called by playback engine.

Enumerations

enum  PVR_VersionEnumT { PVR_VERSION = (int32_t)0x00020000 }
 Version of the PVR driver. More...
enum  PVR_RecordModeT { PVR_RECORD_MODE_CHANGING, PVR_RECORD_MODE_STOPPED, PVR_RECORD_MODE_NORMAL, PVR_RECORD_MODE_PAUSE }
 Recording modes. More...
enum  PVR_RecordNotifyT {
  PVR_RECORD_NOTIFY_FILE_ERROR, PVR_RECORD_NOTIFY_DISK_FULL, PVR_RECORD_NOTIFY_FILLING, PVR_RECORD_NOTIFY_LOOPING,
  PVR_RECORD_NOTIFY_NO_DATA, PVR_RECORD_NOTIFY_DATA, PVR_RECORD_NOTIFY_MAX_SIZE, PVR_RECORD_NOTIFY_STOP_POSITION,
  PVR_RECORD_NOTIFY_PERFORMANCE_LIMIT
}
 Recording notification reasons. More...
enum  PVR_PlayModeT {
  PVR_PLAY_MODE_CHANGING, PVR_PLAY_MODE_STOPPED, PVR_PLAY_MODE_NORMAL, PVR_PLAY_MODE_FAST,
  PVR_PLAY_MODE_SLOW, PVR_PLAY_MODE_PAUSE
}
 Playback modes. More...
enum  PVR_PlayNotifyT {
  PVR_PLAY_NOTIFY_NONE, PVR_PLAY_NOTIFY_FILE_ERROR, PVR_PLAY_NOTIFY_END_OF_DATA, PVR_PLAY_NOTIFY_BEGIN_OF_DATA,
  PVR_PLAY_NOTIFY_BEGIN_OVERWRITTEN, PVR_PLAY_NOTIFY_GAP_IN_DATA, PVR_PLAY_NOTIFY_TAG_SET, PVR_PLAY_NOTIFY_NAME_SET,
  PVR_PLAY_NOTIFY_IFRAME_LOCKED
}
 Playback notification reasons. More...
enum  PVR_SeekModeT {
  PVR_SEEK_MODE_CHUNKS, PVR_SEEK_MODE_CHUNKS_FORWARD, PVR_SEEK_MODE_CHUNKS_BACKWARD, PVR_SEEK_MODE_NAME_FORWARD,
  PVR_SEEK_MODE_NAME_BACKWARD, PVR_SEEK_MODE_TAG_FORWARD, PVR_SEEK_MODE_TAG_BACKWARD, PVR_SEEK_MODE_IFRAME_FORWARD,
  PVR_SEEK_MODE_IFRAME_BACKWARD, PVR_SEEK_MODE_TIME
}
 Playback engine seek modes. More...
enum  PVR_DecoderModeT {
  PVR_DECMODE_NONE = -1, PVR_DECMODE_NORMAL = 0, PVR_DECMODE_PAUSE, PVR_DECMODE_FAST,
  PVR_DECMODE_SLOW, PVR_DECMODE_FEEDDATA, PVR_DECMODE_FEEDCTRL
}
enum  PVR_DecoderTypeT {
  PVR_DECTYPE_VIDEO = 0, PVR_DECTYPE_AUDIO, PVR_DECTYPE_AUDIO_2ND, PVR_DECTYPE_TTX,
  PVR_DECTYPE_NUMS
}
enum  PVR_PlayMarkerTypeT {
  PVR_PLAY_MARKER_GENERAL = 0, PVR_PLAY_MARKER_JUMP_IN, PVR_PLAY_MARKER_JUMP_OUT, PVR_PLAY_MARKER_AB_REPEAT_IN,
  PVR_PLAY_MARKER_AB_REPEAT_OUT, PVR_PLAY_MARKER_NUM
}
enum  PVR_FastModeTypeT { PVR_FASTMODETYPE_IFRAMES = 0, PVR_FASTMODETYPE_FEED_ALL, PVR_FASTMODETYPE_FEED_NONE, PVR_FASTMODETYPE_FEED_CONTROLLED }

Functions

int32_t PVR_Init (void)
 Initialize the PVR library.
void PVR_Exit (void)
 Exit the PVR library.
int32_t PVR_GetFileInfo (const char_t *fileNamePtr, PVR_FileInfoT *fileInfoPtr)
 Provides information about an available PVR file.
int32_t PVR_DeleteFile (const char_t *fileNamePtr)
 Deletes a file.
int32_t PVR_SetMountPath (const char_t *pathPtr)
 Sets the mount path.
const char_t * PVR_GetMountPath (void)
 Returns the current mount path.
int32_t PVR_SetFileExtension (const char_t *extPtr)
 Set optional file extension string or disable file extension usage.
const char_t * PVR_GetFileExtension (void)
 Returns file extension string.
int32_t PVR_SetFileSplitParams (uint8_t numDigits, uint8_t decimalNotation)
 Set parameters for split file name generation.
FAPEX_SYS_HandleT PVR_OpenRecording (const PVR_RecordOpenT *paramsPtr, int32_t *errorCodePtr)
 Opens an instance of the recording engine.
int32_t PVR_CloseRecording (FAPEX_SYS_HandleT handle)
 Closes a recording instance.
int32_t PVR_SetRecordingMode (FAPEX_SYS_HandleT handle, PVR_RecordModeT recordMode)
 Controls a recording instance.
int32_t PVR_GetRecordingMode (FAPEX_SYS_HandleT handle, PVR_RecordModeT *recordModePtr)
 Returns the current recording mode.
int32_t PVR_SetRecordingPids (FAPEX_SYS_HandleT handle, const uint16_t *trackPidsPtr, const uint8_t *trackFormatPtr)
 Sets new PID and format information for each track.
int32_t PVR_SetRecordingPmt (FAPEX_SYS_HandleT handle, uint16_t pmtPid, const uint8_t *pmtPtr, uint32_t pmtSize, const uint16_t *trackPidsPtr, const uint8_t *trackFormatPtr)
 Hands over the PMT and set new PIDS for the recording.
int32_t PVR_SetRecordingTag (FAPEX_SYS_HandleT handle, uint32_t tag)
 Sets a new tag.
int32_t PVR_SetRecordingName (FAPEX_SYS_HandleT handle, const char_t *namePtr)
 Sets a new recording name.
int32_t PVR_GetRecordingOpen (FAPEX_SYS_HandleT handle, PVR_RecordOpenT *recordOpenPtr)
 Returns the open parameters.
int32_t PVR_GetRecordingInfo (FAPEX_SYS_HandleT handle, PVR_RecordInfoT *recordInfoPtr)
 Returns information about recording.
int32_t PVR_SetRecordingStopPos (FAPEX_SYS_HandleT handle, uint32_t position)
 Sets the stop position.
int32_t PVR_GetRecordingStopPos (FAPEX_SYS_HandleT handle, uint32_t *positionPtr)
 Returns the stop position.
int32_t PVR_SetRecordingPerfLimitTimeout (FAPEX_SYS_HandleT handle, uint32_t timeout)
 Set performance limit timeout for notification.
int32_t PVR_GetRecordingPerfLimitTimeout (FAPEX_SYS_HandleT handle, uint32_t *timeoutPtr)
 Returns the set performance limit timeout value.
int32_t PVR_SetRecordingChannels (const uint8_t *channelsPtr)
 Sets a custom TSD channel assignment for all TSDs used for recording.
int32_t PVR_SetRecordingSourcePlayback (FAPEX_SYS_HandleT playHandle, FAPEX_SYS_HandleT recHandle)
 Assign the current playback (on TSD to be recorded) as source of the recording.
int32_t PVR_FlushRecordingData (FAPEX_SYS_HandleT handle, PVR_RecordInfoT *recordInfoPtr)
 Flushes all data of current recording and returns updated record info.
int32_t PVR_SetFlushingFrequency (FAPEX_SYS_HandleT handle, uint32_t numberOfChunks)
 Sets the frequency of data flushing or disables periodioc flushing.
int32_t PVR_EnableRecordingEncryption (FAPEX_SYS_HandleT handle, const PVR_CryptoParamsT *paramsPtr)
 Enable encryption of recording.
FAPEX_SYS_HandleT PVR_OpenPlayback (const PVR_PlayOpenT *paramsPtr, int32_t *errorCodePtr)
 Opens an instance of the playback engine.
int32_t PVR_ClosePlayback (FAPEX_SYS_HandleT handle)
 Closes a playback instance.
int32_t PVR_SeekPlayback (FAPEX_SYS_HandleT handle, PVR_SeekModeT mode, uint32_t value)
 Performs seek operation on a playback instance.
int32_t PVR_SetPlaybackMode (FAPEX_SYS_HandleT handle, PVR_PlayModeT playMode, uint8_t modeIndex)
 Controls a playback instance.
int32_t PVR_GetPlaybackMode (FAPEX_SYS_HandleT handle, PVR_PlayModeT *playModePtr, uint8_t *modeIndexPtr)
 Returns the current playback mode.
int32_t PVR_SetPlaybackTrack (FAPEX_SYS_HandleT handle, PVR_DecoderTypeT type, uint8_t trackIndex, uint32_t trackData)
 Sets a track to playback for a decoder type.
int32_t PVR_GetPlaybackTrack (FAPEX_SYS_HandleT handle, PVR_DecoderTypeT type, uint8_t *trackPtr)
 Returns the current track assigned to a decoder type.
int32_t PVR_GetPlaybackFileInfo (FAPEX_SYS_HandleT handle, PVR_FileInfoT *fileInfoPtr)
 Returns information about an open playback file.
int32_t PVR_GetPlaybackTrackInfo (FAPEX_SYS_HandleT handle, PVR_TrackInfoT *trackInfoPtr)
 Returns information about tracks included in running playback.
int32_t PVR_GetPlaybackInfo (FAPEX_SYS_HandleT handle, PVR_PlayInfoT *playInfoPtr)
 Returns information about a running playback.
int32_t PVR_EnablePlaybackOfFrames (FAPEX_SYS_HandleT handle, uint8_t enable)
 Enables the playback of I-Frames in fast or seek mode.
int32_t PVR_SetPlaybackFunction (FAPEX_SYS_HandleT handle, PVR_PlaybackFeedOutput function)
 Registers a generic function for feeding data during playback.
int32_t PVR_EnablePlaybackDecryption (FAPEX_SYS_HandleT handle, const PVR_CryptoParamsT *paramsPtr)
 Enable decryption of playback.
int32_t PVR_GetFastModeConfig (uint16_t index, PVR_FastModeConfigT *configPtr)
 Get a fast mode configuration.
int32_t PVR_SetFastModeConfig (uint16_t index, const PVR_FastModeConfigT *configPtr)
 Set a fast mode configuration.

Define Documentation

#define PVR_DEFAULT_MOUNT_PATH   ""

Default mount path used by the file system.

This path will be added to each filename.

#define PVR_DEFAULT_FILE_EXTENSION   NULL

Default extension appended to all files.

This option is disabled by default.

See also:
PVR_SetFileExtension()

#define PVR_DEFAULT_SPLIT_DIGITS   2

Default number of digits for split file numbering.

If a file name extension is used, digits will replace it for split files, otherwise they are simply appended to the specified filename.

#define PVR_DEFAULT_SPLIT_USE_DEC   1

Default numbering notation for split files.

If a file name extension is used, digits will replace it for split files, otherwise they are simply appended to the specified filename.

#define PVR_PATH_NAME_LENGTH   63

Maximum length of the mount path name.

The length does not include the ending zero.

#define PVR_FILE_NAME_LENGTH   31

Maximum length of a filename.

The length does not include the ending zero.

#define PVR_FILE_SEP_LENGTH   1

length of separator between filename and filename extension.

The length does not include the ending zero.

#define PVR_FILE_EXT_LENGTH   3

Maximum length of file extension.

The length does not include the ending zero.

#define PVR_MAX_TRACKS   32

Maximum number of tracks (PIDs) to be recorded in one file.

Note:
Do not change this value!

#define PVR_NAME_LENGTH   63

Maximum length of a name stored in the recorded file.

This name will typically be the service name which might change during recording.

The length does not include the ending zero.

#define PVR_TSPKT_SIZE   188

TS packet size in bytes.

#define PVR_PKTS_PER_CHUNK   512

Number of TS packets per data chunk (see PVR_CHUNK_SIZE).

#define PVR_CHUNK_SIZE   (PVR_TSPKT_SIZE * PVR_PKTS_PER_CHUNK)

Size of one data chunk of PVR files in bytes.

This value indicates the number of bytes which are written to and read from the hard disk drive in one single operation.

Note that this value must be divisible by 188 (TS packet size) and 512 (HDD sector size). So, the minimum value is 96256 bytes (94 kbytes).

#define PVR_USER_DATA_PACKETS   32

Number of packets for user data.

The user data is stored at the beginning of the file (starting at packet 1) and will be 'hidden' in stuffing packets. Note that each packet can contain 184 bytes (4 bytes used for TS header).

The size should not exceed 200 packets.

#define PVR_MAX_FAST_MODES   64

Number of available fast modes.

Fast modes can be individually configured by using the functions PVR_GetFastModeConfig and PVR_SetFastModeConfig.

#define MIDDLEWARE_PVR_MODULE_BASE   -5000000

PVR module base.

Standard error codes for the driver

#define MIDDLEWARE_PVR_ERR_BAD_PARAMETER

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_BAD_PARAMETER)

Bad parameter passed.

#define MIDDLEWARE_PVR_ERR_OUT_OF_MEMORY

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_OUT_OF_MEMORY)

Memory allocation failed.

#define MIDDLEWARE_PVR_ERR_ALREADY_INITIALIZED

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_ALREADY_INITIALIZED)

Device already initialised.

#define MIDDLEWARE_PVR_ERR_NOT_INITIALIZED

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_NOT_INITIALIZED)

Device not initialised.

#define MIDDLEWARE_PVR_ERR_FEATURE_NOT_SUPPORTED

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_FEATURE_NOT_SUPPORTED)

Feature or function is not available.

#define MIDDLEWARE_PVR_ERR_TIMEOUT

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_TIMEOUT)

Timeout occured.

#define MIDDLEWARE_PVR_ERR_DEVICE_BUSY

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_DEVICE_BUSY)

The device is busy, try again later.

#define MIDDLEWARE_PVR_ERR_INVALID_HANDLE

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_INVALID_HANDLE)

Invalid handle was passed.

#define MIDDLEWARE_PVR_ERR_SEMAPHORE_CREATE

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_SEMAPHORE_CREATE)

Semaphore could not be created.

#define MIDDLEWARE_PVR_ERR_UNSUPPORTED_VERSION

Value:

(int32_t)(MIDDLEWARE_PVR_MODULE_BASE +\

                                                           FAPEX_ERR_UNSUPPORTED_VERSION)

The driver's used version is not supported.

#define MIDDLEWARE_PVR_ERR_BASE   (int32_t)(MIDDLEWARE_PVR_MODULE_BASE - 100)

Additional driver error codes (reserved from -100 to -999)

Each error code shall be decreased in steps of 1.

PVR driver specfic error code base.

#define MIDDLEWARE_PVR_ERR_FILE_HANDLING   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 0)

PVR driver specific error XXX.

Note:
XXX should be replaced by a meaningful name.

#define MIDDLEWARE_PVR_ERR_BAD_FILE_FORMAT   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 1)

#define MIDDLEWARE_PVR_ERR_FILE_READ   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 2)

#define MIDDLEWARE_PVR_ERR_BAD_PACKET_SIZE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 3)

#define MIDDLEWARE_PVR_ERR_FILE_EXISTS   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 4)

#define MIDDLEWARE_PVR_ERR_THREAD_ERROR   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 5)

#define MIDDLEWARE_PVR_ERR_BAD_MODE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 6)

#define MIDDLEWARE_PVR_ERR_DISK_WRITE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 7)

#define MIDDLEWARE_PVR_ERR_NO_VIDEO   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 8)

#define MIDDLEWARE_PVR_ERR_NO_TRACK_ASSIGNED   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 9)

#define MIDDLEWARE_PVR_ERR_WRONG_MARKER_TYPE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 10)

#define MIDDLEWARE_PVR_ERR_END_OF_DATA   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 11)

#define MIDDLEWARE_PVR_ERR_BEGIN_OF_DATA   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 12)

#define MIDDLEWARE_PVR_ERR_FILE_DOES_NOT_EXIST   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 13)

#define MIDDLEWARE_PVR_ERR_TSD   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 14)

#define MIDDLEWARE_PVR_ERR_BAD_FILE_VERSION   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 15)

#define MIDDLEWARE_PVR_ERR_NO_BUFFER_SPACE   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 16)

#define MIDDLEWARE_PVR_ERR_CRYPTO_OP_FAILED   (int32_t)(MIDDLEWARE_PVR_ERR_BASE - 17)

#define PVR_TRACK_TYPE_VIDEO   0x00

Video stream track.

#define PVR_TRACK_TYPE_AUDIO   0x01

Audio stream track.

#define PVR_TRACK_TYPE_DEPRECATED   0x02

Deprecated audio stream track.

#define PVR_TRACK_TYPE_TTX   0x03

Teletext stream track.

#define PVR_TRACK_TYPE_NUMS   0x04

controlled streams.

Number of internally

#define PVR_TRACK_TYPE_OTHER   0xFF

Invalid/unspecified track type.

#define PVR_TRACK_FORMAT_OTHER   0x00

Unknown/other format.

Streaming type specific data formats

Note:
Maximum value is 0xF!

#define PVR_TRACK_FORMAT_VIDEO_MPEG1   0x01

DVB stream_type: 0x01.

#define PVR_TRACK_FORMAT_VIDEO_MPEG2   0x02

DVB stream_type: 0x02.

#define PVR_TRACK_FORMAT_VIDEO_H264   0x03

DVB stream_type: 0x1B.

#define PVR_TRACK_FORMAT_AUDIO_MPEG1   0x01

DVB stream_type: 0x03.

#define PVR_TRACK_FORMAT_AUDIO_MPEG2   0x02

DVB stream_type: 0x04.

#define PVR_TRACK_FORMAT_AUDIO_AC3   0x03

descr.

DVB stream_type: 0x06 +

#define PVR_TRACK_FORMAT_AUDIO_AAC_MPEG2   0x04

AAC: (str_type: 0x0F).

#define PVR_TRACK_FORMAT_AUDIO_AAC_MPEG4   0x05

HE-AAC: (str_type: 0x11).

#define PVR_TRACK_FORMAT_AUDIO_DDPDCV   0x06

0x06 + descr.)

E-AC3/DD+ (str_type:


Typedef Documentation

typedef uint8_t PVR_TrackTypeT

Streaming data types.

This type defines the different streaming data types which may be stored in a PVR file and are relevant for playback.

Note:
Only track types where the decoding is controlled by the PVR library are defined here. It is possible to use application-specific track types (e.g. for DVB subtitle streams, ECM/ECM, ...). For these types values from PVR_TRACK_TYPE_NUMS to (PVR_TRACK_TYPE_OTHER - 1) must be used in order to avoid conflicts!
See also:
PVR_FileInfoT
PVR_RecordOpenT

typedef void(* PVR_RecordCallback)(FAPEX_SYS_HandleT recHandle, PVR_RecordNotifyT reason)

Notification function called by recording engine.

This function will be called by a recording instance if one of the following events occur:

  • A file error or another error occurs.
  • The filling level of the hardware buffer exceeded the set limit.
  • The maximum file size is reached and looping is done.
  • The maximum file size is reached and the engine will be stopped.

Parameters:
reason Reason for notification.
error Error code of occurred error.
See also:
PVR_RecordOpenT

typedef uint8_t(* PVR_PlaybackFeedOutput)(uint8_t tsd, const uint32_t *pData, uint32_t packets, uint8_t discardStuffing, uint64_t *pMillisNeeded, int32_t tsd_block_fd)

Generic playback function called by playback engine.

Parameters:
tsd TSD expection data input by playback engine.
pData Pointer to data to be fed.
packets Number of packets contained in data buffer.
discardStuffing If 1, stuffing packets contained in data are ignored.
pMillisNeeded Optional facility to measure time consumption for data transfer, set to NULL if not needed.
See also:
PVR_SetPlaybackFunction

typedef void(* PVR_PlayCallback)(FAPEX_SYS_HandleT playHandle, PVR_PlayNotifyT reason)

Notification function called by playback engine.

This function will be called by a playback instance if one of the following events occur:

  • A file error or another error occurs.
  • The file end was reached.

Parameters:
reason Reason for notification.
error Error code of occurred error.
See also:
PVR_PLAY_OPEN_S


Enumeration Type Documentation

Version of the PVR driver.

This number consists of a major version number stored in bits 16 to 31 (upper word) and a minor version number stored in bits 0 to 15 (lower word).

  • The major number has to be increased when a parameter change occurs for the existing driver's API after its first release.
  • The minor number has to be increased when functions are added to the existing driver's API after its first release.

Note:
This value has to be assigend to the version field of PVR_RecordOpenT and PVR_PlayOpenT structures.
Enumerator:
PVR_VERSION  The current driver version.

Recording modes.

This enumeration type defines the different possible modes or states of a recording instance.

See also:
PVR_SetRecordingMode()
PVR_GetRecordingMode()
Enumerator:
PVR_RECORD_MODE_CHANGING  The recording engine is changing its operation mode. This is an intermediate state during mode transition.
PVR_RECORD_MODE_STOPPED  The recording engine is stopped. This mode will also be entered after opening a recording instance.
PVR_RECORD_MODE_NORMAL  The recording engine is recording.
PVR_RECORD_MODE_PAUSE  The recording engine is paused.

Recording notification reasons.

This enumeration type defines the different reasons for a recording instance to call the notification function.

See also:
PVR_RecordCallback
Enumerator:
PVR_RECORD_NOTIFY_FILE_ERROR  An error occurred during file access, i.e. writing or seeking the file. The recording engine will be paused, but data consistency can not be ensured.
PVR_RECORD_NOTIFY_DISK_FULL  Writing to the recording reports that the disk is full. The recording engine will be paused, but data consistency can not be ensured.
PVR_RECORD_NOTIFY_FILLING  The buffer filling exceeded the set limit.
PVR_RECORD_NOTIFY_LOOPING  The maximum file size is reached and looping is done. The write pointer will be moved to the beginning of the file.
PVR_RECORD_NOTIFY_NO_DATA  No data is available. Due to interruption of the incoming data the recording engine will enter a special waiting-for-data state.
PVR_RECORD_NOTIFY_DATA  Data is again available and recording will be continued.
PVR_RECORD_NOTIFY_MAX_SIZE  The set maximum file size is reached (or slightly exceeded) and looping is not enabled. The recording engine will be stopped immediately.
PVR_RECORD_NOTIFY_STOP_POSITION  The set stop position is reached and the recording will be stopped.
PVR_RECORD_NOTIFY_PERFORMANCE_LIMIT  The recording thread is at its performance limit for the specified time interval. The recording engine will be paused.

Playback modes.

This enumeration type defines the different possible modes or states of a playback instance.

See also:
PVR_SetPlaybackMode()
PVR_GetPlaybackMode()
Enumerator:
PVR_PLAY_MODE_CHANGING  The playback engine is changing its state. This is an intermediate state during mode transition.
PVR_PLAY_MODE_STOPPED  The playback engine is stopped.
PVR_PLAY_MODE_NORMAL  The playback engine is running with normal speed.
PVR_PLAY_MODE_FAST  The playback engine is running in the picture based mode. This mode can be entered only if the playback file contains video data.
PVR_PLAY_MODE_SLOW  The playback engine is running in slow motion mode. This mode can be entered only if the playback file contains video data. For slow motion each top field of a frame is repeated. The number of repeats is defined by the set speed whereas only values between 1 and 30 are allowed.
PVR_PLAY_MODE_PAUSE  The playback engine is freezing the video and audio. This mode is new and replaces the combination of FAST_MODE and speed = 0.

Playback notification reasons.

This enumeration type defines the different reasons for a playback instance to call the notification function.

See also:
PVR_PlayCallback
Enumerator:
PVR_PLAY_NOTIFY_NONE  Empty/invalid notification (internally used).
PVR_PLAY_NOTIFY_FILE_ERROR  An error occurred while reading the file. The playback engine will be stopped immediately.
PVR_PLAY_NOTIFY_END_OF_DATA  The end of data is reached and the playback engine will be stopped. If the picture based fast mode is active the speed will be set to zero, so that a still picture is being displayed. For circular files the end of data is not necessarily the physical end of the file.
PVR_PLAY_NOTIFY_BEGIN_OF_DATA  The beginning of data is reached and the playback engine will be paused, i.e. speed set to zero. This event may occur only in picture based mode.
PVR_PLAY_NOTIFY_BEGIN_OVERWRITTEN  The current playback position of a circular timeshift file is overwritten. The playback position will be set a few clusters ahead of the write position and normal playback will be started.
PVR_PLAY_NOTIFY_GAP_IN_DATA  Data was interrupted during recording at this position. For example, this event could be used to restart playback to avoid video macro blocks.
PVR_PLAY_NOTIFY_TAG_SET  A tag was set during recording at this position. Note that the value of the tag might not change.
PVR_PLAY_NOTIFY_NAME_SET  A name was set during recording at this position. Note that the value of the name might not change.
PVR_PLAY_NOTIFY_IFRAME_LOCKED  In search mode to next or previous I-Frame in a chunk this notifies that an I-Frame was found. Read pointer remains at this chunk.

Playback engine seek modes.

This enumeration type defines the different seek modes available during playback.

For all seek modes the following rules apply:

  • The seek position will be aligned to multiples of data chunks.
  • If the new position is less than zero it will be set to zero, (the beginning of the file).
  • If the new position is larger than the size of the file size it will be set to the end of the file.

See also:
PVR_SeekPlayback
Enumerator:
PVR_SEEK_MODE_CHUNKS  Seek to an absolute position in number of data chunks. The seek value indicates the absolute number of data chunks. The size of one data chunk is 96256 bytes (94 kbytes).
PVR_SEEK_MODE_CHUNKS_FORWARD  Seek forward relatively for a number of data chunks. The seek value indicates the number of data chunks to seek forward. The size of one data chunk is 96256 bytes (94 kbytes).
PVR_SEEK_MODE_CHUNKS_BACKWARD  Seek backward relatively for a number of data chunks. The seek value indicates the number of data chunks to seek backward. The size of one data chunk is 96256 bytes (94 kbytes).
PVR_SEEK_MODE_NAME_FORWARD  Seek forward to next name. If there is no new name the engine will seek to the end of the file. The seek value has no meaning.
PVR_SEEK_MODE_NAME_BACKWARD  Seek backward to previous name. If there is no other previous name the engine will seek to the beginning of the file. The seek value has no meaning.
PVR_SEEK_MODE_TAG_FORWARD  Seek forward to next tag.
PVR_SEEK_MODE_TAG_BACKWARD  Seek backward to previous tag.
PVR_SEEK_MODE_IFRAME_FORWARD  Seek forward to next chunk that contains an I-Frame
PVR_SEEK_MODE_IFRAME_BACKWARD  Seek backward to previous chunk that contains an I-Frame
PVR_SEEK_MODE_TIME  Seek to a given playback time. The value argument represents the requested playback time in milliseconds.

Enumerator:
PVR_DECMODE_NONE  Invalid mode.
PVR_DECMODE_NORMAL  Normal playback.
PVR_DECMODE_PAUSE  Paused playback.
PVR_DECMODE_FAST  Fast forward/backward mode, further specified by modeIndex
PVR_DECMODE_SLOW  Slow forward mode, further specified by modeIndex.
PVR_DECMODE_FEEDDATA  Special mode where decoder awaits data units provided by 'feedData' and displays them (e.g. Intra-Frames in case of video decoder).
PVR_DECMODE_FEEDCTRL  Special mode that uses decoder interface similar to fast mode type PVR_FASTMODETYPE_FEED_CONTROLLED, i.e. prepareData and isDataDecoded.

Enumerator:
PVR_DECTYPE_VIDEO  Video decoder.
PVR_DECTYPE_AUDIO  Audio decoder.
PVR_DECTYPE_AUDIO_2ND  Second audio decoder (e.g. for SPDIF).
PVR_DECTYPE_TTX  Teletext decoder.
PVR_DECTYPE_NUMS  Number of decoders.

Enumerator:
PVR_PLAY_MARKER_GENERAL  general usage marker
PVR_PLAY_MARKER_JUMP_IN  In point of a cut out scene.
PVR_PLAY_MARKER_JUMP_OUT  Out point of a cut out scene.
PVR_PLAY_MARKER_AB_REPEAT_IN  In point for AB repeat.
PVR_PLAY_MARKER_AB_REPEAT_OUT  Out point for AB repeat.
PVR_PLAY_MARKER_NUM 

Enumerator:
PVR_FASTMODETYPE_IFRAMES  Feeds only MPEG I-frames via callback feedData, allows forward and backwards modes.
PVR_FASTMODETYPE_FEED_ALL  Feeds all data, decoder can e.g. discard every second frame, ...
PVR_FASTMODETYPE_FEED_NONE  Feeds no data but seeks at a specified speed rate.
PVR_FASTMODETYPE_FEED_CONTROLLED  Feeds chunks of TS data controlled by decoder via callback, allows forward and backwards modes.


Function Documentation

int32_t PVR_Init ( void   ) 

Initialize the PVR library.

This function initializes the PVR library.

Attention:
It is assumed that hardware register layer and FAPI drivers have been initialized before.
Returns:
See also:
PVR_Exit

void PVR_Exit ( void   ) 

Exit the PVR library.

This function shuts down the PVR library. All allocated resources will be released.

See also:
PVR_Init

int32_t PVR_GetFileInfo ( const char_t *  fileNamePtr,
PVR_FileInfoT fileInfoPtr 
)

Provides information about an available PVR file.

This functions opens the file with the assigned filename and reads the first packet. This header packet contains information about the recorded stream which will be copied to the provided PVR_FileInfoT data structure. Finally, the file will be closed.

Note:
For circular recorded files the tag, name or track PIDs are not necessarily the initial values as they might change during recording.
Parameters:
fileNamePtr Pointer to filename.
fileInfoPtr Pointer to a file info structure PVR_FileInfoT that shall be filled.
Returns:
Possible error codes:

int32_t PVR_DeleteFile ( const char_t *  fileNamePtr  ) 

Deletes a file.

This functions deletes a PVR file and all its potentially existing split files. The mount path will be appended to the filename.

Parameters:
fileNamePtr Pointer to filename.
Returns:
Possible error codes:

int32_t PVR_SetMountPath ( const char_t *  pathPtr  ) 

Sets the mount path.

The maximum length of the path is defined in PVR_PATH_NAME_LENGTH.

Returns:
Possible error codes:
See also:
PVR_GetMountPath()

const char_t* PVR_GetMountPath ( void   ) 

Returns the current mount path.

Returns:
Pointer to the mount path.
See also:
PVR_SetMountPath()

int32_t PVR_SetFileExtension ( const char_t *  extPtr  ) 

Set optional file extension string or disable file extension usage.

If a file extension is requested, all file names passed with PVR_OpenRecording and PVR_OpenPlayback will be extended like this:

filename.extension

If a split file is generated, its extension will be replaced by the digits of the split file number, for example:

1st file: abc.ts
2nd file: abc.01

If a filename extension is not used (default), the digits for numbering the split files are simply appended to the file name:

1st file: abc
2nd file: abc01

Parameters:
extPtr Pointer to extension string, maximum number of characters is PVR_FILE_EXT_LENGTH. In order to disable usage of a file extension, pass a NULL pointer.
Returns:
Possible error codes:
See also:
PVR_GetFileExtension()

const char_t* PVR_GetFileExtension ( void   ) 

Returns file extension string.

Returns:
Pointer to file extension string or NULL if file extension usage is disabled.
See also:
PVR_SetFileExtension()

int32_t PVR_SetFileSplitParams ( uint8_t  numDigits,
uint8_t  decimalNotation 
)

Set parameters for split file name generation.

This function allows to specify how numbering for split files is performed. See PVR_DEFAULT_SPLIT_DIGITS and PVR_DEFAULT_SPLIT_USE_DEC for default behaviour.

Parameters:
numDigits Number of digits used for number, must be less or equal to PVR_FILE_EXT_LENGTH.
decimalNotation If 0, hexadecimal notation is used, otherwise decimal digits are used.
Returns:
Possible error codes:
See also:
PVR_SetFileExtension()

FAPEX_SYS_HandleT PVR_OpenRecording ( const PVR_RecordOpenT paramsPtr,
int32_t *  errorCodePtr 
)

Opens an instance of the recording engine.

Parameters:
paramsPtr Pointer to the open parameters.
errorCodePtr Pointer where error code should be stored or 0 if unused.
Returns:
  • (>0) valid driver instance handle on success.
  • (0) if the driver couldn't be opened. For further information about error reason please see errorCodePtr argument.
See also:
PVR_CloseRecording

int32_t PVR_CloseRecording ( FAPEX_SYS_HandleT  handle  ) 

Closes a recording instance.

This function destroys the corresponding recording thread, releases the allocated memory and closes the recorded file. If this file is also being played (time-shifting), the related playback instance will be notified.

The recording instance must not be running, otherwise the function will fail and MIDDLEWARE_PVR_ERR_BAD_MODE will be returned.

Parameters:
handle Valid driver instance handle previously returned by PVR_Open.
Returns:
See also:
PVR_OpenRecording

int32_t PVR_SetRecordingMode ( FAPEX_SYS_HandleT  handle,
PVR_RecordModeT  recordMode 
)

Controls a recording instance.

This function controls an instance of the recording engine by setting a new operating mode. If the instance is already operating in the requested mode, it will return without an error. If the instance is currently changing its mode MIDDLEWARE_PVR_ERR_BAD_MODE will be returned.

Because changing the mode is done in an asynchronous way it might take some milliseconds until the requested mode is entered. During this state transition the instance will be in the temporary mode PVR_RECORD_MODE_CHANGING. The current mode can be polled with PVR_GetRecordingMode().

The following recording modes can be set:

Parameters:
handle The handle of the recording engine instance.
recordMode The new recording mode to enter.
Returns:
Possible error codes:
See also:
PVR_GetRecordingMode()

int32_t PVR_GetRecordingMode ( FAPEX_SYS_HandleT  handle,
PVR_RecordModeT recordModePtr 
)

Returns the current recording mode.

This function returns the current mode of a recording instance.

Parameters:
handle The handle of the recording engine instance.
recordModePtr Pointer to a recording mode variable PVR_RecordModeT to be filled.
Returns:
Possible error codes:
See also:
PVR_SetRecordingMode()

int32_t PVR_SetRecordingPids ( FAPEX_SYS_HandleT  handle,
const uint16_t *  trackPidsPtr,
const uint8_t *  trackFormatPtr 
)

Sets new PID and format information for each track.

This function sets new track PIDs, for example to follow a changed video PID during recording. Also a change in video/audio format can be handled by setting a new trackFormat. The recording engine will stop, re-configure and finally re-start the corresponding TSD channels. A flag will be set within the stream to indicate the PID change and allow for a callback during playback.

Parameters:
handle The handle of the recording engine instance.
trackPidsPtr Pointer to array with the size of current number of tracks containing the new track PIDs. Set to NULL for the case that no PIDs shall be updated.
trackFormatPtr Pointer to array with the size of current number of tracks containing the new track format values. Set to NULL for the case that no track format shall be updated.
Returns:
Possible error codes:
See also:
PVR_SetRecordingPmt()

int32_t PVR_SetRecordingPmt ( FAPEX_SYS_HandleT  handle,
uint16_t  pmtPid,
const uint8_t *  pmtPtr,
uint32_t  pmtSize,
const uint16_t *  trackPidsPtr,
const uint8_t *  trackFormatPtr 
)

Hands over the PMT and set new PIDS for the recording.

Calling this function forces the recording engine to use the passed PMT instead of creating it. A PAT will still be created referencing this single PMT. The recording engine will make a copy of the PMT. The recorded PIDs can be updated as well at the same time.

Parameters:
handle The handle of the recording engine instance.
pmtPid The PID of the PMT for the creating the PAT.
pmtPtr Pointer to PMT section (max. size 1024 bytes).
pmtSize Size of the PMT in bytes.
trackPidsPtr Pointer to array with the size of current number of tracks containing the new track PIDs. Set to NULL for the case that no PIDs shall be updated.
trackFormatPtr Pointer to array with the size of current number of tracks containing the new track format values. Set to NULL for the case that no track format shall be updated.
Returns:
Possible error codes:
See also:
PVR_SetRecordingPids()

int32_t PVR_SetRecordingTag ( FAPEX_SYS_HandleT  handle,
uint32_t  tag 
)

Sets a new tag.

This function sets a new tag to the recording file. A tag is used to mark a position in the stream. During playback it is possible to seek to such a marked position.

Parameters:
handle The handle of the recording engine instance.
tag The new tag to set.
Returns:
Possible error codes:
See also:
PVR_SetRecordingName()

int32_t PVR_SetRecordingName ( FAPEX_SYS_HandleT  handle,
const char_t *  namePtr 
)

Sets a new recording name.

This function sets a new name to the recording file. This name could e.g. be the service name extracted from DVB service information (EIT present information).

The maximum length is defined by PVR_NAME_LENGTH.

Parameters:
handle The handle of the recording engine instance.
namePtr Pointer to the new name to set.
Returns:
Possible error codes:
See also:
PVR_SetRecordingTag()

int32_t PVR_GetRecordingOpen ( FAPEX_SYS_HandleT  handle,
PVR_RecordOpenT recordOpenPtr 
)

Returns the open parameters.

This function returns the parameters used when opening the recording instance. Those include the current PIDs of the recording.

Parameters:
handle The handle of the recording engine instance.
recordOpenPtr Pointer to an open recording structure PVR_RecordOpenT for storing the requested information.
Returns:
Possible error codes:
See also:
PVR_SetRecordingPids()

int32_t PVR_GetRecordingInfo ( FAPEX_SYS_HandleT  handle,
PVR_RecordInfoT recordInfoPtr 
)

Returns information about recording.

This function returns information about a running recording process. This is for example the current duration or file size.

Parameters:
handle The handle of the recording engine instance.
recordInfoPtr Pointer to a recording info structure PVR_RecordInfoT for storing the requested information.
Returns:
Possible error codes:

int32_t PVR_SetRecordingStopPos ( FAPEX_SYS_HandleT  handle,
uint32_t  position 
)

Sets the stop position.

This function sets a position at which the recording shall stop. The data chunk at this position will not be overwritten. The position 0xFFFFFFFF means that the stop limit is disabled which is the default setting.

This function is particularly useful to define a stop limit for circular recordings.

Parameters:
handle The handle of the recording engine instance.
position Physical stop position in PVR_CHUNK_SIZE.
Returns:
Possible error codes:
See also:
PVR_GetRecordingStopPos()

int32_t PVR_GetRecordingStopPos ( FAPEX_SYS_HandleT  handle,
uint32_t *  positionPtr 
)

Returns the stop position.

This function returns the currently configured stop position. If no position is set, 0xFFFFFFFF will be returned.

Parameters:
handle The handle of the recording engine instance.
positionPtr Pointer to a variable for storing the stop position.
Returns:
Possible error codes:
See also:
PVR_SetRecordingStopPos()

int32_t PVR_SetRecordingPerfLimitTimeout ( FAPEX_SYS_HandleT  handle,
uint32_t  timeout 
)

Set performance limit timeout for notification.

If a recording thread is permanently busy with writing input data to the target device for the specified time inverval (i.e. no idle time due to empty input buffer), the recording will be paused and the notification function is called with reason PVR_RECORD_NOTIFY_PERFORMANCE_LIMIT.

This mechanism can be used to prevent a recording thread from blocking lower-priorized PVR operations, e.g. other recordings or playback. Set to zero for disabling performance limit monitoring.

Note:
Checking the performance limit is not enabled when at least one PID is recorded as PES!
Parameters:
handle The handle of the recording engine instance.
timeout Requested timeout in milliseconds. 0 disables performance monitoring.
Returns:
Possible error codes:
See also:
PVR_GetRecordingPerfLimitTimeout()

int32_t PVR_GetRecordingPerfLimitTimeout ( FAPEX_SYS_HandleT  handle,
uint32_t *  timeoutPtr 
)

Returns the set performance limit timeout value.

Parameters:
handle The handle of the recording engine instance.
timeoutPtr Pointer to a variable for storing the timeout value expressed in milliseconds.
Returns:
Possible error codes:
See also:
PVR_SetRecordingPerfLimitTimeout()

int32_t PVR_SetRecordingChannels ( const uint8_t *  channelsPtr  ) 

Sets a custom TSD channel assignment for all TSDs used for recording.

Parameters:
channelsPtr Array of PVR_MAX_TRACKS channel numbers, 0xFF: unused
Returns:
Possible error codes:

int32_t PVR_SetRecordingSourcePlayback ( FAPEX_SYS_HandleT  playHandle,
FAPEX_SYS_HandleT  recHandle 
)

Assign the current playback (on TSD to be recorded) as source of the recording.

Parameters:
playHandle The handle of the playback engine instance.
recHandle The handle of the recording engine instance.
Returns:
Possible error codes:

int32_t PVR_FlushRecordingData ( FAPEX_SYS_HandleT  handle,
PVR_RecordInfoT recordInfoPtr 
)

Flushes all data of current recording and returns updated record info.

Note:
By using PVR_SetFlushingFrequency, data flushing can also be automatically performed in a periodic manner.
Parameters:
handle The handle of the recording engine instance.
recordInfoPtr Pointer to a recording info structure PVR_RecordInfoT for storing the requested information.
Returns:
Possible error codes:
See also:
PVR_SetFlushingFrequency()

int32_t PVR_SetFlushingFrequency ( FAPEX_SYS_HandleT  handle,
uint32_t  numberOfChunks 
)

Sets the frequency of data flushing or disables periodioc flushing.

This function sets the number of chunks after which the current recording file will be flushed periodically. The recording header is updated together with the file flushing. Using this feature allows to access the recording event after a power loss. Data up to the last flushing position will be available. Set 'numberOfChunks' to 0 in order to disable this feature.

Note:
The periodic flushing feature is disabled by default.
Parameters:
handle The handle of the recording engine instance.
numberOfChunks Number of chunks after which file will be flushed periodically, set to 0 to disable periodic flushing.
Returns:
Possible error codes:

int32_t PVR_EnableRecordingEncryption ( FAPEX_SYS_HandleT  handle,
const PVR_CryptoParamsT paramsPtr 
)

Enable encryption of recording.

This function shall be called before actually starting the recording with PVR_SetRecordingMode(). It will cause all data to be recorded to be encrypted before being written to the target device. For playback it is required to enable decryption using the same keys.

Parameters:
handle The handle of the recording engine instance.
paramsPtr Parameters for encryption i.e. keys.
Returns:
Possible error codes:
See also:
PVR_EnablePlaybackDecryption()

FAPEX_SYS_HandleT PVR_OpenPlayback ( const PVR_PlayOpenT paramsPtr,
int32_t *  errorCodePtr 
)

Opens an instance of the playback engine.

This function creates an instance of the playback engine. A thread is created and necessary memory is allocated. It also opens the assigned PVR file. The function expects a PVR_PlayOpenT data structure filled with configuration data. After opening the instance successfully the engine will enter the mode PVR_PLAY_MODE_STOPPED.

The function checks also whether the same file is currently being recorded for time-shifting. In this case it will setup an internal link to the recording instance for updating the file size, duration and other information continuously.

A handle for addressing this instance will be returned.

The function may fail because of one of the following reasons:

  • An instance of the playback engine is already open.
  • No PVR_PlayOpenT is assigned.
  • The requested TSD does not exist (see FAPEX_TSD_MAX).
  • The requested TSD is already being used for recording.
  • The length of the filename exceeds PVR_FILE_NAME_LENGTH.
  • The file does not exist.

Parameters:
paramsPtr Pointer to a PVR_PlayOpenT data structure.
errorCodePtr Pointer where error code should be stored or 0 if unused.
Returns:
  • (>0) valid driver instance handle on success.
  • (0) if the driver couldn't be opened. For further information about error reason please see errorCodePtr argument.
See also:
PVR_ClosePlayback()
PVR_SeekPlayback()
PVR_SetPlaybackMode()
PVR_GetPlaybackMode()
PVR_GetPlaybackFileInfo()
PVR_GetPlaybackInfo()

int32_t PVR_ClosePlayback ( FAPEX_SYS_HandleT  handle  ) 

Closes a playback instance.

This function destroys the corresponding playback thread and releases all allocated resources like memory and semaphores.

The playback instance must not be running, otherwise the function will fail and MIDDLEWARE_PVR_ERR_BAD_MODE will be returned.

Parameters:
handle Valid driver instance handle previously returned by PVR_Open.
Returns:
See also:
PVR_OpenPlayback()

int32_t PVR_SeekPlayback ( FAPEX_SYS_HandleT  handle,
PVR_SeekModeT  mode,
uint32_t  value 
)

Performs seek operation on a playback instance.

This function seeks to another position. There are several seek operations available defined in PVR_SeekModeT. Seek operations are only possible in playback modes PVR_PLAY_MODE_STOPPED and PVR_PLAY_MODE_PAUSE.

Parameters:
handle The handle of the playback engine instance.
mode Seek mode PVR_SeekModeT.
value Seek position, distance, time etc. depending on mode.
Returns:

Possible error codes:

int32_t PVR_SetPlaybackMode ( FAPEX_SYS_HandleT  handle,
PVR_PlayModeT  playMode,
uint8_t  modeIndex 
)

Controls a playback instance.

This function controls an instance of the playback engine by setting a new operation mode. If the instance is already operating in the requested mode, it will come back without an error. If the instance is currently changing its mode MIDDLEWARE_PVR_ERR_BAD_MODE will be returned.

Because changing the mode is done in an asynchronous way it might take some milliseconds until the requested mode is entered. During this state transition the instance will be in the temporary mode PVR_PLAY_MODE_CHANGING. The current mode can be polled with PVR_GetPlaybackMode().

The following playback modes can be set:

Parameters:
handle The handle of the playback engine instance.
playMode The new playback mode to set.
modeIndex The new playback mode index to set.
Returns:
Possible error codes:
See also:
PVR_GetPlaybackMode()

int32_t PVR_GetPlaybackMode ( FAPEX_SYS_HandleT  handle,
PVR_PlayModeT playModePtr,
uint8_t *  modeIndexPtr 
)

Returns the current playback mode.

This function returns the current mode of a playback instance.

Parameters:
handle The handle of the playback engine instance.
playModePtr Pointer to a playback mode variable PVR_PlayModeT to be filled.
modeIndexPtr Pointer to a mode index variable to be filled.
Returns:
Possible error codes:
See also:
PVR_SetPlaybackMode()

int32_t PVR_SetPlaybackTrack ( FAPEX_SYS_HandleT  handle,
PVR_DecoderTypeT  decoderType,
uint8_t  trackIndex,
uint32_t  trackData 
)

Sets a track to playback for a decoder type.

This function changes the track which is assigned to a decoder such as video or audio decoder. If the track is set to 0xFF, the playback of the related decoder will be stopped. This function could be used e.g. to change the audio language.

Parameters:
handle The handle of the playback engine instance.
decoderType The decoder type PVR_DecoderTypeT.
trackIndex The track for this media type (0xFF => not assigned).
trackData Optional data passed to corresponding decoder when starting the track.
Returns:
Possible error codes:
See also:
PVR_GetPlaybackTrack()

int32_t PVR_GetPlaybackTrack ( FAPEX_SYS_HandleT  handle,
PVR_DecoderTypeT  decoderType,
uint8_t *  trackPtr 
)

Returns the current track assigned to a decoder type.

The track will be set to 0xFF if there is no track assigned, e.g. because the stream does not contain data suitable for the given decoder type.

Parameters:
handle The handle of the playback engine instance.
decoderType The decoder type PVR_DecoderTypeT.
trackPtr Pointer to a variable that shall be filled with the track.
Returns:
Possible error codes:
See also:
PVR_SetPlaybackTrack()

int32_t PVR_GetPlaybackFileInfo ( FAPEX_SYS_HandleT  handle,
PVR_FileInfoT fileInfoPtr 
)

Returns information about an open playback file.

Parameters:
handle The handle of the playback engine instance.
fileInfoPtr Pointer to a file info structure PVR_FileInfoT that shall be filled.
Returns:
Possible error codes:
See also:
PVR_GetPlaybackInfo()

int32_t PVR_GetPlaybackTrackInfo ( FAPEX_SYS_HandleT  handle,
PVR_TrackInfoT trackInfoPtr 
)

Returns information about tracks included in running playback.

Parameters:
handle The handle of the playback engine instance.
trackInfoPtr Pointer to a track info structure PVR_TrackInfoT that shall be filled.
Returns:
Possible error codes:
See also:
PVR_GetPlaybackFileInfo()
PVR_GetPlaybackInfo()

int32_t PVR_GetPlaybackInfo ( FAPEX_SYS_HandleT  handle,
PVR_PlayInfoT playInfoPtr 
)

Returns information about a running playback.

Parameters:
handle The handle of the playback engine instance.
playInfoPtr Pointer to a play info structure PVR_PlayInfoT that shall be filled.
Returns:
Possible error codes:
See also:
PVR_GetPlaybackFileInfo()

int32_t PVR_EnablePlaybackOfFrames ( FAPEX_SYS_HandleT  handle,
uint8_t  enable 
)

Enables the playback of I-Frames in fast or seek mode.

This is enabled per default and should only be disabled for special operations, e.g. special seek mechanisms.

Parameters:
handle The handle of the playback engine instance.
enable Flag to enable or display the previewing of I-Frames.
Returns:
Possible error codes:

int32_t PVR_SetPlaybackFunction ( FAPEX_SYS_HandleT  handle,
PVR_PlaybackFeedOutput  function 
)

Registers a generic function for feeding data during playback.

By default, an internal function will copy data read from the source device to the target TSD. Use this function if an alternative playback path is required, e.g. routing the TS data through an external device before feeding it back via standard TS input. All other playback configurations like setting of TSD filters remain.

Note that this function enables TS input. For internal data feeding

Parameters:
handle The handle of the playback engine instance.
function Feeding function to be called during playback. Set to 0 in order to restore default function.
Returns:
Possible error codes:

int32_t PVR_EnablePlaybackDecryption ( FAPEX_SYS_HandleT  handle,
const PVR_CryptoParamsT paramsPtr 
)

Enable decryption of playback.

This function shall be called before actually starting the playback with PVR_SetPlaybackMode(). It will cause all data read from the target device to be decrypted before being output. For playback it is required to enable decryption using the same keys.

Parameters:
handle The handle of the playback engine instance.
paramsPtr Parameters for decryption i.e. keys.
Returns:
Possible error codes:
See also:
PVR_EnableRecordingEncryption()

int32_t PVR_GetFastModeConfig ( uint16_t  index,
PVR_FastModeConfigT configPtr 
)

Get a fast mode configuration.

Parameters:
index Requested fast mode index to get configuration for.
configPtr Pointer where fast mode configuration should be written to.
Returns:
Possible error codes:
See also:
PVR_SetFastModeConfig

int32_t PVR_SetFastModeConfig ( uint16_t  index,
const PVR_FastModeConfigT configPtr 
)

Set a fast mode configuration.

Parameters:
index Requested fast mode index to set configuration for.
configPtr Pointer to fast mode configuration.
Returns:
Possible error codes:
See also:
PVR_GetFastModeConfig



Copyright © 2006-2010 by Fujitsu Microelectronics Europe GmbH
Copyright © 2008-2010 by Fujitsu Microelectronics Limited

Disclaimer:
Please note that the use of this has been based on the terms and conditions of "DK Consent Letter (For Linux)" agreement between you and Fujitsu Microelectronics Limited.
The contents of this document may be revised without prior notice. Contact our sales department for confirmation. The information in this document are presented as is, no license is granted by implication or otherwise.
More...

FUJITSU sales representatives