codec: deprecate encoder's encode/flush and decoder's decode
This commit is contained in:
parent
55c8b5fa02
commit
6f44fb79fd
@ -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,
|
||||
|
@ -14,6 +14,11 @@ use {packet, Error, FieldOrder, Rational};
|
||||
pub struct Video(pub Opened);
|
||||
|
||||
impl Video {
|
||||
#[deprecated(
|
||||
since = "4.4.0",
|
||||
note = "Underlying API avcodec_decode_video2 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,
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user