diff mbox

[FFmpeg-devel] lavr: deprecate the entire library

Message ID 20171117155816.2835-1-atomnuker@gmail.com
State Superseded
Headers show

Commit Message

Rostislav Pehlivanov Nov. 17, 2017, 3:58 p.m. UTC
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
---
 doc/APIchanges        | 5 +++++
 libavresample/utils.c | 3 +++
 2 files changed, 8 insertions(+)

Comments

Carl Eugen Hoyos Nov. 17, 2017, 5:51 p.m. UTC | #1
2017-11-17 16:58 GMT+01:00 Rostislav Pehlivanov <atomnuker@gmail.com>:

> +2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h
> +  Deprecate the entire library. It was unmaintained and redundant
> +  as libswresample did everything it did better, faster, with more
> +  control and with a better, slightly higher level API.

Shouldn't you remove the resample filter first?

Carl Eugen
James Almer Nov. 17, 2017, 5:53 p.m. UTC | #2
On 11/17/2017 12:58 PM, Rostislav Pehlivanov wrote:
> Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
> ---
>  doc/APIchanges        | 5 +++++
>  libavresample/utils.c | 3 +++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index d336f6ce22..22c7b5a0d0 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,11 @@ libavutil:     2017-10-21
>  
>  API changes, most recent first:
>  
> +2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h
> +  Deprecate the entire library. It was unmaintained and redundant> +  as libswresample did everything it did better, faster, with more
> +  control and with a better, slightly higher level API.

This is only partly true. For example, last time i checked swr is
missing some multichannel simd optimizations available on lavr.

> +
>  2017-xx-xx - xxxxxxx - lavc 58.3.100 - avcodec.h
>    Add avcodec_get_hw_frames_parameters().
>  
> diff --git a/libavresample/utils.c b/libavresample/utils.c
> index b4fb906556..3e629fe901 100644
> --- a/libavresample/utils.c
> +++ b/libavresample/utils.c
> @@ -37,6 +37,9 @@ int avresample_open(AVAudioResampleContext *avr)
>  {
>      int ret;
>  
> +    av_log(avr, AV_LOG_WARNING, "This library is being deprecated in favor of libswresample, "
> +           "please migrate your program.");
> +
>      if (avresample_is_open(avr)) {
>          av_log(avr, AV_LOG_ERROR, "The resampling context is already open.\n");
>          return AVERROR(EINVAL);
> 

I don't like this patch much. It gives the same bad vibes as the
"deprecated" ffmpeg package in debian from five years ago. Lets try to
not go there again.

In any case, lavr is disabled by default, ffmpeg requires swr, opusdec
requires swr, etc. So the only people using lavr are those that
purposely want their codebase to work with both projects even if in a
handicapped way, and are thus unlikely to consider/bother to migrate to swr.
People that only care about ffmpeg already use swr because of the above
reasons.

If others however support/endorse this patch or a similar one then I'll
not block it.
Rostislav Pehlivanov Nov. 17, 2017, 5:54 p.m. UTC | #3
On 17 November 2017 at 17:51, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> 2017-11-17 16:58 GMT+01:00 Rostislav Pehlivanov <atomnuker@gmail.com>:
>
> > +2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h
> > +  Deprecate the entire library. It was unmaintained and redundant
> > +  as libswresample did everything it did better, faster, with more
> > +  control and with a better, slightly higher level API.
>
> Shouldn't you remove the resample filter first?
>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

No, I'll send a separate patch to deprecate that one (if this one's okayed)
as well so eventually they would be removed at the same time.
Rostislav Pehlivanov Nov. 17, 2017, 6:06 p.m. UTC | #4
On 17 November 2017 at 17:53, James Almer <jamrial@gmail.com> wrote:

> On 11/17/2017 12:58 PM, Rostislav Pehlivanov wrote:
> > Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
> > ---
> >  doc/APIchanges        | 5 +++++
> >  libavresample/utils.c | 3 +++
> >  2 files changed, 8 insertions(+)
> >
> > diff --git a/doc/APIchanges b/doc/APIchanges
> > index d336f6ce22..22c7b5a0d0 100644
> > --- a/doc/APIchanges
> > +++ b/doc/APIchanges
> > @@ -15,6 +15,11 @@ libavutil:     2017-10-21
> >
> >  API changes, most recent first:
> >
> > +2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h
> > +  Deprecate the entire library. It was unmaintained and redundant> +
> as libswresample did everything it did better, faster, with more
> > +  control and with a better, slightly higher level API.
>
> This is only partly true. For example, last time i checked swr is
> missing some multichannel simd optimizations available on lavr.
>

Which ones?



>
> > +
> >  2017-xx-xx - xxxxxxx - lavc 58.3.100 - avcodec.h
> >    Add avcodec_get_hw_frames_parameters().
> >
> > diff --git a/libavresample/utils.c b/libavresample/utils.c
> > index b4fb906556..3e629fe901 100644
> > --- a/libavresample/utils.c
> > +++ b/libavresample/utils.c
> > @@ -37,6 +37,9 @@ int avresample_open(AVAudioResampleContext *avr)
> >  {
> >      int ret;
> >
> > +    av_log(avr, AV_LOG_WARNING, "This library is being deprecated in
> favor of libswresample, "
> > +           "please migrate your program.");
> > +
> >      if (avresample_is_open(avr)) {
> >          av_log(avr, AV_LOG_ERROR, "The resampling context is already
> open.\n");
> >          return AVERROR(EINVAL);
> >
>
> I don't like this patch much. It gives the same bad vibes as the
> "deprecated" ffmpeg package in debian from five years ago. Lets try to
> not go there again.
>

Ignore politics, we're trying to remove something we don't maintain and
never have.



>
> In any case, lavr is disabled by default, ffmpeg requires swr, opusdec
> requires swr, etc. So the only people using lavr are those that
> purposely want their codebase to work with both projects even if in a
>

Yeah, no. No one packages libav and no one's really trying to do that
anymore. The APIs have diverged (w.r.t. filtering).



> handicapped way, and are thus unlikely to consider/bother to migrate to
> swr.
>

This provides the motivation to move to something better that _we_ actually
maintain and has numerous advantages.


We can't let this sit in our repo as it bitrots when there's a better
solution.
Clément Bœsch Nov. 25, 2017, 2:40 p.m. UTC | #5
On Fri, Nov 17, 2017 at 03:58:16PM +0000, Rostislav Pehlivanov wrote:
[...]
> diff --git a/libavresample/utils.c b/libavresample/utils.c
> index b4fb906556..3e629fe901 100644
> --- a/libavresample/utils.c
> +++ b/libavresample/utils.c
> @@ -37,6 +37,9 @@ int avresample_open(AVAudioResampleContext *avr)
>  {
>      int ret;
>  
> +    av_log(avr, AV_LOG_WARNING, "This library is being deprecated in favor of libswresample, "
> +           "please migrate your program.");
> +

I'm fine with the patch but not so with this message.

Maybe "libavresample is not maintained by the FFmpeg project and will be
dropped at the next major bump. Please use libswresample instead."

And it probably needs a longer explanation somewhere (website/news/...)

Regards,
Derek Buitenhuis Nov. 25, 2017, 5:31 p.m. UTC | #6
On 11/25/2017 2:40 PM, Clément Bœsch wrote:
> Maybe "libavresample is not maintained by the FFmpeg project and will be
> dropped at the next major bump. Please use libswresample instead."
> 
> And it probably needs a longer explanation somewhere (website/news/...)

All API functions should be properly marked as deprecated in the headers.

Relying on a stderr warning to help migrate API users is silly, who is
going to be watching stderr using a /library/?

- Derek
Tobias Rapp Nov. 27, 2017, 8:43 a.m. UTC | #7
On 25.11.2017 18:31, Derek Buitenhuis wrote:
> On 11/25/2017 2:40 PM, Clément Bœsch wrote:
>> Maybe "libavresample is not maintained by the FFmpeg project and will be
>> dropped at the next major bump. Please use libswresample instead."
>>
>> And it probably needs a longer explanation somewhere (website/news/...)
> 
> All API functions should be properly marked as deprecated in the headers.
> 
> Relying on a stderr warning to help migrate API users is silly, who is
> going to be watching stderr using a /library/?

+1

Please avoid the AVStream.codec -> AVStream.codecpar scenario. I don't 
remember how often I was asked by users looking at the logs how they can 
avoid the "Using AVStream.codec to pass codec parameters to muxers is 
deprecated, use AVStream.codecpar instead" warning.

Regards,
Tobias
diff mbox

Patch

diff --git a/doc/APIchanges b/doc/APIchanges
index d336f6ce22..22c7b5a0d0 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,11 @@  libavutil:     2017-10-21
 
 API changes, most recent first:
 
+2017-xx-xx - xxxxxxx - lavr 4.0.0 - avresample.h
+  Deprecate the entire library. It was unmaintained and redundant
+  as libswresample did everything it did better, faster, with more
+  control and with a better, slightly higher level API.
+
 2017-xx-xx - xxxxxxx - lavc 58.3.100 - avcodec.h
   Add avcodec_get_hw_frames_parameters().
 
diff --git a/libavresample/utils.c b/libavresample/utils.c
index b4fb906556..3e629fe901 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -37,6 +37,9 @@  int avresample_open(AVAudioResampleContext *avr)
 {
     int ret;
 
+    av_log(avr, AV_LOG_WARNING, "This library is being deprecated in favor of libswresample, "
+           "please migrate your program.");
+
     if (avresample_is_open(avr)) {
         av_log(avr, AV_LOG_ERROR, "The resampling context is already open.\n");
         return AVERROR(EINVAL);