mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
move all types and defines to zapit/include/zapit/types.h
This commit is contained in:
@@ -25,47 +25,12 @@
|
||||
#ifndef __zapittypes_h__
|
||||
#define __zapittypes_h__
|
||||
|
||||
|
||||
#include <zapit/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <zapit/types.h>
|
||||
#include <linux/dvb/frontend.h>
|
||||
|
||||
typedef uint16_t t_service_id;
|
||||
#define SCANF_SERVICE_ID_TYPE "%hx"
|
||||
|
||||
typedef uint16_t t_original_network_id;
|
||||
#define SCANF_ORIGINAL_NETWORK_ID_TYPE "%hx"
|
||||
|
||||
typedef uint16_t t_transport_stream_id;
|
||||
#define SCANF_TRANSPORT_STREAM_ID_TYPE "%hx"
|
||||
|
||||
typedef int16_t t_satellite_position;
|
||||
#define SCANF_SATELLITE_POSITION_TYPE "%hd"
|
||||
|
||||
//typedef uint16_t t_network_id;
|
||||
//Introduced by Nirvana 11/05. Didn't check if there are similar types
|
||||
typedef uint16_t t_bouquet_id;
|
||||
//Introduced by Nirvana 11/05. Didn't check if there are similar types
|
||||
//typedef uint32_t t_transponder_id;
|
||||
#define CREATE_TRANSPONDER_ID_FROM_ORIGINALNETWORK_TRANSPORTSTREAM_ID(original_network_id,transport_stream_id) ((((t_original_network_id) original_network_id) << 16) | (t_transport_stream_id) transport_stream_id)
|
||||
|
||||
/* unique channel identification */
|
||||
typedef uint64_t t_channel_id;
|
||||
#define CREATE_CHANNEL_ID(service_id,original_network_id,transport_stream_id) ((((t_channel_id)transport_stream_id) << 32) | (((t_channel_id)original_network_id) << 16) | (t_channel_id)service_id)
|
||||
//#define CREATE_CHANNEL_ID CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(service_id, original_network_id, transport_stream_id)
|
||||
#define GET_TRANSPORT_STREAM_ID_FROM_CHANNEL_ID(channel_id) ((t_original_network_id)((channel_id) >> 32))
|
||||
#define GET_ORIGINAL_NETWORK_ID_FROM_CHANNEL_ID(channel_id) ((t_original_network_id)((channel_id) >> 16))
|
||||
#define GET_SERVICE_ID_FROM_CHANNEL_ID(channel_id) ((t_service_id)(channel_id))
|
||||
#define PRINTF_CHANNEL_ID_TYPE "%16llx"
|
||||
#define PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "%llx"
|
||||
#define SCANF_CHANNEL_ID_TYPE "%llx"
|
||||
|
||||
#define CREATE_CHANNEL_ID64 (((uint64_t)(satellitePosition+freq*4) << 48) | ((uint64_t) transport_stream_id << 32) | ((uint64_t)original_network_id << 16) | (uint64_t)service_id)
|
||||
|
||||
#define SAME_TRANSPONDER(id1, id2) ((id1 >> 16) == (id2 >> 16))
|
||||
|
||||
/* diseqc types */
|
||||
typedef enum {
|
||||
NO_DISEQC,
|
||||
@@ -129,6 +94,7 @@ typedef struct TP_parameter
|
||||
struct dvb_frontend_parameters feparams;
|
||||
} TP_params;
|
||||
|
||||
#if 0
|
||||
/* complete channel-parameters in a struct */
|
||||
typedef struct Channel_parameter
|
||||
{
|
||||
@@ -139,6 +105,7 @@ typedef struct Channel_parameter
|
||||
unsigned char service_type;
|
||||
uint32_t TP_id; /* diseqc<<24 | feparams->frequency>>8 */
|
||||
} CH_params;
|
||||
#endif
|
||||
|
||||
/* complete zapit start thread-parameters in a struct */
|
||||
typedef struct ZAPIT_start_arg
|
||||
@@ -152,6 +119,7 @@ typedef struct ZAPIT_start_arg
|
||||
int ci_clock;
|
||||
} Z_start_arg;
|
||||
|
||||
#if 0
|
||||
typedef struct TP_map
|
||||
{
|
||||
TP_params TP;
|
||||
@@ -162,6 +130,8 @@ typedef struct TP_map
|
||||
} t_transponder;
|
||||
|
||||
#define MAX_LNB 64
|
||||
#endif
|
||||
|
||||
typedef struct Zapit_config {
|
||||
int writeChannelsNames;
|
||||
int makeRemainingChannelsBouquet;
|
||||
@@ -187,7 +157,9 @@ typedef struct Zapit_config {
|
||||
int uni_qrg;
|
||||
} t_zapit_config;
|
||||
|
||||
#if 0
|
||||
typedef std::map <uint32_t, TP_map> TP_map_t;
|
||||
typedef std::map <uint32_t, TP_map>::iterator TP_iterator;
|
||||
#endif
|
||||
|
||||
#endif /* __zapittypes_h__ */
|
||||
|
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* $Header: /cvsroot/tuxbox/apps/dvb/zapit/include/zapit/types.h,v 1.4 2002/10/12 20:19:44 obi Exp $
|
||||
*
|
||||
* zapit's types - d-box2 linux project
|
||||
* these types are used by the clientlib and zapit itself
|
||||
*
|
||||
@@ -25,17 +23,46 @@
|
||||
#ifndef __zapit__types_h__
|
||||
#define __zapit__types_h__
|
||||
|
||||
//typedef void CS_DMX_PDATA;
|
||||
|
||||
#include <stdint.h>
|
||||
#include "client/zapittypes.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef uint16_t freq_id_t;
|
||||
typedef uint16_t t_service_id;
|
||||
#define SCANF_SERVICE_ID_TYPE "%hx"
|
||||
|
||||
typedef uint16_t t_original_network_id;
|
||||
#define SCANF_ORIGINAL_NETWORK_ID_TYPE "%hx"
|
||||
|
||||
typedef uint16_t t_transport_stream_id;
|
||||
#define SCANF_TRANSPORT_STREAM_ID_TYPE "%hx"
|
||||
|
||||
typedef int16_t t_satellite_position;
|
||||
#define SCANF_SATELLITE_POSITION_TYPE "%hd"
|
||||
|
||||
typedef uint16_t t_bouquet_id;
|
||||
|
||||
/* unique channel identification */
|
||||
typedef uint64_t t_channel_id;
|
||||
|
||||
#define CREATE_CHANNEL_ID(service_id,original_network_id,transport_stream_id) ((((t_channel_id)transport_stream_id) << 32) | (((t_channel_id)original_network_id) << 16) | (t_channel_id)service_id)
|
||||
#define CREATE_CHANNEL_ID64 (((uint64_t)(satellitePosition+freq*4) << 48) | ((uint64_t) transport_stream_id << 32) | ((uint64_t)original_network_id << 16) | (uint64_t)service_id)
|
||||
|
||||
#define PRINTF_CHANNEL_ID_TYPE "%16llx"
|
||||
#define PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "%llx"
|
||||
#define SCANF_CHANNEL_ID_TYPE "%llx"
|
||||
|
||||
typedef uint64_t transponder_id_t;
|
||||
typedef uint16_t freq_id_t;
|
||||
#define PRINTF_TRANSPONDER_ID_TYPE "%12llx"
|
||||
#define TRANSPONDER_ID_NOT_TUNED 0
|
||||
#define CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition,original_network_id,transport_stream_id) \
|
||||
( ((uint64_t)freq << 48) | ((uint64_t) ( satellitePosition >= 0 ? satellitePosition : (uint64_t)(0xF000+ abs(satellitePosition))) << 32) | ((uint64_t)transport_stream_id << 16) | (uint64_t)original_network_id)
|
||||
|
||||
#define GET_TRANSPORT_STREAM_ID_FROM_CHANNEL_ID(channel_id) ((t_transport_stream_id)((channel_id) >> 32))
|
||||
#define GET_ORIGINAL_NETWORK_ID_FROM_CHANNEL_ID(channel_id) ((t_original_network_id)((channel_id) >> 16))
|
||||
#define GET_SERVICE_ID_FROM_CHANNEL_ID(channel_id) ((t_service_id)(channel_id))
|
||||
|
||||
#define SAME_TRANSPONDER(id1, id2) ((id1 >> 16) == (id2 >> 16))
|
||||
|
||||
#define PRINTF_TRANSPONDER_ID_TYPE "%12llx"
|
||||
#define TRANSPONDER_ID_NOT_TUNED 0
|
||||
#define GET_ORIGINAL_NETWORK_ID_FROM_TRANSPONDER_ID(transponder_id) ((t_original_network_id)(transponder_id ))
|
||||
#define GET_TRANSPORT_STREAM_ID_FROM_TRANSPONDER_ID(transponder_id) ((t_transport_stream_id)(transponder_id >> 16))
|
||||
#define GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(transponder_id) ((t_satellite_position )(transponder_id >> 32))
|
||||
|
Reference in New Issue
Block a user