Milestone, fix black screen and initial frame issues
This commit is contained in:
parent
f4fa723863
commit
0a250b05f3
11 changed files with 708 additions and 47 deletions
14
src/player.h
14
src/player.h
|
|
@ -15,6 +15,16 @@ typedef struct Player {
|
|||
int current_index;
|
||||
time_t app_start_time;
|
||||
Uint32 tuning_blackout_until;
|
||||
SDL_AudioDeviceID audio_device;
|
||||
SDL_AudioSpec audio_spec;
|
||||
SDL_mutex *audio_mutex;
|
||||
SDL_mutex *clock_mutex;
|
||||
double latest_audio_end_pts;
|
||||
int has_audio_stream;
|
||||
int audio_started;
|
||||
int preroll_ready;
|
||||
Uint32 catchup_until;
|
||||
char audio_driver[32];
|
||||
SDL_mutex *error_mutex;
|
||||
char last_error[256];
|
||||
} Player;
|
||||
|
|
@ -23,8 +33,12 @@ int player_init(Player *player, const ChannelList *channels, time_t app_start_ti
|
|||
void player_destroy(Player *player);
|
||||
int player_tune(Player *player, int channel_index);
|
||||
int player_consume_latest_frame(Player *player, FrameData *out);
|
||||
int player_consume_synced_frame(Player *player, FrameData *out, double clock_seconds, double lead_tolerance);
|
||||
double player_live_position(const Player *player, time_t now);
|
||||
double player_get_sync_clock(Player *player, time_t now);
|
||||
void player_set_catchup_until(Player *player, Uint32 tick);
|
||||
int player_is_in_blackout(const Player *player);
|
||||
void player_resume_audio(Player *player);
|
||||
void player_get_error(Player *player, char *buffer, size_t buffer_size);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue