diff --git a/channels.h b/channels.h index 08d514af..ba1c216c 100644 --- a/channels.h +++ b/channels.h @@ -19,6 +19,44 @@ #ifndef CHANNELS_H #define CHANNELS_H +/* + * Channel definition + */ +typedef struct channel { + + int ch_refcount; + int ch_zombie; + + RB_ENTRY(channel) ch_name_link; + char *ch_name; + char *ch_sname; + + RB_ENTRY(channel) ch_identifier_link; + int ch_id; + + LIST_HEAD(, th_transport) ch_transports; + LIST_HEAD(, th_subscription) ch_subscriptions; + + + struct tt_decoder ch_tt; + + enum { + COMMERCIAL_DETECT_NONE, + COMMERCIAL_DETECT_TTP192, + } ch_commercial_detection; + + struct event_tree ch_epg_events; + struct event *ch_epg_cur_event; + char *ch_icon; + + struct pvr_rec_list ch_pvrrs; + + struct autorec_list ch_autorecs; + +} channel_t; + + + void channels_load(void); channel_t *channel_find_by_name(const char *name, int create); diff --git a/epg.h b/epg.h index df59ea7f..eadf8ee8 100644 --- a/epg.h +++ b/epg.h @@ -19,6 +19,8 @@ #ifndef EPG_H #define EPG_H +#include "channels.h" + void epg_init(void); diff --git a/transports.h b/transports.h index 4eaabdcf..b7d9d470 100644 --- a/transports.h +++ b/transports.h @@ -19,7 +19,7 @@ #ifndef TRANSPORTS_H #define TRANSPORTS_H -#include +#include "channels.h" unsigned int transport_compute_weight(struct th_transport_list *head); diff --git a/tvhead.h b/tvhead.h index d4377e67..ca6ce576 100644 --- a/tvhead.h +++ b/tvhead.h @@ -752,41 +752,6 @@ typedef struct tt_decoder { -/* - * Channel definition - */ -typedef struct channel { - - int ch_refcount; - int ch_zombie; - - RB_ENTRY(channel) ch_name_link; - char *ch_name; - char *ch_sname; - - RB_ENTRY(channel) ch_identifier_link; - int ch_id; - - LIST_HEAD(, th_transport) ch_transports; - LIST_HEAD(, th_subscription) ch_subscriptions; - - - struct tt_decoder ch_tt; - - enum { - COMMERCIAL_DETECT_NONE, - COMMERCIAL_DETECT_TTP192, - } ch_commercial_detection; - - struct event_tree ch_epg_events; - struct event *ch_epg_cur_event; - char *ch_icon; - - struct pvr_rec_list ch_pvrrs; - - struct autorec_list ch_autorecs; - -} channel_t; /* @@ -867,7 +832,7 @@ typedef struct epg_content_type { * EPG event */ typedef struct event { - channel_t *e_channel; + struct channel *e_channel; RB_ENTRY(event) e_channel_link; LIST_ENTRY(event) e_content_type_link;