DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
Macros | Typedefs | Enumerations | Functions
stbhwdmx.h File Reference

Header file - Function prototypes for Demux control. More...

#include "techtype.h"

Go to the source code of this file.

Macros

#define MAX_HW_SECT_FILT_LEN   8
 
#define STB_DMX_PID_FILTER_INVALID   0xffff
 
#define STB_DMX_SECT_FILTER_INVALID   0xffff
 
#define STB_TPID_CBUFF_PRIORITY   10
 

Typedefs

typedef void(* FILTER_CALLBACK )(U8BIT path, U16BIT bytes, U16BIT pfilt_id)
 

Enumerations

enum  E_STB_DMX_DESC_TRACK { DESC_TRACK_AUDIO, DESC_TRACK_VIDEO, DESC_TRACK_TEXT, DESC_NUM_TRACKS }
 
enum  E_STB_DMX_DESC_KEY_PARITY { KEY_PARITY_EVEN, KEY_PARITY_ODD }
 
enum  E_STB_DMX_DESC_TYPE {
  DESC_TYPE_DVB, DESC_TYPE_AES, DESC_TYPE_AES_SCTE_52, DESC_TYPE_DES,
  DESC_TYPE_TDES
}
 
enum  E_STB_DMX_KEY_USAGE { KEY_USAGE_PES, KEY_USAGE_TRANSPORT, KEY_USAGE_ALL }
 
enum  E_STB_DMX_DEMUX_SOURCE { DMX_TUNER, DMX_1394, DMX_MEMORY }
 
enum  E_STB_DMX_CAPS {
  DMX_CAPS_LIVE = 0x0001, DMX_CAPS_PIP = 0x0002, DMX_CAPS_RECORDING = 0x0004, DMX_CAPS_PLAYBACK = 0x0008,
  DMX_CAPS_MONITOR_SI = 0x0010
}
 

Functions

void STB_DMXInitialise (U8BIT paths, BOOLEAN inc_pes_collection)
 Initialises the demux / programmable transport interface. More...
 
U16BIT STB_DMXGetCapabilities (U8BIT path)
 Returns the capability flags of the given demux. More...
 
U8BIT STB_DMXGetMaxSectionFilters (void)
 Returns the maximum number of section filters available on this hw. More...
 
void STB_DMXSetDemuxSource (U8BIT path, E_STB_DMX_DEMUX_SOURCE source, U8BIT param)
 Configures the source of the demux. More...
 
void STB_DMXGetDemuxSource (U8BIT path, E_STB_DMX_DEMUX_SOURCE *source, U8BIT *param)
 Gets the current source of a given demux. More...
 
void STB_DMXReadTextPES (U8BIT path, U8BIT **buffer, U32BIT *num_bytes)
 Reads Teletext PES data from the demux. More...
 
void STB_DMXChangeDecodePIDs (U8BIT path, U16BIT pcr_pid, U16BIT video_pid, U16BIT audio_pid, U16BIT text_pid, U16BIT data_pid, U16BIT ad_pid)
 Changes the packet IDs for the PCR Video, Audio, Text and Data. More...
 
void STB_DMXChangeTextPID (U8BIT path, U16BIT text_pid)
 Changes just the teletext PID. More...
 
U16BIT STB_DMXGrabPIDFilter (U8BIT path, U16BIT pid, FILTER_CALLBACK func)
 Get a New PID Filter & Setup Associated Buffer and Callback Function Address. More...
 
BOOLEAN STB_DMXCopyPIDFilterSect (U8BIT path, U8BIT *buffer, U16BIT size, U16BIT pfilt_id)
 Copies a filtered section to caller's buffer. More...
 
void STB_DMXSkipPIDFilterSect (U8BIT path, U16BIT pfilt_id)
 Skips (discards) a section in the PID filter buffer. More...
 
U16BIT STB_DMXGrabSectFilter (U8BIT path, U16BIT pfilt_id)
 Allocated a new section filter on the specified PID filter. More...
 
void STB_DMXSetupSectFilter (U8BIT path, U16BIT sfilt_id, U8BIT *match_ptr, U8BIT *mask_ptr, U8BIT not_equal_byte_index, BOOLEAN crc)
 Configures a match and mask for a specified section filter. More...
 
void STB_DMXStartPIDFilter (U8BIT path, U16BIT pfilt_id)
 Start Specified PID Filter Collecting Data. More...
 
void STB_DMXStopPIDFilter (U8BIT path, U16BIT pfilt_id)
 Stop Specified PID Filter Collecting Data. More...
 
void STB_DMXReleasePIDFilter (U8BIT path, U16BIT pfilt_id)
 Releases a previously allocated PID filter. More...
 
void STB_DMXReleaseSectFilter (U8BIT path, U16BIT sfilt_id)
 Releases a previously allocated section filter. More...
 
BOOLEAN STB_DMXGetDescramblerKey (U8BIT path, E_STB_DMX_DESC_TRACK track)
 Acquires a descrambler for the specified track on this path. More...
 
BOOLEAN STB_DMXFreeDescramblerKey (U8BIT path, E_STB_DMX_DESC_TRACK track)
 Frees the descrambler for the specified track on this path. More...
 
BOOLEAN STB_DMXSetDescramblerKeyData (U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_DESC_KEY_PARITY parity, U8BIT *data)
 Set the descrambler key data for the specified track on this path. More...
 
BOOLEAN STB_DMXGetKeyUsage (U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_KEY_USAGE *key_usage)
 Get the descrambler key usage for the specified track on this path as set by STB_DMXSetKeyUsage. More...
 
BOOLEAN STB_DMXSetKeyUsage (U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_KEY_USAGE key_usage)
 Set the descrambler key usage for the specified track on this path. More...
 
BOOLEAN STB_DMXGetDescramblerType (U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_DESC_TYPE *type)
 Get the descrambler type for the specified track on this path, as set by STB_DMXSetDescramblerType. More...
 
BOOLEAN STB_DMXSetDescramblerType (U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_DESC_TYPE type)
 Set the descrambler type for the specified track on this path. More...
 
void STB_DMXWriteDemux (U8BIT path, U8BIT *data, U32BIT size)
 Writes data to the demux from memory. More...
 

Detailed Description

Header file - Function prototypes for Demux control.

Date
06/02/2001

Function Documentation

void STB_DMXChangeDecodePIDs ( U8BIT  path,
U16BIT  pcr_pid,
U16BIT  video_pid,
U16BIT  audio_pid,
U16BIT  text_pid,
U16BIT  data_pid,
U16BIT  ad_pid 
)

Changes the packet IDs for the PCR Video, Audio, Text and Data.

Parameters
pathThe demux path to be configured
pcr_pidThe PID to use for the Program Clock Reference
video_pidThe PID to use for the Video PES
audio_pidThe PID to use for the Audio PES
text_pidThe PID to use for the Teletext data
data_pidThe PID to use for the data
void STB_DMXChangeTextPID ( U8BIT  path,
U16BIT  text_pid 
)

Changes just the teletext PID.

Parameters
pathThe demux path to configure
text_pidThe PID to use for the teletext data
BOOLEAN STB_DMXCopyPIDFilterSect ( U8BIT  path,
U8BIT *  buffer,
U16BIT  size,
U16BIT  pfilt_id 
)

Copies a filtered section to caller's buffer.

Parameters
paththe demux path to use
bufferthe caller's buffer
sizethe size of the caller's buffer
pfilt_idthe handle of the PID filter to read from
Returns
TRUE copied ok
FALSE no data to copy
BOOLEAN STB_DMXFreeDescramblerKey ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track 
)

Frees the descrambler for the specified track on this path.

Parameters
paththe demux path for which the descrambler is freed
trackenum representing audio, video or subtitles PES
Returns
TRUE on success, FALSE otherwise
U16BIT STB_DMXGetCapabilities ( U8BIT  path)

Returns the capability flags of the given demux.

Parameters
path- demux
Returns
Capability flags
void STB_DMXGetDemuxSource ( U8BIT  path,
E_STB_DMX_DEMUX_SOURCE *  source,
U8BIT *  param 
)

Gets the current source of a given demux.

Parameters
paththe demux path to query
sourcethe source of the demux
paramthe source specific parameter (e.g. tuner number)
BOOLEAN STB_DMXGetDescramblerKey ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track 
)

Acquires a descrambler for the specified track on this path.

Parameters
paththe demux path for which the descrambler is acquired
trackenum representing audio, video or subtitles PES
Returns
TRUE on success, FALSE otherwise
BOOLEAN STB_DMXGetDescramblerType ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track,
E_STB_DMX_DESC_TYPE *  type 
)

Get the descrambler type for the specified track on this path, as set by STB_DMXSetDescramblerType.

Parameters
paththe demux path that the descrambler type refers to
typedescrambler type (DES, AES, etc...)
Returns
TRUE on success, FALSE otherwise
BOOLEAN STB_DMXGetKeyUsage ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track,
E_STB_DMX_KEY_USAGE *  key_usage 
)

Get the descrambler key usage for the specified track on this path as set by STB_DMXSetKeyUsage.

Parameters
paththe demux path that the descrambler key usage refers to
trackenum representing audio, video or subtitles PES
key_usagewhether the descrambler has been set to operate at PES level, transport level or all.
Returns
TRUE on success, FALSE otherwise
U8BIT STB_DMXGetMaxSectionFilters ( void  )

Returns the maximum number of section filters available on this hw.

Returns
The number of filters
U16BIT STB_DMXGrabPIDFilter ( U8BIT  path,
U16BIT  pid,
FILTER_CALLBACK  func 
)

Get a New PID Filter & Setup Associated Buffer and Callback Function Address.

Parameters
pathRequired Decode Path Number.
pidRequired PID to Demux.
func_ptrUser's Interrupt Procedure Function Address.
Returns
New PID filter identifier or invalid id.
U16BIT STB_DMXGrabSectFilter ( U8BIT  path,
U16BIT  pfilt_id 
)

Allocated a new section filter on the specified PID filter.

Parameters
paththe demux path to use
pfilt_idthe PID filter to assign the section filter to
Returns
The section filter handle
void STB_DMXInitialise ( U8BIT  paths,
BOOLEAN  inc_pes_collection 
)

Initialises the demux / programmable transport interface.

Parameters
pathsNumber of demux paths to be initialised
inc_pes_collectionNot used
void STB_DMXReadTextPES ( U8BIT  path,
U8BIT **  buffer,
U32BIT *  num_bytes 
)

Reads Teletext PES data from the demux.

Parameters
paththe demux path to read
bufferpointer to PES data
num_bytesthe number of bytes of data
void STB_DMXReleasePIDFilter ( U8BIT  path,
U16BIT  pfilt_id 
)

Releases a previously allocated PID filter.

Parameters
paththe demux path of the filter
pfilt_idthe handle of the filter
void STB_DMXReleaseSectFilter ( U8BIT  path,
U16BIT  sfilt_id 
)

Releases a previously allocated section filter.

Parameters
paththe demux path of the filter
sfilt_idthe handle of the section filter
void STB_DMXSetDemuxSource ( U8BIT  path,
E_STB_DMX_DEMUX_SOURCE  source,
U8BIT  param 
)

Configures the source of the demux.

Parameters
paththe demux path to configure
sourcethe source to use
paramsource specific parameters (e.g. tuner number)
BOOLEAN STB_DMXSetDescramblerKeyData ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track,
E_STB_DMX_DESC_KEY_PARITY  parity,
U8BIT *  data 
)

Set the descrambler key data for the specified track on this path.

Parameters
paththe demux path for which the descrambler key data is set
trackenum representing audio, video or subtitles PES
parityeven or odd
datapointer to the key data, its length depends on the descrambler type (see STB_DMXSetDescramblerType)
Returns
TRUE on success, FALSE otherwise
BOOLEAN STB_DMXSetDescramblerType ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track,
E_STB_DMX_DESC_TYPE  type 
)

Set the descrambler type for the specified track on this path.

Parameters
paththe demux path that the descrambler type refers to
typedescrambler type (DES, AES, etc...)
Returns
TRUE on success, FALSE otherwise
BOOLEAN STB_DMXSetKeyUsage ( U8BIT  path,
E_STB_DMX_DESC_TRACK  track,
E_STB_DMX_KEY_USAGE  key_usage 
)

Set the descrambler key usage for the specified track on this path.

Parameters
paththe demux path that the descrambler key usage refers to
trackenum representing audio, video or subtitles PES
key_usagewhether the descrambler operates at PES level, transport level or all.
Returns
TRUE on success, FALSE otherwise
void STB_DMXSetupSectFilter ( U8BIT  path,
U16BIT  sfilt_id,
U8BIT *  match_ptr,
U8BIT *  mask_ptr,
U8BIT  not_equal_byte_index,
BOOLEAN  crc 
)

Configures a match and mask for a specified section filter.

Parameters
paththe demux path of the section filter
sfilt_idthe handle of the section filter
match_ptrpointer to the match bytes
mask_ptrpointer to the mask bytes
not_equal_byte_indexthe byte position for a not equal compare
crcTRUE to use CRC checking FALSE to ignore
void STB_DMXSkipPIDFilterSect ( U8BIT  path,
U16BIT  pfilt_id 
)

Skips (discards) a section in the PID filter buffer.

Parameters
paththe demux path of the filter
pfilt_idthe PID filter handle
void STB_DMXStartPIDFilter ( U8BIT  path,
U16BIT  pfilt_id 
)

Start Specified PID Filter Collecting Data.

Parameters
pathRequired Decode Path Number.
pfilter_idRequired PID Filter Identifier.
void STB_DMXStopPIDFilter ( U8BIT  path,
U16BIT  pfilt_id 
)

Stop Specified PID Filter Collecting Data.

Parameters
pathRequired Decode Path Number.
pfilter_idRequired PID Filter Identifier.
void STB_DMXWriteDemux ( U8BIT  path,
U8BIT *  data,
U32BIT  size 
)

Writes data to the demux from memory.

Parameters
paththe demux path to be written
datathe data to be written
sizethe number of bytes to be written