summaryrefslogtreecommitdiffstats
path: root/audio/decode/dec_audio.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/decode/dec_audio.h')
-rw-r--r--audio/decode/dec_audio.h41
1 files changed, 20 insertions, 21 deletions
diff --git a/audio/decode/dec_audio.h b/audio/decode/dec_audio.h
index d88d8bfaea..27752f7be1 100644
--- a/audio/decode/dec_audio.h
+++ b/audio/decode/dec_audio.h
@@ -30,39 +30,38 @@ struct dec_audio {
struct mp_log *log;
struct MPOpts *opts;
struct mpv_global *global;
- bool spdif_passthrough, spdif_failed;
const struct ad_functions *ad_driver;
struct sh_stream *header;
- struct af_stream *afilter;
char *decoder_desc;
- struct mp_audio decode_format;
- struct mp_audio *waiting; // used on format-change
- // last known pts value in output from decoder
- double pts;
- // number of samples output by decoder after last known pts
- int pts_offset;
+
+ bool try_spdif;
+
// set every time a jump in timestamps is encountered
bool pts_reset;
+
// For free use by the ad_driver
void *priv;
- // Strictly internal to dec_audio.c
- struct demux_packet *packet;
-};
-enum {
- AD_OK = 0,
- AD_ERR = -1,
- AD_EOF = -2,
- AD_NEW_FMT = -3,
- AD_WAIT = -4,
+ // Strictly internal (dec_audio.c).
+
+ double pts; // endpts of previous frame
+ struct demux_packet *packet;
+ struct mp_audio *current_frame;
+ int current_state;
};
struct mp_decoder_list *audio_decoder_list(void);
int audio_init_best_codec(struct dec_audio *d_audio);
-int audio_decode(struct dec_audio *d_audio, struct mp_audio_buffer *outbuf,
- int minsamples);
-int initial_audio_decode(struct dec_audio *d_audio);
-void audio_reset_decoding(struct dec_audio *d_audio);
void audio_uninit(struct dec_audio *d_audio);
+void audio_work(struct dec_audio *d_audio);
+
+#define AUDIO_OK 1
+#define AUDIO_WAIT 0
+#define AUDIO_EOF -1
+#define AUDIO_SKIP -2
+int audio_get_frame(struct dec_audio *d_audio, struct mp_audio **out_frame);
+
+void audio_reset_decoding(struct dec_audio *d_audio);
+
#endif /* MPLAYER_DEC_AUDIO_H */