summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core/demux.h
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-05-27 08:23:08 +0000
committerMichael Hunold <devnull@localhost>2003-05-27 08:23:08 +0000
commitad0373531b89bbe79715e18bc36f7660d1f2b882 (patch)
treecd52375fa4ae5a60a56d8da681eafe9081950188 /linux/drivers/media/dvb/dvb-core/demux.h
parentc01ec848557e671b528c110a4e10b7ef48c1418a (diff)
downloadmediapointer-dvb-s2-ad0373531b89bbe79715e18bc36f7660d1f2b882.tar.gz
mediapointer-dvb-s2-ad0373531b89bbe79715e18bc36f7660d1f2b882.tar.bz2
Here comes a huge cleanup patch in order to get the sources into
"kernel shape": I mainly changed all "typedef struct foo_s {...} foo_t" to "struct foo {}". Please don't start a policy war, I know the pros cons of typedefs and structures. We should, however, stick to the coding rules of the kernel: typedefed structs are only used for opaque data types, where the internal representation is irrelevant and we have get()/set() functions for accessing them (ie. spinlock_t)
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core/demux.h')
-rw-r--r--linux/drivers/media/dvb/dvb-core/demux.h116
1 files changed, 56 insertions, 60 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/demux.h b/linux/drivers/media/dvb/dvb-core/demux.h
index 00724ca18..e1b3f88b6 100644
--- a/linux/drivers/media/dvb/dvb-core/demux.h
+++ b/linux/drivers/media/dvb/dvb-core/demux.h
@@ -106,11 +106,11 @@ typedef enum
#define DMX_TS_PES_PCR DMX_TS_PES_PCR0
-struct dmx_ts_feed_s {
+struct dmx_ts_feed {
int is_filtering; /* Set to non-zero when filtering in progress */
- struct dmx_demux_s *parent; /* Back-pointer */
+ struct dmx_demux *parent; /* Back-pointer */
void *priv; /* Pointer to private data of the API client */
- int (*set) (struct dmx_ts_feed_s *feed,
+ int (*set) (struct dmx_ts_feed *feed,
u16 pid,
int type,
dmx_ts_pes_t pes_type,
@@ -118,27 +118,25 @@ struct dmx_ts_feed_s {
size_t circular_buffer_size,
int descramble,
struct timespec timeout);
- int (*start_filtering) (struct dmx_ts_feed_s* feed);
- int (*stop_filtering) (struct dmx_ts_feed_s* feed);
+ int (*start_filtering) (struct dmx_ts_feed* feed);
+ int (*stop_filtering) (struct dmx_ts_feed* feed);
};
-typedef struct dmx_ts_feed_s dmx_ts_feed_t;
-
/*--------------------------------------------------------------------------*/
/* Section reception */
/*--------------------------------------------------------------------------*/
-typedef struct {
+struct dmx_section_filter {
u8 filter_value [DMX_MAX_FILTER_SIZE];
u8 filter_mask [DMX_MAX_FILTER_SIZE];
u8 filter_mode [DMX_MAX_FILTER_SIZE];
- struct dmx_section_feed_s* parent; /* Back-pointer */
+ struct dmx_section_feed* parent; /* Back-pointer */
void* priv; /* Pointer to private data of the API client */
-} dmx_section_filter_t;
+};
-struct dmx_section_feed_s {
+struct dmx_section_feed {
int is_filtering; /* Set to non-zero when filtering in progress */
- struct dmx_demux_s* parent; /* Back-pointer */
+ struct dmx_demux* parent; /* Back-pointer */
void* priv; /* Pointer to private data of the API client */
int check_crc;
@@ -148,19 +146,18 @@ struct dmx_section_feed_s {
int secbufp;
int seclen;
- int (*set) (struct dmx_section_feed_s* feed,
+ int (*set) (struct dmx_section_feed* feed,
u16 pid,
size_t circular_buffer_size,
int descramble,
int check_crc);
- int (*allocate_filter) (struct dmx_section_feed_s* feed,
- dmx_section_filter_t** filter);
- int (*release_filter) (struct dmx_section_feed_s* feed,
- dmx_section_filter_t* filter);
- int (*start_filtering) (struct dmx_section_feed_s* feed);
- int (*stop_filtering) (struct dmx_section_feed_s* feed);
+ int (*allocate_filter) (struct dmx_section_feed* feed,
+ struct dmx_section_filter** filter);
+ int (*release_filter) (struct dmx_section_feed* feed,
+ struct dmx_section_filter* filter);
+ int (*start_filtering) (struct dmx_section_feed* feed);
+ int (*stop_filtering) (struct dmx_section_feed* feed);
};
-typedef struct dmx_section_feed_s dmx_section_feed_t;
/*--------------------------------------------------------------------------*/
/* Callback functions */
@@ -170,14 +167,14 @@ typedef int (*dmx_ts_cb) ( const u8 * buffer1,
size_t buffer1_length,
const u8 * buffer2,
size_t buffer2_length,
- dmx_ts_feed_t* source,
+ struct dmx_ts_feed* source,
dmx_success_t success);
typedef int (*dmx_section_cb) ( const u8 * buffer1,
size_t buffer1_len,
const u8 * buffer2,
size_t buffer2_len,
- dmx_section_filter_t * source,
+ struct dmx_section_filter * source,
dmx_success_t success);
/*--------------------------------------------------------------------------*/
@@ -196,20 +193,20 @@ typedef enum {
DMX_STREAM_3
} dmx_frontend_source_t;
-typedef struct {
+struct dmx_frontend {
struct list_head connectivity_list; /* List of front-ends that can
be connected to a particular
demux */
void* priv; /* Pointer to private data of the API client */
dmx_frontend_source_t source;
-} dmx_frontend_t;
+};
/*--------------------------------------------------------------------------*/
/* MPEG-2 TS Demux */
/*--------------------------------------------------------------------------*/
/*
- * Flags OR'ed in the capabilites field of struct dmx_demux_s.
+ * Flags OR'ed in the capabilites field of struct dmx_demux.
*/
#define DMX_TS_FILTERING 1
@@ -228,57 +225,56 @@ typedef struct {
/*
* DMX_FE_ENTRY(): Casts elements in the list of registered
* front-ends from the generic type struct list_head
- * to the type * dmx_frontend_t
+ * to the type * struct dmx_frontend
*.
*/
-#define DMX_FE_ENTRY(list) list_entry(list, dmx_frontend_t, connectivity_list)
+#define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list)
-struct dmx_demux_s {
+struct dmx_demux {
u32 capabilities; /* Bitfield of capability flags */
- dmx_frontend_t* frontend; /* Front-end connected to the demux */
+ struct dmx_frontend* frontend; /* Front-end connected to the demux */
struct list_head reg_list; /* List of registered demuxes */
void* priv; /* Pointer to private data of the API client */
int users; /* Number of users */
- int (*open) (struct dmx_demux_s* demux);
- int (*close) (struct dmx_demux_s* demux);
- int (*write) (struct dmx_demux_s* demux, const char* buf, size_t count);
- int (*allocate_ts_feed) (struct dmx_demux_s* demux,
- dmx_ts_feed_t** feed,
+ int (*open) (struct dmx_demux* demux);
+ int (*close) (struct dmx_demux* demux);
+ int (*write) (struct dmx_demux* demux, const char* buf, size_t count);
+ int (*allocate_ts_feed) (struct dmx_demux* demux,
+ struct dmx_ts_feed** feed,
dmx_ts_cb callback);
- int (*release_ts_feed) (struct dmx_demux_s* demux,
- dmx_ts_feed_t* feed);
- int (*allocate_section_feed) (struct dmx_demux_s* demux,
- dmx_section_feed_t** feed,
+ int (*release_ts_feed) (struct dmx_demux* demux,
+ struct dmx_ts_feed* feed);
+ int (*allocate_section_feed) (struct dmx_demux* demux,
+ struct dmx_section_feed** feed,
dmx_section_cb callback);
- int (*release_section_feed) (struct dmx_demux_s* demux,
- dmx_section_feed_t* feed);
- int (*descramble_mac_address) (struct dmx_demux_s* demux,
+ int (*release_section_feed) (struct dmx_demux* demux,
+ struct dmx_section_feed* feed);
+ int (*descramble_mac_address) (struct dmx_demux* demux,
u8* buffer1,
size_t buffer1_length,
u8* buffer2,
size_t buffer2_length,
u16 pid);
- int (*descramble_section_payload) (struct dmx_demux_s* demux,
+ int (*descramble_section_payload) (struct dmx_demux* demux,
u8* buffer1,
size_t buffer1_length,
u8* buffer2, size_t buffer2_length,
u16 pid);
- int (*add_frontend) (struct dmx_demux_s* demux,
- dmx_frontend_t* frontend);
- int (*remove_frontend) (struct dmx_demux_s* demux,
- dmx_frontend_t* frontend);
- struct list_head* (*get_frontends) (struct dmx_demux_s* demux);
- int (*connect_frontend) (struct dmx_demux_s* demux,
- dmx_frontend_t* frontend);
- int (*disconnect_frontend) (struct dmx_demux_s* demux);
-
- int (*get_pes_pids) (struct dmx_demux_s* demux, u16 *pids);
-
- int (*get_stc) (struct dmx_demux_s* demux, unsigned int num,
+ int (*add_frontend) (struct dmx_demux* demux,
+ struct dmx_frontend* frontend);
+ int (*remove_frontend) (struct dmx_demux* demux,
+ struct dmx_frontend* frontend);
+ struct list_head* (*get_frontends) (struct dmx_demux* demux);
+ int (*connect_frontend) (struct dmx_demux* demux,
+ struct dmx_frontend* frontend);
+ int (*disconnect_frontend) (struct dmx_demux* demux);
+
+ int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
+
+ int (*get_stc) (struct dmx_demux* demux, unsigned int num,
u64 *stc, unsigned int *base);
-};
-typedef struct dmx_demux_s dmx_demux_t;
+};
/*--------------------------------------------------------------------------*/
/* Demux directory */
@@ -286,14 +282,14 @@ typedef struct dmx_demux_s dmx_demux_t;
/*
* DMX_DIR_ENTRY(): Casts elements in the list of registered
- * demuxes from the generic type struct list_head* to the type dmx_demux_t
+ * demuxes from the generic type struct list_head* to the type struct dmx_demux
*.
*/
-#define DMX_DIR_ENTRY(list) list_entry(list, dmx_demux_t, reg_list)
+#define DMX_DIR_ENTRY(list) list_entry(list, struct dmx_demux, reg_list)
-int dmx_register_demux (dmx_demux_t* demux);
-int dmx_unregister_demux (dmx_demux_t* demux);
+int dmx_register_demux (struct dmx_demux* demux);
+int dmx_unregister_demux (struct dmx_demux* demux);
struct list_head* dmx_get_demuxes (void);
#endif /* #ifndef __DEMUX_H */