Files
Velix-MPV-Core/audio/out/ao_harmony.h
T

50 lines
1.1 KiB
C

/*
* HarmonyOS audio diagnostics exported for the isolated Playback Lab.
* The AO remains usable without consuming this optional diagnostics API.
*/
#ifndef MPV_AO_HARMONY_H
#define MPV_AO_HARMONY_H
#include <stdint.h>
#include "mpv/client.h"
#ifdef __cplusplus
extern "C" {
#endif
enum mpv_harmony_audio_state {
MPV_HARMONY_AUDIO_DISABLED = 0,
MPV_HARMONY_AUDIO_READY = 1,
MPV_HARMONY_AUDIO_RUNNING = 2,
MPV_HARMONY_AUDIO_PAUSED = 3,
MPV_HARMONY_AUDIO_STOPPED = 4,
MPV_HARMONY_AUDIO_ERROR = 5,
MPV_HARMONY_AUDIO_RELEASED = 6,
};
struct mpv_harmony_audio_stats {
int32_t state;
int32_t sample_rate;
int32_t sample_format;
int32_t channels;
uint64_t channel_layout;
int64_t submitted_frames;
int64_t played_frames;
int64_t audio_timestamp_ns;
int64_t estimated_delay_ms;
int64_t buffer_starvation;
int64_t system_underrun;
int64_t callback_count;
int64_t audio_flush_count;
int64_t seek_audio_reset_count;
};
MPV_EXPORT int mpv_harmony_audio_get_stats(struct mpv_harmony_audio_stats *stats);
#ifdef __cplusplus
}
#endif
#endif