summaryrefslogtreecommitdiffstats
path: root/audio/decode/ad.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-11 11:58:26 +0100
committerwm4 <wm4@nowhere>2017-01-11 11:58:32 +0100
commitcbd8abcbff83624c20460cc05bf33d72c5148d67 (patch)
tree03df0420a2e1722d6eb4d85738d8210ba3931cc8 /audio/decode/ad.h
parentf8baae585451bb072e8ef606bafd7c0d5e369bf7 (diff)
downloadmpv-cbd8abcbff83624c20460cc05bf33d72c5148d67.tar.bz2
mpv-cbd8abcbff83624c20460cc05bf33d72c5148d67.tar.xz
audio: restructure decode loop
Same deal as with video. Including the EOF handling. (It would be nice if this code were not duplicated, but right now we're not even close to unifying the audio and video code paths.)
Diffstat (limited to 'audio/decode/ad.h')
-rw-r--r--audio/decode/ad.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/audio/decode/ad.h b/audio/decode/ad.h
index 771ceb7e88..bbb050eb4c 100644
--- a/audio/decode/ad.h
+++ b/audio/decode/ad.h
@@ -35,8 +35,11 @@ struct ad_functions {
int (*init)(struct dec_audio *da, const char *decoder);
void (*uninit)(struct dec_audio *da);
int (*control)(struct dec_audio *da, int cmd, void *arg);
- int (*decode_packet)(struct dec_audio *da, struct demux_packet *pkt,
- struct mp_audio **out);
+ // Return whether or not the packet has been consumed.
+ bool (*send_packet)(struct dec_audio *da, struct demux_packet *pkt);
+ // Return whether decoding is still going on (false if EOF was reached).
+ // Never returns false & *out set, but can return true with !*out.
+ bool (*receive_frame)(struct dec_audio *da, struct mp_audio **out);
};
enum ad_ctrl {