codec: deprecate encoder's encode/flush and decoder's decode

This commit is contained in:
Zhiming Wang
2020-08-08 01:16:44 +08:00
parent 55c8b5fa02
commit 6f44fb79fd
4 changed files with 30 additions and 0 deletions

View File

@ -12,6 +12,11 @@ use {packet, AudioService, ChannelLayout, Error};
pub struct Audio(pub Opened);
impl Audio {
#[deprecated(
since = "4.4.0",
note = "Underlying API avcodec_decode_audio4 has been deprecated since FFmpeg 3.1; \
consider switching to send_packet() and receive_frame()"
)]
pub fn decode<P: packet::Ref>(
&mut self,
packet: &P,