New directory based system for channels
This commit is contained in:
parent
3e6d29670c
commit
b84a3060c1
8 changed files with 466 additions and 241 deletions
|
|
@ -8,11 +8,19 @@
|
|||
typedef struct Channel {
|
||||
int number;
|
||||
char name[64];
|
||||
char description[256];
|
||||
double total_duration_seconds;
|
||||
struct ProgramEntry *programs;
|
||||
int program_count;
|
||||
} Channel;
|
||||
|
||||
typedef struct ProgramEntry {
|
||||
char file_path[PATH_MAX];
|
||||
char file_name[128];
|
||||
char program_title[128];
|
||||
double duration_seconds;
|
||||
} Channel;
|
||||
double start_offset_seconds;
|
||||
} ProgramEntry;
|
||||
|
||||
typedef struct ChannelList {
|
||||
Channel *items;
|
||||
|
|
@ -23,5 +31,11 @@ int channel_list_load(ChannelList *list, const char *media_dir);
|
|||
void channel_list_destroy(ChannelList *list);
|
||||
double channel_live_position(const Channel *channel, time_t app_start_time, time_t now);
|
||||
double channel_live_position_precise(const Channel *channel, Uint64 app_start_ticks, Uint64 now_ticks);
|
||||
const ProgramEntry *channel_resolve_program(const Channel *channel,
|
||||
Uint64 app_start_ticks,
|
||||
Uint64 now_ticks,
|
||||
double *program_seek_seconds,
|
||||
int *program_index);
|
||||
const ProgramEntry *channel_program_at_index(const Channel *channel, int program_index);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue