codec: deprecate encoder's encode/flush and decoder's decode
This commit is contained in:
@ -140,6 +140,11 @@ impl AsMut<Context> for Audio {
|
||||
pub struct Encoder(pub Audio);
|
||||
|
||||
impl Encoder {
|
||||
#[deprecated(
|
||||
since = "4.4.0",
|
||||
note = "Underlying API avcodec_encode_audio2 has been deprecated since FFmpeg 3.1; \
|
||||
consider switching to send_frame() and receive_packet()"
|
||||
)]
|
||||
pub fn encode<P: packet::Mut>(
|
||||
&mut self,
|
||||
frame: &frame::Audio,
|
||||
@ -164,6 +169,11 @@ impl Encoder {
|
||||
}
|
||||
}
|
||||
|
||||
#[deprecated(
|
||||
since = "4.4.0",
|
||||
note = "Underlying API avcodec_encode_audio2 has been deprecated since FFmpeg 3.1; \
|
||||
consider switching to send_eof() and receive_packet()"
|
||||
)]
|
||||
pub fn flush<P: packet::Mut>(&mut self, out: &mut P) -> Result<bool, Error> {
|
||||
unsafe {
|
||||
let mut got: c_int = 0;
|
||||
|
@ -415,6 +415,11 @@ impl AsMut<Context> for Video {
|
||||
pub struct Encoder(pub Video);
|
||||
|
||||
impl Encoder {
|
||||
#[deprecated(
|
||||
since = "4.4.0",
|
||||
note = "Underlying API avcodec_encode_video2 has been deprecated since FFmpeg 3.1; \
|
||||
consider switching to send_frame() and receive_packet()"
|
||||
)]
|
||||
#[inline]
|
||||
pub fn encode<P: packet::Mut>(
|
||||
&mut self,
|
||||
@ -443,6 +448,11 @@ impl Encoder {
|
||||
}
|
||||
}
|
||||
|
||||
#[deprecated(
|
||||
since = "4.4.0",
|
||||
note = "Underlying API avcodec_encode_video2 has been deprecated since FFmpeg 3.1; \
|
||||
consider switching to send_frame() and receive_packet()"
|
||||
)]
|
||||
#[inline]
|
||||
pub fn flush<P: packet::Mut>(&mut self, out: &mut P) -> Result<bool, Error> {
|
||||
unsafe {
|
||||
|
Reference in New Issue
Block a user