|
pvr.c File Reference
|
Functions |
static int32_t | pvrCheckRecordingHandle (FAPEX_SYS_HandleT h) |
static int32_t | pvrCheckPlaybackHandle (FAPEX_SYS_HandleT h) |
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_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_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_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 decoderType, 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 decoderType, 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_GetPlaybackInfo (FAPEX_SYS_HandleT handle, PVR_PlayInfoT *playInfoPtr) |
| Returns information about a running playback.
|
int32_t | PVR_GetPlaybackTrackInfo (FAPEX_SYS_HandleT handle, PVR_TrackInfoT *trackInfoPtr) |
| Returns information about tracks included in 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.
|
Variables |
static uint32_t | pvrInitialized = 0 |
static FAPEX_SYS_HandleT | pvrHandleRec [FAPEX_TSD_MAX] |
static FAPEX_SYS_HandleT | pvrHandlePlay [FAPEX_TSD_MAX] |
Function Documentation
static int32_t pvrCheckRecordingHandle |
( |
FAPEX_SYS_HandleT |
h |
) |
[static] |
static int32_t pvrCheckPlaybackHandle |
( |
FAPEX_SYS_HandleT |
h |
) |
[static] |
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
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 |
) |
|
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_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_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_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_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_GetPlaybackTrackInfo |
( |
FAPEX_SYS_HandleT |
handle, |
|
|
PVR_TrackInfoT * |
trackInfoPtr | |
|
) |
| | |
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:
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()
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
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
Variable Documentation
|
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
|
|