gst-libav-1.8.0没有构建一些多路分离器

时间:2016-08-19 08:07:38

标签: android gstreamer libav

我正在交叉编译gst-libav-1.8.0并且有几天遇到阻塞我的问题。你能帮忙吗?

从build.log中启用了许多解复用器。但是当使用gst-inspect时我只发现以下多路分离器。在build.out中找不到错误

当我运行gst-inspect时,我收到了以下警告。不确定它是否与此问题有关:

(gst-inspect-1.0:4419): GStreamer-WARNING **: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.

我使用以下构建脚本进行交叉编译:

#!/bin/sh

ROOT=$PWD/../../../../..

DIRECTORY=$ROOT/../gst/usr/local

if [ ! -d "$DIRECTORY" ]; then
  mkdir -p $DIRECTORY
fi

if [ ! -d "$DIRECTORY" ]; then
  exit;
fi

export PATH="$ROOT/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin:$PATH"
export SYS_ROOT="$ROOT/prebuilts/ndk/9/platforms/android-19/arch-arm"
export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
export CXX="arm-linux-androideabi-g++"
export LD="arm-linux-androideabi-ld" 
export AR="arm-linux-androideabi-ar"
export RANLIB="arm-linux-androideabi-ranlib"
export STRIP="arm-linux-androideabi-strip"

#./configure --host=arm-linux-androideabi --prefix=$DIRECTORY --disable-rpath --includedir=$DIRECTORY/include --libdir=$DIRECTORY/lib --exec-prefix=$DIRECTORY CFLAGS="-fPIE -pie" LDFLAGS="-fPIE -pie" --with-pkg-config-path="$DIRECTORY/lib/pkgconfig" --with-libav-extra-configure="--disable-yasm --pkgconfigdir=$DIRECTORY/lib/pkgconfig --enable-ffmpeg"
./configure --host=arm-linux-androideabi --prefix=$DIRECTORY --disable-rpath --includedir=$DIRECTORY/include --libdir=$DIRECTORY/lib --exec-prefix=$DIRECTORY CFLAGS="-fPIE -pie" LDFLAGS="-fPIE -pie" --with-pkg-config-path="$DIRECTORY/lib/pkgconfig" --with-libav-extra-configure="--disable-yasm"

make 
make install

使用gst-inspect只能找到以下解复用程序:

./gst-inspect-1.0 libav |grep demux 
  avdemux_yuv4mpegpipe: libav YUV4MPEG pipe demuxer
  avdemux_wsvqa: libav Westwood Studios VQA demuxer
  avdemux_wsaud: libav Westwood Studios audio demuxer
  avdemux_wc3movie: libav Wing Commander III movie demuxer
  avdemux_voc: libav Creative Voice demuxer
  avdemux_vmd: libav Sierra VMD demuxer
  avdemux_tta: libav TTA (True Audio) demuxer
  avdemux_psxstr: libav Sony Playstation STR demuxer
  avdemux_sol: libav Sierra SOL demuxer
  avdemux_smk: libav Smacker demuxer
  avdemux_film_cpk: libav Sega FILM / CPK demuxer
  avdemux_pva: libav TechnoTrend PVA demuxer
  avdemux_nuv: libav NuppelVideo demuxer
  avdemux_nut: libav NUT demuxer
  avdemux_nsv: libav Nullsoft Streaming Video demuxer
  avdemux_mxf: libav MXF (Material eXchange Format) demuxer
  avdemux_mpc8: libav Musepack SV8 demuxer
  avdemux_mpc: libav Musepack demuxer
  avdemux_mmf: libav Yamaha SMAF demuxer
  avdemux_mm: libav American Laser Games MM demuxer
  avdemux_ipmovie: libav Interplay MVE demuxer
  avdemux_idcin: libav id Cinematic demuxer
  avdemux_gxf: libav GXF (General eXchange Format) demuxer
  avdemux_gif: libav CompuServe Graphics Interchange Format (GIF) demuxer
  avdemux_4xm: libav 4X Technologies demuxer
  avdemux_ffm: libav FFM (FFserver live feed) demuxer
  avdemux_ea: libav Electronic Arts Multimedia demuxer
  avdemux_daud: libav D-Cinema audio demuxer
  avdemux_avs: libav AVS demuxer
  avdemux_ape: libav Monkey's Audio demuxer
  avdemux_aiff: libav Audio IFF demuxer

但是在build.log中它表示启用了以下解复用程序:

Enabled demuxers:
aa          fourxm          mpc8
aac         frm         mpegps
ac3         fsb         mpegts
acm         g722            mpegtsraw
act         g723_1          mpegvideo
adf         g729            mpjpeg
adp         genh            mpl2
ads         gif         mpsub
adx         gsm         msf
aea         gxf         msnwc_tcp
afc         h261            mtv
aiff            h263            mv
amr         h264            mvi
anm         hevc            mxf
apc         hls         mxg
ape         hnm         nc
apng            ico         nistsphere
aqtitle         idcin           nsv
asf         idf         nut
asf_o           iff         nuv
ass         ilbc            ogg
ast         image2          oma
au          image2_alias_pix    paf
avi         image2_brender_pix  pcm_alaw
avr         image2pipe      pcm_f32be
avs         image_bmp_pipe      pcm_f32le
bethsoftvid     image_dds_pipe      pcm_f64be
bfi         image_dpx_pipe      pcm_f64le
bfstm           image_exr_pipe      pcm_mulaw
bink            image_j2k_pipe      pcm_s16be
bintext         image_jpeg_pipe     pcm_s16le
bit         image_jpegls_pipe   pcm_s24be
bmv         image_pictor_pipe   pcm_s24le
boa         image_png_pipe      pcm_s32be
brstm           image_qdraw_pipe    pcm_s32le
c93         image_sgi_pipe      pcm_s8
caf         image_sunrast_pipe  pcm_u16be
cavsvideo       image_tiff_pipe     pcm_u16le
cdg         image_webp_pipe     pcm_u24be
cdxl            ingenient       pcm_u24le
cine            ipmovie         pcm_u32be
concat          ircam           pcm_u32le
data            iss         pcm_u8
daud            iv8         pjs
dcstr           ivf         pmp
dfa         ivr         pva
dirac           jacosub         pvf
dnxhd           jv          qcp
dsf         live_flv        r3d
dsicin          lmlm4           rawvideo
dss         loas            realtext
dts         lrc         redspark
dtshd           lvf         rl2
dv          lxf         rm
dvbsub          m4v         roq
dxa         matroska        rpl
ea          mgsts           rsd
ea_cdata        microdvd        rso
eac3            mjpeg           sami
epaf            mlp         sbg
ffm         mlv         sdr2
ffmetadata      mm          segafilm
filmstrip       mmf         shorten
flac            mov         siff
flic            mp3         sln
flv         mpc         smacker
smjpeg          tmv         w64
smush           truehd          wav
sol         tta         wc3
sox         tty         webm_dash_manifest
spdif           txd         webvtt
srt         v210            wsaud
stl         v210x           wsvqa
str         vag         wtv
subviewer       vc1         wv
subviewer1      vc1t            wve
sup         vivo            xa
svag            vmd         xbin
swf         vobsub          xmv
tak         voc         xvag
tedcaptions     vpk         xwma
thp         vplayer         yop
threedostr      vqf         yuv4mpegpipe
tiertexseq

2 个答案:

答案 0 :(得分:0)

启用日志后我发现了线索。从源代码来看,似乎有些解复用器被禁用了:

in file ext/libav/gstavdemux.c
    /* Set the rank of demuxers known to work to MARGINAL.
 * Set demuxers for which we already have another implementation to NONE
 * Set All others to NONE*/

执行以下代码修改后,所有解复用程序都已注册:

    if (1) {
/*if (!strcmp (in_plugin->name, "wsvqa") ||
    !strcmp (in_plugin->name, "wsaud") ||
    !strcmp (in_plugin->name, "wc3movie") ||
    !strcmp (in_plugin->name, "voc") ||
    !strcmp (in_plugin->name, "tta") ||
    !strcmp (in_plugin->name, "sol") ||
    !strcmp (in_plugin->name, "smk") ||
    !strcmp (in_plugin->name, "vmd") ||
    !strcmp (in_plugin->name, "film_cpk") ||
    !strcmp (in_plugin->name, "ingenient") ||
    !strcmp (in_plugin->name, "psxstr") ||
    !strcmp (in_plugin->name, "nuv") ||
    !strcmp (in_plugin->name, "nut") ||
    !strcmp (in_plugin->name, "nsv") ||
    !strcmp (in_plugin->name, "mxf") ||
    !strcmp (in_plugin->name, "mmf") ||
    !strcmp (in_plugin->name, "mm") ||
    !strcmp (in_plugin->name, "ipmovie") ||
    !strcmp (in_plugin->name, "ape") ||
    !strcmp (in_plugin->name, "RoQ") ||
    !strcmp (in_plugin->name, "idcin") ||
    !strcmp (in_plugin->name, "gxf") ||
    !strcmp (in_plugin->name, "ffm") ||
    !strcmp (in_plugin->name, "ea") ||
    !strcmp (in_plugin->name, "daud") ||
    !strcmp (in_plugin->name, "avs") ||
    !strcmp (in_plugin->name, "aiff") ||
    !strcmp (in_plugin->name, "4xm") ||
    !strcmp (in_plugin->name, "yuv4mpegpipe") ||
    !strcmp (in_plugin->name, "pva") ||
    !strcmp (in_plugin->name, "mpc") ||
    !strcmp (in_plugin->name, "mpc8") || !strcmp (in_plugin->name, "gif"))
*/
  rank = GST_RANK_MARGINAL;
}
else {
  GST_DEBUG ("ignoring %s", in_plugin->name);
  rank = GST_RANK_NONE;
  goto next;
}

现在我得到了所有的解复用器。稍后会验证它们。

答案 1 :(得分:0)

由于demuxers支持这些libav。有一种更好的方法可以启用某些demuxer插件。

可以使用以下命令配置Demuxer插件:

  --enable-muxer=NAME      enable muxer NAME
  # As you can see all muxers are disabled by default
  --disable-muxers         disable all muxers

您可以在libav来源下找到整个配置脚本:

alan@libav-11.7$ls
arch.mak         avprobe.c               COPYING.GPLv3     libavformat    README.md
avconv.c         Changelog               COPYING.LGPLv2.1  libavresample  RELEASE
avconv_dxva2.c   cmdutils.c              COPYING.LGPLv3    libavutil      tests
avconv_filter.c  cmdutils_common_opts.h  CREDITS           library.mak    tools
avconv.h         cmdutils.h              doc               libswscale     VERSION
avconv_opt.c     common.mak              INSTALL           LICENSE        version.sh
avconv_vda.c     compat                  libavcodec        Makefile
avconv_vdpau.c   configure               libavdevice       presets
avplay.c         COPYING.GPLv2           libavfilter       README

所以请使用

alan@libav-11.7$./configure --enable-demuxer=mux_name1 mux_name2