2026-03-27 21:45:40 -04:00
|
|
|
#ifndef CHANNEL_H
|
|
|
|
|
#define CHANNEL_H
|
|
|
|
|
|
2026-03-27 23:19:42 -04:00
|
|
|
#include <SDL2/SDL.h>
|
2026-03-27 21:45:40 -04:00
|
|
|
#include <limits.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
|
|
typedef struct Channel {
|
|
|
|
|
int number;
|
|
|
|
|
char name[64];
|
|
|
|
|
char file_path[PATH_MAX];
|
|
|
|
|
char file_name[128];
|
|
|
|
|
char program_title[128];
|
|
|
|
|
double duration_seconds;
|
|
|
|
|
} Channel;
|
|
|
|
|
|
|
|
|
|
typedef struct ChannelList {
|
|
|
|
|
Channel *items;
|
|
|
|
|
int count;
|
|
|
|
|
} ChannelList;
|
|
|
|
|
|
|
|
|
|
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);
|
2026-03-27 23:19:42 -04:00
|
|
|
double channel_live_position_precise(const Channel *channel, Uint64 app_start_ticks, Uint64 now_ticks);
|
2026-03-27 21:45:40 -04:00
|
|
|
|
|
|
|
|
#endif
|