DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbresmgr.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2007 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _STBRESMGR_H
26 #define _STBRESMGR_H
27 
28 #include "techtype.h"
29 #include "stbdpc.h"
30 
31 #ifndef INVALID_RES_ID
32 #define INVALID_RES_ID ((U8BIT)0xFF) /* ID used to represent an invalid resource */
33 #endif
34 
35 
36 BOOLEAN STB_RESInitialise(void);
37 
38 U8BIT STB_RESNumTuners(void);
39 U8BIT STB_RESAcquireTuner(E_STB_DP_SIGNAL_TYPE tuner_type, void *transport, E_STB_DP_RES_OWNER owner,
40  BOOLEAN high_priority, BOOLEAN *tuner_taken);
41 void STB_RESReleaseTuner(U8BIT tuner_id, BOOLEAN high_priority, E_STB_DP_RES_OWNER owner);
42 
49 void STB_RESSetTunerDisabled(U8BIT tuner_id, BOOLEAN disable);
50 
56 BOOLEAN STB_RESIsTunerDisabled(U8BIT tuner_id);
57 
62 U8BIT STB_RESNumEnabledTuners(void);
63 
64 void STB_RESSetTunerOwner(U8BIT tuner_id, E_STB_DP_RES_OWNER owner);
65 E_STB_DP_SIGNAL_TYPE STB_RESGetTunerType(U8BIT tuner_id);
66 void STB_RESSetTunedTransport(U8BIT tuner_id, void *t_ptr);
67 void* STB_RESGetTunedTransport(U8BIT tuner_id);
68 BOOLEAN STB_RESCanTuneToTransport(E_STB_DP_SIGNAL_TYPE tuner_type, void *transport);
69 U8BIT STB_RESTunerUsageCount(U8BIT tuner_id);
70 
71 U8BIT STB_RESNumDemuxes(void);
72 U8BIT STB_RESAcquireDemux(U8BIT demux_id, U16BIT caps);
73 void STB_RESReleaseDemux(U8BIT demux_id);
74 U16BIT STB_RESGetDemuxCaps(U8BIT demux_id);
75 
76 U8BIT STB_RESNumAudioDecoders(void);
77 U8BIT STB_RESAcquireAudioDecoder(void);
78 void STB_RESReleaseAudioDecoder(U8BIT decoder_id);
79 
80 U8BIT STB_RESAcquireADDecoder(void);
81 void STB_RESReleaseADDecoder(U8BIT decoder_id);
82 U8BIT STB_RESNumVideoDecoders(void);
83 U8BIT STB_RESAcquireVideoDecoder(void);
84 void STB_RESReleaseVideoDecoder(U8BIT decoder_id);
85 
86 U8BIT STB_RESNumCISlots(void);
87 U8BIT STB_RESAcquireCISlot(void *service, U8BIT *pmt_data, U8BIT *ci_protection_desc);
88 BOOLEAN STB_RESUseCISlot(U8BIT slot_id);
89 U8BIT STB_RESGetCISlotUsageCount(U8BIT slot_id);
90 void STB_RESReleaseCISlot(U8BIT slot_id);
91 #endif /* _STBRESMGR_H */
U8BIT STB_RESAcquireAudioDecoder(void)
Acquires an audio decoder and marks it as used.
Definition: stbresmgr.c:876
U8BIT STB_RESTunerUsageCount(U8BIT tuner_id)
Returns the number of paths using the tuner.
Definition: stbresmgr.c:656
U8BIT STB_RESNumVideoDecoders(void)
Returns the number of video decoders in the system.
Definition: stbresmgr.c:936
Header file - macros and function prototypes for public use.
U8BIT STB_RESNumDemuxes(void)
Returns the number of demux paths under the control of the resource manager.
Definition: stbresmgr.c:683
U8BIT STB_RESNumTuners(void)
Returns the number of tuners.
Definition: stbresmgr.c:279
void STB_RESReleaseAudioDecoder(U8BIT decoder_id)
Releases a previously acquired audio decoder.
Definition: stbresmgr.c:913
E_STB_DP_SIGNAL_TYPE STB_RESGetTunerType(U8BIT tuner_id)
Returns the type of the given tuner.
Definition: stbresmgr.c:548
U8BIT STB_RESNumEnabledTuners(void)
Returns the number of tuners that aren't disabled.
Definition: stbresmgr.c:500
BOOLEAN STB_RESInitialise(void)
Creates and initialises control structures for the resources to be managed.
Definition: stbresmgr.c:117
void STB_RESReleaseVideoDecoder(U8BIT decoder_id)
Releases a previously acquired video decoder.
Definition: stbresmgr.c:985
U8BIT STB_RESGetCISlotUsageCount(U8BIT slot_id)
Returns the number of times the given slot is in use.
Definition: stbresmgr.c:1110
void STB_RESReleaseADDecoder(U8BIT decoder_id)
Releases a previously acquired AD decoder.
Definition: stbresmgr.c:855
BOOLEAN STB_RESIsTunerDisabled(U8BIT tuner_id)
Returns whether a tuner has been disabled or not.
Definition: stbresmgr.c:473
U16BIT STB_RESGetDemuxCaps(U8BIT demux_id)
Returns the capability flags for the given demux.
Definition: stbresmgr.c:785
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 ...
Definition: stbresmgr.c:451
void STB_RESReleaseDemux(U8BIT demux_id)
Releases a previously acquired demux path.
Definition: stbresmgr.c:750
System Wide Global Technical Data Type Definitions.
U8BIT STB_RESAcquireADDecoder(void)
Acquires an AD decoder and marks it as used.
Definition: stbresmgr.c:821
void STB_RESReleaseTuner(U8BIT tuner_id, BOOLEAN high_priority, E_STB_DP_RES_OWNER owner)
Releases a tuner that has previously been acquired.
Definition: stbresmgr.c:400
void STB_RESSetTunedTransport(U8BIT tuner_id, void *t_ptr)
Saves the transport pointer with the specified tuner.
Definition: stbresmgr.c:577
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.
Definition: stbresmgr.c:627
U8BIT STB_RESNumAudioDecoders(void)
Returns the number of audio decoders in the system.
Definition: stbresmgr.c:809
void * STB_RESGetTunedTransport(U8BIT tuner_id)
Returns the transport record saved with the specified tuner.
Definition: stbresmgr.c:600
void STB_RESSetTunerOwner(U8BIT tuner_id, E_STB_DP_RES_OWNER owner)
Sets the owner of the tuner.
Definition: stbresmgr.c:526
void STB_RESReleaseCISlot(U8BIT slot_id)
Releases a previously acquired CI slot.
Definition: stbresmgr.c:1137
U8BIT STB_RESNumCISlots(void)
Returns the number of CI slots under the control of the resource manager.
Definition: stbresmgr.c:1007
U8BIT STB_RESAcquireVideoDecoder(void)
Acquires a video decoder and marks it as used.
Definition: stbresmgr.c:948
U8BIT STB_RESAcquireDemux(U8BIT demux_id, U16BIT caps)
Acquires a demux path and marks it as being used.
Definition: stbresmgr.c:696
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.
Definition: stbresmgr.c:297