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

STB middleware resource management module header file. More...

#include "techtype.h"
#include "stbdpc.h"

Go to the source code of this file.

Macros

#define INVALID_RES_ID   ((U8BIT)0xFF) /* ID used to represent an invalid resource */
 

Functions

BOOLEAN STB_RESInitialise (void)
 Creates and initialises control structures for the resources to be managed. More...
 
U8BIT STB_RESNumTuners (void)
 Returns the number of tuners. More...
 
U8BIT STB_RESAcquireTuner (E_STB_DP_SIGNAL_TYPE tuner_type, void *transport, E_STB_DP_RES_OWNER owner, BOOLEAN high_priority, BOOLEAN *tuner_taken)
 Acquires a tuner. Tuners will be reused if possible. More...
 
void STB_RESReleaseTuner (U8BIT tuner_id, BOOLEAN high_priority, E_STB_DP_RES_OWNER owner)
 Releases a tuner that has previously been acquired. More...
 
void STB_RESSetTunerDisabled (U8BIT tuner_id, BOOLEAN disable)
 Set the disable state for a tuner. When disabled, a tuner will be ignored when acquiring a new tuner resource. More...
 
BOOLEAN STB_RESIsTunerDisabled (U8BIT tuner_id)
 Returns whether a tuner has been disabled or not. More...
 
U8BIT STB_RESNumEnabledTuners (void)
 Returns the number of tuners that aren't disabled. More...
 
void STB_RESSetTunerOwner (U8BIT tuner_id, E_STB_DP_RES_OWNER owner)
 Sets the owner of the tuner. More...
 
E_STB_DP_SIGNAL_TYPE STB_RESGetTunerType (U8BIT tuner_id)
 Returns the type of the given tuner. More...
 
void STB_RESSetTunedTransport (U8BIT tuner_id, void *t_ptr)
 Saves the transport pointer with the specified tuner. More...
 
void * STB_RESGetTunedTransport (U8BIT tuner_id)
 Returns the transport record saved with the specified tuner. More...
 
BOOLEAN STB_RESCanTuneToTransport (E_STB_DP_SIGNAL_TYPE tuner_type, void *transport)
 Returns whether there's a tuner available to tune to the given transport. More...
 
U8BIT STB_RESTunerUsageCount (U8BIT tuner_id)
 Returns the number of paths using the tuner. More...
 
U8BIT STB_RESNumDemuxes (void)
 Returns the number of demux paths under the control of the resource manager. More...
 
U8BIT STB_RESAcquireDemux (U8BIT demux_id, U16BIT caps)
 Acquires a demux path and marks it as being used. More...
 
void STB_RESReleaseDemux (U8BIT demux_id)
 Releases a previously acquired demux path. More...
 
U16BIT STB_RESGetDemuxCaps (U8BIT demux_id)
 Returns the capability flags for the given demux. More...
 
U8BIT STB_RESNumAudioDecoders (void)
 Returns the number of audio decoders in the system. More...
 
U8BIT STB_RESAcquireAudioDecoder (void)
 Acquires an audio decoder and marks it as used. More...
 
void STB_RESReleaseAudioDecoder (U8BIT decoder_id)
 Releases a previously acquired audio decoder. More...
 
U8BIT STB_RESAcquireADDecoder (void)
 Acquires an AD decoder and marks it as used. More...
 
void STB_RESReleaseADDecoder (U8BIT decoder_id)
 Releases a previously acquired AD decoder. More...
 
U8BIT STB_RESNumVideoDecoders (void)
 Returns the number of video decoders in the system. More...
 
U8BIT STB_RESAcquireVideoDecoder (void)
 Acquires a video decoder and marks it as used. More...
 
void STB_RESReleaseVideoDecoder (U8BIT decoder_id)
 Releases a previously acquired video decoder. More...
 
U8BIT STB_RESNumCISlots (void)
 Returns the number of CI slots under the control of the resource manager. More...
 
U8BIT STB_RESAcquireCISlot (void *service, U8BIT *pmt_data, U8BIT *ci_protection_desc)
 
BOOLEAN STB_RESUseCISlot (U8BIT slot_id)
 
U8BIT STB_RESGetCISlotUsageCount (U8BIT slot_id)
 Returns the number of times the given slot is in use. More...
 
void STB_RESReleaseCISlot (U8BIT slot_id)
 Releases a previously acquired CI slot. More...
 

Detailed Description

STB middleware resource management module header file.

Date
June 2007
Author
Steve Ford

Function Documentation

U8BIT STB_RESAcquireADDecoder ( void  )

Acquires an AD decoder and marks it as used.


Parameters
None
Returns
ID of the decoder, or INVALID_RES_ID if none are available
U8BIT STB_RESAcquireAudioDecoder ( void  )

Acquires an audio decoder and marks it as used.


Parameters
None
Returns
ID of the decoder, or INVALID_RES_ID if none are available
U8BIT STB_RESAcquireDemux ( U8BIT  demux_id,
U16BIT  caps 
)

Acquires a demux path and marks it as being used.


Parameters
demux_id- id of existing demux, or INVALID_RES_ID if a new one is to be acquired
caps- required capabilities, or 0 if an existing demux is being acquired
Returns
ID of the demux path acquired, or INVALID_RES_ID if none are available
U8BIT STB_RESAcquireTuner ( E_STB_DP_SIGNAL_TYPE  tuner_type,
void *  transport,
E_STB_DP_RES_OWNER  owner,
BOOLEAN  high_priority,
BOOLEAN *  tuner_taken 
)

Acquires a tuner. Tuners will be reused if possible.


Parameters
tuner_type- type of tuner to be acquired
transport- initial transport the tuner will be tuned to
owner- module acquiring the tuner
high_priority- TRUE if the request is a high priority, meaning a tuner acquired with a lower priority can be taken. A tuner acquired with a high priority will be locked, preventing it being retuned.
tuner_taken- returned as TRUE if the acquired tuner was in use but is reacquired.
Returns
The ID of the tuner acquired or INVALID_RES_ID if none are available
U8BIT STB_RESAcquireVideoDecoder ( void  )

Acquires a video decoder and marks it as used.


Parameters
None
Returns
ID of the decoder, or INVALID_RES_ID if none are available
BOOLEAN STB_RESCanTuneToTransport ( E_STB_DP_SIGNAL_TYPE  tuner_type,
void *  transport 
)

Returns whether there's a tuner available to tune to the given transport.


Parameters
tuner_type- tuner type
transport- transport to be tuned to
Returns
TRUE if a tuner is available, FALSE otherwise
U8BIT STB_RESGetCISlotUsageCount ( U8BIT  slot_id)

Returns the number of times the given slot is in use.


Parameters
slot_id- ID of the CI slot
Returns
Slot usage count
U16BIT STB_RESGetDemuxCaps ( U8BIT  demux_id)

Returns the capability flags for the given demux.


Parameters
demux_id- demux
Returns
Capability flags, 0 for invalid demux
void* STB_RESGetTunedTransport ( U8BIT  tuner_id)

Returns the transport record saved with the specified tuner.


Parameters
tuner_id- ID of a tuner
Returns
Pointer to the transport record saved with the tuner
E_STB_DP_SIGNAL_TYPE STB_RESGetTunerType ( U8BIT  tuner_id)

Returns the type of the given tuner.


Parameters
tuner_id- ID of a tuner
Returns
tuner type, SIGNAL_NONE on error
BOOLEAN STB_RESInitialise ( void  )

Creates and initialises control structures for the resources to be managed.


Parameters
None
Returns
TRUE if successful
BOOLEAN STB_RESIsTunerDisabled ( U8BIT  tuner_id)

Returns whether a tuner has been disabled or not.

Parameters
tuner_idID of tuner
Returns
TRUE if the tuner is disabled, FALSE otherwise
U8BIT STB_RESNumAudioDecoders ( void  )

Returns the number of audio decoders in the system.


Returns
Number of audio decoders
U8BIT STB_RESNumCISlots ( void  )

Returns the number of CI slots under the control of the resource manager.


Returns
Number of CI slots
U8BIT STB_RESNumDemuxes ( void  )

Returns the number of demux paths under the control of the resource manager.


Returns
Number of demux paths
U8BIT STB_RESNumEnabledTuners ( void  )

Returns the number of tuners that aren't disabled.

Returns
number of enabled tuners
U8BIT STB_RESNumTuners ( void  )

Returns the number of tuners.


Returns
Number of tuners on the system
U8BIT STB_RESNumVideoDecoders ( void  )

Returns the number of video decoders in the system.


Parameters
None
Returns
Number of video decoders
void STB_RESReleaseADDecoder ( U8BIT  decoder_id)

Releases a previously acquired AD decoder.


Parameters
decoder_id- ID of the decoder
Returns
None
void STB_RESReleaseAudioDecoder ( U8BIT  decoder_id)

Releases a previously acquired audio decoder.


Parameters
decoder_id- ID of the decoder
Returns
None
void STB_RESReleaseCISlot ( U8BIT  slot_id)

Releases a previously acquired CI slot.


Parameters
slot_id- ID of the CI slot to be released
void STB_RESReleaseDemux ( U8BIT  demux_id)

Releases a previously acquired demux path.


Parameters
demux_id- ID of the demux path to be released
Returns
None
void STB_RESReleaseTuner ( U8BIT  tuner_id,
BOOLEAN  high_priority,
E_STB_DP_RES_OWNER  owner 
)

Releases a tuner that has previously been acquired.


Parameters
tuner_id- ID of a tuner previously acquired
high_priority- TRUE if the tuner was acquired with a high priority
owner- module releasing the tuner
void STB_RESReleaseVideoDecoder ( U8BIT  decoder_id)

Releases a previously acquired video decoder.


Parameters
decoder_id- ID of decoder
Returns
None
void STB_RESSetTunedTransport ( U8BIT  tuner_id,
void *  t_ptr 
)

Saves the transport pointer with the specified tuner.


Parameters
tuner_id- ID of a previously acquired tuner
t_ptr- pointer to the transport record to be saved
Returns
None
void STB_RESSetTunerDisabled ( U8BIT  tuner_id,
BOOLEAN  disable 
)

Set the disable state for a tuner. When disabled, a tuner will be ignored when acquiring a new tuner resource.

Parameters
tuner_idID of tuner
disableTRUE if the tuner is to be disabled, FALSE otherwise
void STB_RESSetTunerOwner ( U8BIT  tuner_id,
E_STB_DP_RES_OWNER  owner 
)

Sets the owner of the tuner.


Parameters
tuner_id- ID of a tuner
owner- module acquiring the tuner
U8BIT STB_RESTunerUsageCount ( U8BIT  tuner_id)

Returns the number of paths using the tuner.


Parameters
tuner_id- tuner
Returns
Usage count