[FFmpeg-devel] [PATCH] avcodec: Remove libstagefright

Philip Langdale philipl at overt.org
Sun Jan 3 19:50:52 CET 2016


On Sun,  3 Jan 2016 13:37:18 -0500
Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:

> It serves absolutely no purpose other than to confuse potentional
> Android developers about how to use hardware acceleration properly
> on the the platform. Both stagefright itself, and MediaCodec, have
> avcodec backends already, and this is the correct way to use it.
> MediaCodec as a proper JNI API.
> 
> Furthermore, stagefright support in avcodec needs a series of
> magic incantations and version-specific stuff, such that
> using it actually provides downsides compared just using the actual
> Android frameworks properly, in that it is a lot more work and
> confusion to get it even running. It also leads to a lot of
> misinformation, like these sorts of comments (in [1]) that are
> absolutely incorrect.
> 
> [1] http://stackoverflow.com/a/29362353/3115956
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> I am certain there are many more reasons to remvoe this as well. I
> know its own author despises it, and I know j-b will same things to
> say.
> 
> I have CC'd the person listed in MAINTAINERS for this set of code as
> well.
> 
> Please discuss, and keep discourse civil and avoid ad hominems, etc.
> ---
>  MAINTAINERS                   |   1 -
>  configure                     |   6 -
>  libavcodec/Makefile           |   1 -
>  libavcodec/allcodecs.c        |   1 -
>  libavcodec/libstagefright.cpp | 591
> ------------------------------------------
> libavcodec/version.h          |   2 +- tools/build_libstagefright
> |  58 ----- 7 files changed, 1 insertion(+), 659 deletions(-)
>  delete mode 100644 libavcodec/libstagefright.cpp
>  delete mode 100644 tools/build_libstagefright
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9add13d..b62a4f8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -304,7 +304,6 @@ Codecs:
>  Hardware acceleration:
>    crystalhd.c                           Philip Langdale
>    dxva2*                                Hendrik Leppkes, Laurent
> Aimar
> -  libstagefright.cpp                    Mohamed Naufal
>    vaapi*                                Gwenole Beauchesne
>    vda*                                  Sebastien Zwickert
>    vdpau*                                Philip Langdale, Carl Eugen
> Hoyos diff --git a/configure b/configure
> index 6710f85..4d6d4fc 100755
> --- a/configure
> +++ b/configure
> @@ -250,7 +250,6 @@ External library support:
>    --enable-libsoxr         enable Include libsoxr resampling [no]
>    --enable-libspeex        enable Speex de/encoding via libspeex [no]
>    --enable-libssh          enable SFTP protocol via libssh [no]
> -  --enable-libstagefright-h264  enable H.264 decoding via
> libstagefright [no] --enable-libtesseract    enable Tesseract, needed
> for ocr filter [no] --enable-libtheora       enable Theora encoding
> via libtheora [no] --enable-libtwolame      enable MP2 encoding via
> libtwolame [no] @@ -1478,7 +1477,6 @@ EXTERNAL_LIBRARY_LIST="
>      libsoxr
>      libspeex
>      libssh
> -    libstagefright_h264
>      libtesseract
>      libtheora
>      libtwolame
> @@ -2639,7 +2637,6 @@ libshine_encoder_select="audio_frame_queue"
>  libspeex_decoder_deps="libspeex"
>  libspeex_encoder_deps="libspeex"
>  libspeex_encoder_select="audio_frame_queue"
> -libstagefright_h264_decoder_deps="libstagefright_h264"
>  libtheora_encoder_deps="libtheora"
>  libtwolame_encoder_deps="libtwolame"
>  libvo_aacenc_encoder_deps="libvo_aacenc"
> @@ -5476,9 +5473,6 @@ enabled libsnappy         && require snappy
> snappy-c.h snappy_compress -lsnappy enabled libsoxr           &&
> require libsoxr soxr.h soxr_create -lsoxr && LIBSOXR="-lsoxr" enabled
> libssh            && require_pkg_config libssh libssh/sftp.h
> sftp_init enabled libspeex          && require_pkg_config speex
> speex/speex.h speex_decoder_init -lspeex -enabled libstagefright_h264
> && require_cpp libstagefright_h264 "binder/ProcessState.h
> media/stagefright/MetaData.h
> -    media/stagefright/MediaBufferGroup.h
> media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h
> -    media/stagefright/OMXClient.h media/stagefright/OMXCodec.h"
> android::OMXClient -lstagefright -lmedia -lutils -lbinder
> -lgnustl_static enabled libtesseract      && require_pkg_config
> tesseract tesseract/capi.h TessBaseAPICreate enabled
> libtheora         && require libtheora theora/theoraenc.h
> th_info_init -ltheoraenc -ltheoradec -logg enabled libtwolame
> && require libtwolame twolame.h twolame_init -ltwolame && diff --git
> a/libavcodec/Makefile b/libavcodec/Makefile index a18ca5b..b9ffdb9
> 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -829,7
> +829,6 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER)    +=
> libschroedingerenc.o \ OBJS-$(CONFIG_LIBSHINE_ENCODER)           +=
> libshine.o OBJS-$(CONFIG_LIBSPEEX_DECODER)           += libspeexdec.o
> OBJS-$(CONFIG_LIBSPEEX_ENCODER)           += libspeexenc.o
> -OBJS-$(CONFIG_LIBSTAGEFRIGHT_H264_DECODER)+= libstagefright.o
> OBJS-$(CONFIG_LIBTHEORA_ENCODER)          += libtheoraenc.o
> OBJS-$(CONFIG_LIBTWOLAME_ENCODER)         += libtwolame.o
> OBJS-$(CONFIG_LIBUTVIDEO_DECODER)         += libutvideodec.o diff
> --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index
> 4eeb6f3..2128546 100644 --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -572,7 +572,6 @@ void avcodec_register_all(void)
>      REGISTER_ENCDEC (LIBSCHROEDINGER,   libschroedinger);
>      REGISTER_ENCODER(LIBSHINE,          libshine);
>      REGISTER_ENCDEC (LIBSPEEX,          libspeex);
> -    REGISTER_DECODER(LIBSTAGEFRIGHT_H264, libstagefright_h264);
>      REGISTER_ENCODER(LIBTHEORA,         libtheora);
>      REGISTER_ENCODER(LIBTWOLAME,        libtwolame);
>      REGISTER_ENCDEC (LIBUTVIDEO,        libutvideo);
> diff --git a/libavcodec/libstagefright.cpp
> b/libavcodec/libstagefright.cpp deleted file mode 100644
> index 07cac33..0000000
> diff --git a/libavcodec/version.h b/libavcodec/version.h
> index 9846275..2b01e6f 100644
> --- a/libavcodec/version.h
> +++ b/libavcodec/version.h
> @@ -29,7 +29,7 @@
>  #include "libavutil/version.h"
>  
>  #define LIBAVCODEC_VERSION_MAJOR  57
> -#define LIBAVCODEC_VERSION_MINOR  21
> +#define LIBAVCODEC_VERSION_MINOR  22
>  #define LIBAVCODEC_VERSION_MICRO 100
>  
>  #define LIBAVCODEC_VERSION_INT
> AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git
> a/tools/build_libstagefright b/tools/build_libstagefright deleted
> file mode 100644 index 22bb712..0000000

+1


--phil


More information about the ffmpeg-devel mailing list