Multiplex information

This module is used to store and retrieve the multiplex information in the adapters database. More...

Data Structures

struct  Multiplex_t
 Structure describing a multiplex. More...

Defines

#define MultiplexAreEqual(_multiplex1, _multiplex2)   ((_multiplex1)->uid == (_multiplex2)->uid)
 Macro to compare 2 Multiplex_t structures.
#define MultiplexNew()   (Multiplex_t*)ObjectCreateType(Multiplex_t)
 Create a new multiplex object.
#define MultiplexRefInc(__multiplex)
 Increment the references to the specified multiplex object.
#define MultiplexRefDec(__multiplex)
 Decrement the references of the specified multiplex object.

Typedefs

typedef void * MultiplexEnumerator_t
 Handle for enumerating multiplexes.

Functions

int MultiplexInit (void)
 Initialise the multiplex module for use.
int MultiplexDeinit (void)
 Release resources used by the multiplex module.
int MultiplexCount ()
 Number of multiplexes stored in the database.
Multiplex_tMultiplexFind (char *mux)
 Retrieve a Multiplex_t structure for the string mux.
Multiplex_tMultiplexFindUID (int uid)
 Retrieve the Multiplex_t structure for the UID.
Multiplex_tMultiplexFindId (int netid, int tsid)
 Retrieve the Multiplex_t structure for the network and TS id.
Multiplex_tMultiplexFindFrequency (int freq)
 Retrieve the first Multiplex_t structure for the given frequency.
MultiplexEnumerator_t MultiplexEnumeratorGet ()
 Retrieve an enumerator for all the multiplexes in the database.
void MultiplexEnumeratorDestroy (MultiplexEnumerator_t enumerator)
 Destroy an enumerator return by MultiplexEnumeratorGet().
Multiplex_tMultiplexGetNext (MultiplexEnumerator_t enumerator)
 Retrieve the next multiplex from an enumerator.
int MultiplexFrontendParametersGet (Multiplex_t *multiplex, struct dvb_frontend_parameters *feparams, DVBDiSEqCSettings_t *diseqc)
 Retrieve the frontend parameters for the given multiplex.
int MultiplexAdd (fe_type_t type, struct dvb_frontend_parameters *feparams, DVBDiSEqCSettings_t *diseqc, int *uid)
 Add a multiplex to the database.
int MultiplexPATVersionSet (Multiplex_t *multiplex, int patversion)
 Set the PAT version of a multiplex.
int MultiplexTSIdSet (Multiplex_t *multiplex, int tsid)
 Set the TS ID of the multiplex.
int MultiplexNetworkIdSet (Multiplex_t *multiplex, int netid)
 Set the network ID of the multiplex.

Detailed Description

This module is used to store and retrieve the multiplex information in the adapters database.


Define Documentation

#define MultiplexRefDec ( __multiplex   ) 

Value:

do{ \
            if ((__multiplex)) \
            { \
                ObjectRefDec((__multiplex)); \
            } \
        }while(0)
Decrement the references of the specified multiplex object.

If the reference count reaches 0 the instance is free'd.

Parameters:
__multiplex The multiplex instance to decrement the reference count of. (Multiplex can be NULL.)

#define MultiplexRefInc ( __multiplex   ) 

Value:

do{ \
            if ((__multiplex)) \
            { \
                ObjectRefInc((__multiplex)); \
            } \
        }while(0)
Increment the references to the specified multiplex object.

Parameters:
__multiplex The multiplex instance to increment the reference count of. (Multiplex can be NULL.)


Function Documentation

int MultiplexAdd ( fe_type_t  type,
struct dvb_frontend_parameters *  feparams,
DVBDiSEqCSettings_t diseqc,
int *  uid 
)

Add a multiplex to the database.

Parameters:
type The type of frontend used to receive this transport stream.
feparams The parameters to pass to the frontend to tune to the new TS.
diseqc Any DiSEqC properties required to tune.
uid On exit used to store the UID of the new multiplex.
Returns:
0 on success, otherwise an SQLite error code.

int MultiplexCount (  ) 

Number of multiplexes stored in the database.

Returns:
The number of multiplexes in the database.

int MultiplexDeinit ( void   ) 

Release resources used by the multiplex module.

Returns:
0 on success.

void MultiplexEnumeratorDestroy ( MultiplexEnumerator_t  enumerator  ) 

Destroy an enumerator return by MultiplexEnumeratorGet().

Parameters:
enumerator The enumerator to free.

MultiplexEnumerator_t MultiplexEnumeratorGet (  ) 

Retrieve an enumerator for all the multiplexes in the database.

Returns:
An enumerator instance or NULL if there was not enough memory.

Multiplex_t* MultiplexFind ( char *  mux  ) 

Retrieve a Multiplex_t structure for the string mux.

mux is tried as (in order) UID, netid.tsid and finally frequency.

Returns:
A Mulitplex_t or NULL if the frequency could not be found.

Multiplex_t* MultiplexFindFrequency ( int  freq  ) 

Retrieve the first Multiplex_t structure for the given frequency.

The returned structured should be released using MultiplexRefDec.

Parameters:
freq Frequency of the multiplex to retrieve.
Returns:
A Mulitplex_t or NULL if the frequency could not be found.

Multiplex_t* MultiplexFindId ( int  netid,
int  tsid 
)

Retrieve the Multiplex_t structure for the network and TS id.

The returned structured should be released using MultiplexRefDec.

Parameters:
netid Network id to find.
tsid Transport stream id to find.
Returns:
A Mulitplex_t or NULL if the frequency could not be found.

Multiplex_t* MultiplexFindUID ( int  uid  ) 

Retrieve the Multiplex_t structure for the UID.

The returned structured should be released using MultiplexRefDec.

Parameters:
uid Unique ID of the multiplex to retrieve.
Returns:
A Mulitplex_t or NULL if the frequency could not be found.

int MultiplexFrontendParametersGet ( Multiplex_t multiplex,
struct dvb_frontend_parameters *  feparams,
DVBDiSEqCSettings_t diseqc 
)

Retrieve the frontend parameters for the given multiplex.

Parameters:
multiplex The multiplex to retrieve the frontend parameters for.
feparams Used to store the frontend parameters.
diseqc DiSEqC parameters, may be NULL for non-satellite frontends.
Returns:
0 on success, otherwise an SQLite error code.

Multiplex_t* MultiplexGetNext ( MultiplexEnumerator_t  enumerator  ) 

Retrieve the next multiplex from an enumerator.

The returned structured should be free'd using free().

Parameters:
enumerator The enumerator to retrieve the next multiplex from.
Returns:
A Multiplex_t instance or NULL if there are no more multiplexes.

int MultiplexInit ( void   ) 

Initialise the multiplex module for use.

Returns:
0 on success.

int MultiplexNetworkIdSet ( Multiplex_t multiplex,
int  netid 
)

Set the network ID of the multiplex.

Parameters:
multiplex The multiplex to update.
netid The network id to set.
Returns:
0 on success, otherwise an SQLite error code.

int MultiplexPATVersionSet ( Multiplex_t multiplex,
int  patversion 
)

Set the PAT version of a multiplex.

Parameters:
multiplex The multiplex to update.
patversion The version of the PAT to set.
Returns:
0 on success, otherwise an SQLite error code.

int MultiplexTSIdSet ( Multiplex_t multiplex,
int  tsid 
)

Set the TS ID of the multiplex.

Parameters:
multiplex The multiplex to update.
tsid The ID of TS set.
Returns:
0 on success, otherwise an SQLite error code.


Generated on Thu Jun 26 12:58:31 2008 for DVBStreamer by  doxygen 1.5.5