Commit d4eaa932 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

vpx: Integrate into the build system

parent 2a4e3d21
......@@ -897,6 +897,31 @@ AG_GST_CHECK_FEATURE(TAGLIB, [taglib tagging library], taglib, [
fi
])
dnl *** vpx ***
translit(dnm, m, l) AM_CONDITIONAL(USE_VPX, vpx)
AG_GST_CHECK_FEATURE(VPX, [VPX decoder], vpx, [
PKG_CHECK_MODULES(VPX, vpx >= 1.1.0, [HAVE_VPX="yes"], [HAVE_VPX="no"])
if test $HAVE_VPX = "yes"; then
OLD_LIBS="$LIBS"
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $VPX_CFLAGS"
LIBS="$LIBS $VPX_LIBS"
AC_CHECK_LIB(vpx, vpx_codec_vp8_cx_algo, [
HAVE_VP8=yes
AC_DEFINE(HAVE_VP8_ENCODER, 1, [Defined if the VP8 encoder is available])
])
AC_CHECK_LIB(vpx, vpx_codec_vp8_dx_algo, [
HAVE_VP8=yes
AC_DEFINE(HAVE_VP8_DECODER, 1, [Defined if the VP8 decoder is available])
])
LIBS="$OLD_LIBS"
CFLAGS="$OLD_CFLAGS"
fi
AC_SUBST(VPX_LIBS)
AC_SUBST(VPX_CFLAGS)
])
dnl *** wavpack ***
translit(dnm, m, l) AM_CONDITIONAL(USE_WAVPACK, true)
AG_GST_CHECK_FEATURE(WAVPACK, [wavpack plug-in], wavpack, [
......@@ -959,6 +984,7 @@ AM_CONDITIONAL(USE_SOUP, false)
AM_CONDITIONAL(USE_SPEEX, false)
AM_CONDITIONAL(USE_SUNAUDIO, false)
AM_CONDITIONAL(USE_TAGLIB, false)
AM_CONDITIONAL(USE_VPX, false)
AM_CONDITIONAL(USE_WAVEFORM, false)
AM_CONDITIONAL(USE_WAVPACK, false)
AM_CONDITIONAL(USE_X, false)
......@@ -1091,6 +1117,7 @@ ext/shout2/Makefile
ext/soup/Makefile
ext/speex/Makefile
ext/taglib/Makefile
ext/vpx/Makefile
ext/wavpack/Makefile
sys/Makefile
sys/directsound/Makefile
......
......@@ -79,6 +79,8 @@ EXTRA_HFILES = \
$(top_srcdir)/ext/pulse/pulsesrc.h \
$(top_srcdir)/ext/speex/gstspeexenc.h \
$(top_srcdir)/ext/speex/gstspeexdec.h \
$(top_srcdir)/ext/vpx/gstvp8dec.h \
$(top_srcdir)/ext/vpx/gstvp8enc.h \
$(top_srcdir)/ext/wavpack/gstwavpackdec.h \
$(top_srcdir)/ext/wavpack/gstwavpackenc.h \
$(top_srcdir)/gst/alpha/gstalpha.h \
......
......@@ -166,6 +166,8 @@
<xi:include href="xml/element-videoflip.xml" />
<xi:include href="xml/element-videomixer.xml" />
<xi:include href="xml/element-videomixer2.xml" />
<xi:include href="xml/element-vp8dec.xml" />
<xi:include href="xml/element-vp8enc.xml" />
<xi:include href="xml/element-warptv.xml" />
<xi:include href="xml/element-wavenc.xml" />
<xi:include href="xml/element-waveformsink.xml" />
......@@ -243,6 +245,7 @@
<xi:include href="xml/plugin-videocrop.xml" />
<xi:include href="xml/plugin-videofilter.xml" />
<xi:include href="xml/plugin-videomixer.xml" />
<xi:include href="xml/plugin-vpx.xml" />
<xi:include href="xml/plugin-waveform.xml" />
<xi:include href="xml/plugin-wavenc.xml" />
<xi:include href="xml/plugin-wavpack.xml" />
......
......@@ -2073,6 +2073,34 @@ GST_IS_V4L2RADIO_CLASS
gst_v4l2radio_get_type
</SECTION>
<SECTION>
<FILE>element-vp8dec</FILE>
<TITLE>vp8dec</TITLE>
GstVP8Dec
<SUBSECTION Standard>
GstVP8DecClass
GST_VP8_DEC
GST_VP8_DEC_CLASS
GST_IS_VP8_DEC
GST_IS_VP8_DEC_CLASS
GST_TYPE_VP8_DEC
gst_vp8_dec_get_type
</SECTION>
<SECTION>
<FILE>element-vp8enc</FILE>
<TITLE>vp8enc</TITLE>
GstVP8Enc
<SUBSECTION Standard>
GstVP8EncClass
GST_VP8_ENC
GST_VP8_ENC_CLASS
GST_IS_VP8_ENC
GST_IS_VP8_ENC_CLASS
GST_TYPE_VP8_ENC
gst_vp8_enc_get_type
</SECTION>
<SECTION>
<FILE>element-waveformsink</FILE>
<TITLE>waveformsink</TITLE>
......
......@@ -22728,3 +22728,483 @@
<DEFAULT>1</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::arnr-maxframes</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,15]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>AltRef max frames</NICK>
<BLURB>AltRef maximum number of frames.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::arnr-strength</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,6]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>AltRef strength</NICK>
<BLURB>AltRef strength.</BLURB>
<DEFAULT>3</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::arnr-type</NAME>
<TYPE>gint</TYPE>
<RANGE>[1,3]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>AltRef type</NICK>
<BLURB>AltRef type.</BLURB>
<DEFAULT>3</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::auto-alt-ref</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Auto alt reference frames</NICK>
<BLURB>Automatically generate alt reference frames.</BLURB>
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::buffer-initial-size</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Buffer initial size</NICK>
<BLURB>Initial client buffer size (ms).</BLURB>
<DEFAULT>4000</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::buffer-optimal-size</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Buffer optimal size</NICK>
<BLURB>Optimal client buffer size (ms).</BLURB>
<DEFAULT>5000</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::buffer-size</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Buffer size</NICK>
<BLURB>Client buffer size (ms).</BLURB>
<DEFAULT>6000</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::cpu-used</NAME>
<TYPE>gint</TYPE>
<RANGE>[-16,16]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>CPU used</NICK>
<BLURB>CPU used.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::cq-level</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,63]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Constrained quality level</NICK>
<BLURB>Constrained quality level.</BLURB>
<DEFAULT>10</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::deadline</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Deadline</NICK>
<BLURB>Deadline per frame (usec, 0=disabled).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::dropframe-threshold</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,100]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Drop Frame Threshold</NICK>
<BLURB>Temporal resampling threshold (buf %).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::end-usage</NAME>
<TYPE>GstVP8EncEndUsage</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Rate control mode</NICK>
<BLURB>Rate control mode.</BLURB>
<DEFAULT>Variable Bit Rate (VBR) mode</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::error-resilient</NAME>
<TYPE>GstVP8EncErFlags</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Error resilient</NICK>
<BLURB>Error resilience flags.</BLURB>
<DEFAULT></DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::h-scaling-mode</NAME>
<TYPE>GstVP8EncScalingMode</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Horizontal scaling mode</NICK>
<BLURB>Horizontal scaling mode.</BLURB>
<DEFAULT>Normal</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::kf-max-dist</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Keyframe max distance</NICK>
<BLURB>Maximum distance between keyframes (number of frames).</BLURB>
<DEFAULT>128</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::kf-mode</NAME>
<TYPE>GstVP8EncKfMode</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Keyframe Mode</NICK>
<BLURB>Keyframe placement.</BLURB>
<DEFAULT>Determine optimal placement automatically</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::lag-in-frames</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,25]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Lag in frames</NICK>
<BLURB>Maximum number of frames to lag.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::max-intra-bitrate-pct</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Max Intra bitrate</NICK>
<BLURB>Maximum Intra frame bitrate.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::max-quantizer</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,63]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Maximum Quantizer</NICK>
<BLURB>Maximum Quantizer (worst).</BLURB>
<DEFAULT>63</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::min-quantizer</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,63]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Minimum Quantizer</NICK>
<BLURB>Minimum Quantizer (best).</BLURB>
<DEFAULT>4</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::multipass-cache-file</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Multipass Cache File</NICK>
<BLURB>Multipass cache file.</BLURB>
<DEFAULT>"multipass.cache"</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::multipass-mode</NAME>
<TYPE>GstVP8EncMultipassMode</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Multipass Mode</NICK>
<BLURB>Multipass encode mode.</BLURB>
<DEFAULT>One pass encoding (default)</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::noise-sensitivity</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,6]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Noise sensitivity</NICK>
<BLURB>Noise sensisivity (frames to blur).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::overshoot-pct</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,1000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Overshoot PCT</NICK>
<BLURB>Datarate overshoot (max) target (%).</BLURB>
<DEFAULT>100</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::resize-allowed</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Resize Allowed</NICK>
<BLURB>Allow spatial resampling.</BLURB>
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::resize-down-threshold</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,100]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Resize Down Threshold</NICK>
<BLURB>Downscale threshold (buf %).</BLURB>
<DEFAULT>60</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::resize-up-threshold</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,100]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Resize Up Threshold</NICK>
<BLURB>Upscale threshold (buf %).</BLURB>
<DEFAULT>30</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::sharpness</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,7]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Sharpness</NICK>
<BLURB>Filter sharpness.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::static-threshold</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Static Threshold</NICK>
<BLURB>Motion detection threshold.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::target-bitrate</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Target bitrate</NICK>
<BLURB>Target bitrate (in bits/sec).</BLURB>
<DEFAULT>256000</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::threads</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,64]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Threads</NICK>
<BLURB>Number of threads to use.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::token-partitions</NAME>
<TYPE>GstVP8EncTokenPartitions</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Token partitions</NICK>
<BLURB>Number of token partitions.</BLURB>
<DEFAULT>One token partition</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::ts-layer-id</NAME>
<TYPE>GValueArray*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Coding layer identification</NICK>
<BLURB>Sequence defining coding layer membership.</BLURB>
<DEFAULT></DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::ts-number-layers</NAME>
<TYPE>gint</TYPE>
<RANGE>[1,5]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Number of coding layers</NICK>
<BLURB>Number of coding layers to use.</BLURB>
<DEFAULT>1</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::ts-periodicity</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,16]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Layer periodicity</NICK>
<BLURB>Length of sequence that defines layer membership periodicity.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::ts-rate-decimator</NAME>
<TYPE>GValueArray*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Coding layer rate decimator</NICK>
<BLURB>Rate decimation factors for each layer.</BLURB>
<DEFAULT></DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::ts-target-bitrate</NAME>
<TYPE>GValueArray*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Coding layer target bitrates</NICK>
<BLURB>Target bitrates for coding layers (one per layer, decreasing).</BLURB>
<DEFAULT></DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::tuning</NAME>
<TYPE>GstVP8EncTuning</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Tuning</NICK>
<BLURB>Tuning.</BLURB>
<DEFAULT>Tune for PSNR</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::twopass-vbr-bias-pct</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,100]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>2-pass VBR bias</NICK>
<BLURB>CBR/VBR bias (0=CBR, 100=VBR).</BLURB>
<DEFAULT>50</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::twopass-vbr-maxsection-pct</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>2-pass GOP max bitrate</NICK>
<BLURB>GOP maximum bitrate (% target).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::twopass-vbr-minsection-pct</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>2-pass GOP min bitrate</NICK>
<BLURB>GOP minimum bitrate (% target).</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::undershoot-pct</NAME>
<TYPE>gint</TYPE>
<RANGE>[0,1000]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Undershoot PCT</NICK>
<BLURB>Datarate undershoot (min) target (%).</BLURB>
<DEFAULT>100</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Enc::v-scaling-mode</NAME>
<TYPE>GstVP8EncScalingMode</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Vertical scaling mode</NICK>
<BLURB>Vertical scaling mode.</BLURB>
<DEFAULT>Normal</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Dec::deblocking-level</NAME>
<TYPE>guint</TYPE>
<RANGE><= 16</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Deblocking Level</NICK>
<BLURB>Deblocking level.</BLURB>
<DEFAULT>4</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Dec::noise-level</NAME>
<TYPE>guint</TYPE>
<RANGE><= 16</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Noise Level</NICK>
<BLURB>Noise level.</BLURB>
<DEFAULT>0</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Dec::post-processing</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Post Processing</NICK>
<BLURB>Enable post processing.</BLURB>
<DEFAULT>FALSE</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Dec::post-processing-flags</NAME>
<TYPE>GstVP8DecPostProcessingFlags</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Post Processing Flags</NICK>
<BLURB>Flags to control post processing.</BLURB>
<DEFAULT>Deblock|Demacroblock|Multi-frame quality enhancement</DEFAULT>
</ARG>
<ARG>
<NAME>GstVP8Dec::threads</NAME>
<TYPE>guint</TYPE>
<RANGE>[1,16]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Max Threads</NICK>
<BLURB>Maximum number of decoding threads.</BLURB>
<DEFAULT>1</DEFAULT>
</ARG>
......@@ -256,9 +256,11 @@ GObject
GstVideoDecoder
GstJpegDec
GstPngDec