Merge branch 'master' into 0.11

Conflicts:
	gst/avi/gstavidemux.c
	gst/rtp/gstrtpac3depay.c
	gst/rtp/gstrtpg726depay.c
	gst/rtp/gstrtpmpvdepay.c
	gst/videofilter/gstgamma.c
This commit is contained in:
Wim Taymans 2011-05-24 17:34:19 +02:00
commit d89790d545
43 changed files with 2766 additions and 2016 deletions

2
common

@ -1 +1 @@
Subproject commit 46dfcea233cf6df83e3771d8a8066e87d614f893
Subproject commit 69b981f10caa234ad0ff639179d0fda8505bd94b

View file

@ -813,15 +813,6 @@ dnl *** libcaca ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBCACA, true)
AG_GST_CHECK_FEATURE(LIBCACA, [libcaca coloured ASCII art], cacasink, [
AG_GST_PKG_CHECK_MODULES(LIBCACA, caca)
dnl only newer versions of libcaca ship caca.pc, so try caca-config as well
if test "x$HAVE_LIBCACA" != "xyes"; then
AG_GST_CHECK_CONFIGPROG(LIBCACA, caca-config)
dnl see if it compilation works too, might not if we are cross-compiling
if test "x$HAVE_LIBCACA" = "xyes"; then
AC_CHECK_LIB([caca], [caca_init], [HAVE_LIBCACA=yes],
[HAVE_LIBCACA=no], [$LIBCACA_LIBS])
fi
fi
])
dnl *** libdv ***

View file

@ -461,7 +461,7 @@
<ARG>
<NAME>GstUDPSrc::sockfd</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Socket Handle</NICK>
<BLURB>Socket to use for UDP reception. (-1 == allocate).</BLURB>
@ -511,7 +511,7 @@
<ARG>
<NAME>GstUDPSrc::sock</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>Socket Handle</NICK>
<BLURB>Socket currently in use for UDP reception. (-1 = no socket).</BLURB>
@ -1651,7 +1651,7 @@
<ARG>
<NAME>GstDV1394Src::port</NAME>
<TYPE>gint</TYPE>
<RANGE>[G_MAXULONG,16]</RANGE>
<RANGE>[-1,16]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Port</NICK>
<BLURB>Port number (-1 automatic).</BLURB>
@ -1901,7 +1901,7 @@
<ARG>
<NAME>GstTest::allowed-timestamp-deviation</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rwx</FLAGS>
<NICK>allowed timestamp deviation</NICK>
<BLURB>allowed average difference in usec between timestamp of next buffer and expected timestamp from analyzing last buffer.</BLURB>
@ -1911,7 +1911,7 @@
<ARG>
<NAME>GstTest::buffer-count</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>buffer count</NICK>
<BLURB>number of buffers in stream.</BLURB>
@ -1921,7 +1921,7 @@
<ARG>
<NAME>GstTest::expected-buffer-count</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rwx</FLAGS>
<NICK>expected buffer count</NICK>
<BLURB>expected number of buffers in stream.</BLURB>
@ -1931,7 +1931,7 @@
<ARG>
<NAME>GstTest::expected-length</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rwx</FLAGS>
<NICK>expected length</NICK>
<BLURB>expected length of stream.</BLURB>
@ -1951,7 +1951,7 @@
<ARG>
<NAME>GstTest::length</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>length</NICK>
<BLURB>length of stream.</BLURB>
@ -1971,7 +1971,7 @@
<ARG>
<NAME>GstTest::timestamp-deviation</NAME>
<TYPE>gint64</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>timestamp deviation</NICK>
<BLURB>average difference in usec between timestamp of next buffer and expected timestamp from analyzing last buffer.</BLURB>
@ -2051,7 +2051,7 @@
<ARG>
<NAME>GstBreakMyData::set-to</NAME>
<TYPE>gint</TYPE>
<RANGE>[G_MAXULONG,255]</RANGE>
<RANGE>[-1,255]</RANGE>
<FLAGS>rwx</FLAGS>
<NICK>set-to</NICK>
<BLURB>set changed bytes to this value (-1 means random value.</BLURB>
@ -2391,7 +2391,7 @@
<ARG>
<NAME>GstDynUDPSink::sockfd</NAME>
<TYPE>gint</TYPE>
<RANGE>[G_MAXULONG,32767]</RANGE>
<RANGE>[-1,32767]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>socket handle</NICK>
<BLURB>Socket to use for UDP sending. (-1 == allocate).</BLURB>
@ -2461,7 +2461,7 @@
<ARG>
<NAME>GstMultiUDPSink::sock</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>Socket Handle</NICK>
<BLURB>Socket currently in use for UDP sending. (-1 == no socket).</BLURB>
@ -2471,7 +2471,7 @@
<ARG>
<NAME>GstMultiUDPSink::sockfd</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Socket Handle</NICK>
<BLURB>Socket to use for UDP sending. (-1 == allocate).</BLURB>
@ -2501,7 +2501,7 @@
<ARG>
<NAME>GstMultiUDPSink::qos-dscp</NAME>
<TYPE>gint</TYPE>
<RANGE>[G_MAXULONG,63]</RANGE>
<RANGE>[-1,63]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>QoS diff srv code point</NICK>
<BLURB>Quality of Service, differentiated services code point (-1 default).</BLURB>
@ -2651,7 +2651,7 @@
<ARG>
<NAME>GstXImageSrc::screen-num</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Screen number</NICK>
<BLURB>X Screen Number.</BLURB>
@ -2671,7 +2671,7 @@
<ARG>
<NAME>GstXImageSrc::endx</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>End X</NICK>
<BLURB>X coordinate of bottom right corner of area to be recorded (0 for bottom right of screen).</BLURB>
@ -2681,7 +2681,7 @@
<ARG>
<NAME>GstXImageSrc::endy</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>End Y</NICK>
<BLURB>Y coordinate of bottom right corner of area to be recorded (0 for bottom right of screen).</BLURB>
@ -2691,7 +2691,7 @@
<ARG>
<NAME>GstXImageSrc::startx</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Start X co-ordinate</NICK>
<BLURB>X coordinate of top left corner of area to be recorded (0 for top left of screen).</BLURB>
@ -2701,7 +2701,7 @@
<ARG>
<NAME>GstXImageSrc::starty</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Start Y co-ordinate</NICK>
<BLURB>Y coordinate of top left corner of area to be recorded (0 for top left of screen).</BLURB>
@ -2811,7 +2811,7 @@
<ARG>
<NAME>GstJpegDec::max-errors</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Maximum Consecutive Decoding Errors</NICK>
<BLURB>Error out after receiving N consecutive decoding errors (-1 = never fail, 0 = automatic, 1 = fail on first error).</BLURB>
@ -3121,7 +3121,7 @@
<ARG>
<NAME>GstV4l2Src::device-fd</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>File descriptor</NICK>
<BLURB>File descriptor of the device.</BLURB>
@ -3391,7 +3391,7 @@
<ARG>
<NAME>GstRndBufferSize::max</NAME>
<TYPE>glong</TYPE>
<RANGE>[1,G_MAXINT]</RANGE>
<RANGE>>= 1</RANGE>
<FLAGS>rwx</FLAGS>
<NICK>maximum</NICK>
<BLURB>maximum buffer size.</BLURB>
@ -3401,7 +3401,7 @@
<ARG>
<NAME>GstRndBufferSize::min</NAME>
<TYPE>glong</TYPE>
<RANGE>[0,G_MAXINT]</RANGE>
<RANGE>>= 0</RANGE>
<FLAGS>rwx</FLAGS>
<NICK>mininum</NICK>
<BLURB>mininum buffer size.</BLURB>
@ -3411,7 +3411,7 @@
<ARG>
<NAME>GstRndBufferSize::seed</NAME>
<TYPE>gulong</TYPE>
<RANGE><= G_MAXUINT</RANGE>
<RANGE></RANGE>
<FLAGS>rwx</FLAGS>
<NICK>random number seed</NICK>
<BLURB>seed for randomness (initialized when going from READY to PAUSED).</BLURB>
@ -20111,7 +20111,7 @@
<ARG>
<NAME>GstHDV1394Src::port</NAME>
<TYPE>gint</TYPE>
<RANGE>[G_MAXULONG,16]</RANGE>
<RANGE>[-1,16]</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Port</NICK>
<BLURB>Port number (-1 automatic).</BLURB>
@ -20398,6 +20398,36 @@
<DEFAULT>Auto detection</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::drop-orphans</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>drop-orphans</NICK>
<BLURB>Drop orphan fields at the beginning of telecine patterns in active locking mode.</BLURB>
<DEFAULT>TRUE</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::ignore-obscure</NAME>
<TYPE>gboolean</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>ignore-obscure</NICK>
<BLURB>Ignore obscure telecine patterns (only consider P, I and 2:3 variants).</BLURB>
<DEFAULT>TRUE</DEFAULT>
</ARG>
<ARG>
<NAME>GstDeinterlace::locking</NAME>
<TYPE>GstDeinterlaceLocking</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>locking</NICK>
<BLURB>Pattern locking mode.</BLURB>
<DEFAULT>No pattern locking</DEFAULT>
</ARG>
<ARG>
<NAME>GstAgingTV::color-aging</NAME>
<TYPE>gboolean</TYPE>
@ -20461,7 +20491,7 @@
<ARG>
<NAME>GstOpTV::threshold</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Threshold</NICK>
<BLURB>Luma threshold.</BLURB>
@ -20481,7 +20511,7 @@
<ARG>
<NAME>GstRadioacTV::interval</NAME>
<TYPE>guint</TYPE>
<RANGE><= G_MAXINT</RANGE>
<RANGE><= G_MAXLONG</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Interval</NICK>
<BLURB>Snapshot interval (in strobe mode).</BLURB>
@ -20751,7 +20781,7 @@
<ARG>
<NAME>GstRtpSession::rtcp-rr-bandwidth</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rw</FLAGS>
<NICK>RTCP RR bandwidth</NICK>
<BLURB>The RTCP bandwidth used for receivers in bytes per second (-1 = default).</BLURB>
@ -20761,7 +20791,7 @@
<ARG>
<NAME>GstRtpSession::rtcp-rs-bandwidth</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>rw</FLAGS>
<NICK>RTCP RS bandwidth</NICK>
<BLURB>The RTCP bandwidth used for senders in bytes per second (-1 = default).</BLURB>
@ -20801,7 +20831,7 @@
<ARG>
<NAME>GstV4l2Sink::device-fd</NAME>
<TYPE>gint</TYPE>
<RANGE>>= G_MAXULONG</RANGE>
<RANGE>>= -1</RANGE>
<FLAGS>r</FLAGS>
<NICK>File descriptor</NICK>
<BLURB>File descriptor of the device.</BLURB>

View file

@ -1,315 +1,319 @@
GObject
GdkPixbuf
GstCmmlTagClip
GstCmmlTagHead
GstCmmlTagStream
GstColorBalanceChannel
GstObject
GstPad
GstVideoMixer2Pad
GstVideoMixerPad
GstInterleavePad
GstPadTemplate
GstPluginFeature
GstElementFactory
GstTypeFindFactory
GstIndexFactory
GstBus
GstClock
GstSystemClock
GstAudioClock
GstElement
GstBin
GstPipeline
GstQTMoovRecover
GstSwitchSink
GstGConfVideoSink
GstGConfAudioSink
GstSwitchSrc
GstGConfVideoSrc
GstGConfAudioSrc
GstHalAudioSink
GstHalAudioSrc
GstRtpBin
GstAutoVideoSink
GstAutoVideoSrc
GstAutoAudioSink
GstAutoAudioSrc
GstPushFileSrc
GstRTSPSrc
GstRgVolume
GstAspectRatioCrop
GstCmmlEnc
GstCmmlDec
GstBaseSink
GstAASink
GstBaseAudioSink
GstPulseSink
GstJackAudioSink
GstAudioSink
GstEsdSink
GstOssSink
GstOss4Sink
GstCACASink
GstVideoSink
GstGdkPixbufSink
GstShout2send
GstTest
GstMultiFileSink
GstMultiUDPSink
GstUDPSink
GstDynUDPSink
GstBaseSrc
GstPushSrc
GstDV1394Src
GstHDV1394Src
GstSoupHTTPSrc
GstBaseAudioSrc
GstAudioSrc
GstPulseSrc
GstOssSrc
GstOss4Source
GstJackAudioSrc
GstV4l2Src
GstXImageSrc
GstMultiFileSrc
GstUDPSrc
GstWavpackParse
GstWavpackDec
GstWavpackEnc
GstDVDemux
GstDVDec
GstTagLibMux
GstId3v2Mux
GstApev2Mux
GstFlacEnc
GstFlacDec
GstFlacTag
GstCairoTextOverlay
GstBaseTransform
GstCairoTimeOverlay
GstVideoFilter
GstCairoOverlay
GstEdgeTV
GstAgingTV
GstDiceTV
GstWarpTV
GstShagadelicTV
GstVertigoTV
GstRevTV
GstQuarkTV
GstOpTV
GstRadioacTV
GstStreakTV
GstRippleTV
GstNavigationtest
GstGamma
GstVideoBalance
GstVideoFlip
GstSMPTEAlpha
GstAlpha
GstAlphaColor
GstPixbufScale
GstVideoBox
GstBreakMyData
GstCapsSetter
GstNavSeek
GstProgressReport
GstTagInject
GstCpuReport
GstLevel
GstAudioFilter
GstIirEqualizer
GstIirEqualizerNBands
GstIirEqualizer3Bands
GstIirEqualizer10Bands
GstSpectrum
GstAudioInvert
GstAudioKaraoke
GstAudioAmplify
GstAudioDynamic
GstAudioFXBaseIIRFilter
GstAudioChebLimit
GstAudioChebBand
GstAudioIIRFilter
GstAudioFXBaseFIRFilter
GstAudioWSincLimit
GstAudioWSincBand
GstAudioFIRFilter
GstAudioEcho
GstRgAnalysis
GstRgLimiter
GstVideoCrop
GstAudioPanorama
GstCairoRender
GstPulseMixer
GstSpeexEnc
GstSpeexDec
GstJpegEnc
GstJpegDec
GstSmokeEnc
GstSmokeDec
GstPngDec
GstPngEnc
GstGdkPixbuf
GstOssMixerElement
GstV4l2Radio
GstOss4Mixer
GstShapeWipe
Gst3GPPMux
GstALawDec
GstALawEnc
GstAsteriskh263
GstAuParse
GstAviDemux
GstAviMux
GstAviSubtitle
GstRTPDepay
GstBaseParse
GstAacParse
GstAc3Parse
GstAmrParse
GstDcaParse
GstFlacParse
GstMpegAudioParse
GstBaseRTPDepayload
GstRtpAC3Depay
GstRTPBVDepay
GstRtpCELTDepay
GstRTPDVDepay
GstRtpGSTDepay
GstRTPGSMDepay
GstRTPSirenDepay
GstRTPiLBCDepay
GstRtpAC3Depay
GstRtpAMRDepay
GstRtpCELTDepay
GstRtpG722Depay
GstRtpG723Depay
GstRtpG726Depay
GstRtpG729Depay
GstRTPGSMDepay
GstRtpAMRDepay
GstRtpPcmaDepay
GstRtpPcmuDepay
GstRtpMPADepay
GstRtpMPARobustDepay
GstRtpMPVDepay
GstRtpH263PDepay
GstRtpGSTDepay
GstRtpH263Depay
GstRtpH263PDepay
GstRtpH264Depay
GstRtpJ2KDepay
GstRtpJPEGDepay
GstRtpL16Depay
GstRtpMP1SDepay
GstRtpMP2TDepay
GstRtpMP4VDepay
GstRtpMP4ADepay
GstRtpMP4GDepay
GstRtpMP4VDepay
GstRtpMPADepay
GstRtpMPARobustDepay
GstRtpMPVDepay
GstRtpPcmaDepay
GstRtpPcmuDepay
GstRtpQCELPDepay
GstRtpQDM2Depay
GstRTPSirenDepay
GstRtpSPEEXDepay
GstRtpSV3VDepay
GstRtpTheoraDepay
GstRtpVorbisDepay
GstRtpVRawDepay
GstRtpVorbisDepay
GstRtpXQTDepay
GstBaseRTPPayload
GstRtpAC3Pay
GstBaseRTPAudioPayload
GstRTPBVPay
GstRTPILBCPay
GstRTPSirenPay
GstRtpG722Pay
GstRtpG726Pay
GstRtpPcmuPay
GstRtpPcmaPay
GstRtpL16Pay
GstRTPSirenPay
GstRtpCELTPay
GstRtpPcmaPay
GstRtpPcmuPay
GstRTPDVPay
GstRtpGSTPay
GstRTPG723Pay
GstRTPG729Pay
GstRTPGSMPay
GstRtpAMRPay
GstRtpMPAPay
GstRTPMP2TPay
GstRTPMPVPay
GstRtpAC3Pay
GstRtpAMRPay
GstRtpCELTPay
GstRtpGSTPay
GstRtpH263PPay
GstRtpH263Pay
GstRtpH264Pay
GstRtpJ2KPay
GstRtpJPEGPay
GstRTPMP2TPay
GstRtpMP4VPay
GstRtpMP4APay
GstRtpMP4GPay
GstRtpMP4VPay
GstRtpMPAPay
GstRtpSPEEXPay
GstRtpTheoraPay
GstRtpVorbisPay
GstRtpVRawPay
GstAsteriskh263
GstRtpVorbisPay
GstBaseSink
GstAASink
GstBaseAudioSink
GstAudioSink
GstEsdSink
GstOss4Sink
GstOssSink
GstJackAudioSink
GstPulseSink
GstCACASink
GstDynUDPSink
GstMultiFileSink
GstMultiUDPSink
GstUDPSink
GstShout2send
GstTest
GstVideoSink
GstGdkPixbufSink
GstV4l2Sink
GstBaseSrc
GstPushSrc
GstBaseAudioSrc
GstAudioSrc
GstOss4Source
GstOssSrc
GstPulseSrc
GstJackAudioSrc
GstDV1394Src
GstHDV1394Src
GstMultiFileSrc
GstSoupHTTPSrc
GstUDPSrc
GstV4l2Src
GstXImageSrc
GstBaseTransform
GstAudioFilter
GstAudioAmplify
GstAudioDynamic
GstAudioEcho
GstAudioFXBaseFIRFilter
GstAudioFIRFilter
GstAudioWSincBand
GstAudioWSincLimit
GstAudioFXBaseIIRFilter
GstAudioChebBand
GstAudioChebLimit
GstAudioIIRFilter
GstAudioInvert
GstAudioKaraoke
GstIirEqualizer
GstIirEqualizer10Bands
GstIirEqualizer3Bands
GstIirEqualizerNBands
GstSpectrum
GstAudioPanorama
GstBreakMyData
GstCairoTimeOverlay
GstCapsSetter
GstCpuReport
GstLevel
GstNavSeek
GstPixbufScale
GstProgressReport
GstRgAnalysis
GstRgLimiter
GstTagInject
GstVideoBox
GstVideoCrop
GstVideoFilter
GstAgingTV
GstAlpha
GstAlphaColor
GstCairoOverlay
GstDiceTV
GstEdgeTV
GstGamma
GstNavigationtest
GstOpTV
GstQuarkTV
GstRadioacTV
GstRevTV
GstRippleTV
GstSMPTEAlpha
GstShagadelicTV
GstStreakTV
GstVertigoTV
GstVideoBalance
GstVideoFlip
GstWarpTV
GstBin
GstAspectRatioCrop
GstAutoAudioSink
GstAutoAudioSrc
GstAutoVideoSink
GstAutoVideoSrc
GstHalAudioSink
GstHalAudioSrc
GstPipeline
GstQTMoovRecover
GstPushFileSrc
GstRTSPSrc
GstRgVolume
GstRtpBin
GstSwitchSink
GstGConfAudioSink
GstGConfVideoSink
GstSwitchSrc
GstGConfAudioSrc
GstGConfVideoSrc
GstCairoRender
GstCairoTextOverlay
GstCapsDebug
GstCmmlDec
GstCmmlEnc
GstCutter
GstDVDec
GstDVDemux
GstDeinterlace
GstDeinterleave
GstEFence
GstFlacDec
GstFlacEnc
GstFlacTag
GstFlvDemux
GstFlvMux
GstFlxDec
GstGPPMux
GstGdkPixbuf
GstGoom
GstGoom2k1
GstWavEnc
GstICYDemux
GstISMLMux
GstImageFreeze
GstInterleave
GstJpegDec
GstJpegEnc
GstMJ2Mux
GstMP4Mux
GstMatroskaDemux
GstMatroskaMux
GstWebMMux
GstMatroskaParse
GstMonoscope
GstMuLawDec
GstMuLawEnc
GstMultipartDemux
GstMultipartMux
GstOss4Mixer
GstOssMixerElement
GstPngDec
GstPngEnc
GstPulseMixer
GstQTDemux
GstQTMux
GstRTPDec
GstRTPDepay
GstRndBufferSize
GstRtpJitterBuffer
GstRtpPtDemux
GstRtpSession
GstRtpSsrcDemux
GstRndBufferSize
GstCapsDebug
GstEFence
GstCutter
GstMatroskaDemux
GstMatroskaParse
GstMatroskaMux
GstWebMMux
GstRTPDec
GstSMPTE
GstAuParse
GstMultipartDemux
GstMultipartMux
GstALawEnc
GstALawDec
GstMuLawEnc
GstMuLawDec
GstShapeWipe
GstSmokeDec
GstSmokeEnc
GstSpeexDec
GstSpeexEnc
GstTagDemux
GstApeDemux
GstID3Demux
GstFlxDec
GstDeinterlace
GstImageFreeze
GstBaseParse
GstAacParse
GstAmrParse
GstAc3Parse
GstDcaParse
GstFlacParse
GstMpegAudioParse
GstY4mEncode
GstInterleave
GstDeinterleave
GstWavParse
GstFlvDemux
GstFlvMux
GstQTDemux
GstQTMux
GstMP4Mux
GstISMLMux
Gst3GPPMux
GstGPPMux
GstMJ2Mux
GstICYDemux
GstTagLibMux
GstApev2Mux
GstId3v2Mux
GstV4l2Radio
GstVideoMixer
GstVideoMixer2
GstBus
GstTask
GstTaskPool
GstClock
GstSystemClock
GstAudioClock
GstWavEnc
GstWavParse
GstWavpackDec
GstWavpackEnc
GstWavpackParse
GstY4mEncode
GstPad
GstInterleavePad
GstVideoMixer2Pad
GstVideoMixerPad
GstPadTemplate
GstPlugin
GstPluginFeature
GstElementFactory
GstIndexFactory
GstTypeFindFactory
GstRegistry
GstRingBuffer
GstAudioSrcRingBuffer
GstAudioSinkRingBuffer
GstJackAudioSrcRingBuffer
GstAudioSrcRingBuffer
GstJackAudioSinkRingBuffer
GstJackAudioSrcRingBuffer
GstTask
GstTaskPool
GstSignalObject
GstCmmlTagStream
GstCmmlTagHead
GstCmmlTagClip
GstColorBalanceChannel
RTPSession
GstTunerNorm
GstTunerChannel
GdkPixbuf
GstTunerNorm
RTPSession
GInterface
GIcon
GTypePlugin
GstChildProxy
GstURIHandler
GstPropertyProbe
GstPreset
GstTagSetter
GstStreamVolume
GstColorBalance
GstImplementsInterface
GstMixer
GstTuner
GstColorBalance
GstVideoOrientation
GstNavigation
GstPreset
GstPropertyProbe
GstStreamVolume
GstTagSetter
GstTagXmpWriter
GIcon
GstTuner
GstURIHandler
GstVideoOrientation
GstXOverlay

View file

@ -1,62 +1,63 @@
GstBin GstChildProxy
GstPipeline GstChildProxy
GstQTMoovRecover GstChildProxy
GstSwitchSink GstChildProxy
GstGConfVideoSink GstChildProxy
GstGConfAudioSink GstChildProxy
GstSwitchSrc GstChildProxy
GstGConfVideoSrc GstChildProxy
GstGConfAudioSrc GstChildProxy
GstHalAudioSink GstChildProxy
GstHalAudioSrc GstChildProxy
GstRtpBin GstChildProxy
GstAutoVideoSink GstChildProxy
GstAutoVideoSrc GstChildProxy
GdkPixbuf GIcon
Gst3GPPMux GstTagSetter GstTagXmpWriter
GstApev2Mux GstTagSetter
GstAspectRatioCrop GstChildProxy
GstAutoAudioSink GstChildProxy
GstAutoAudioSrc GstChildProxy
GstPushFileSrc GstChildProxy GstURIHandler
GstRTSPSrc GstChildProxy GstURIHandler
GstRgVolume GstChildProxy
GstAspectRatioCrop GstChildProxy
GstPulseSink GstStreamVolume GstImplementsInterface GstPropertyProbe
GstOss4Sink GstStreamVolume GstPropertyProbe
GstShout2send GstTagSetter
GstUDPSink GstURIHandler
GstAutoVideoSink GstChildProxy
GstAutoVideoSrc GstChildProxy
GstAviMux GstTagSetter
GstBin GstChildProxy
GstDV1394Src GstURIHandler GstPropertyProbe
GstHDV1394Src GstURIHandler GstPropertyProbe
GstSoupHTTPSrc GstURIHandler
GstPulseSrc GstImplementsInterface GstMixer GstPropertyProbe
GstOssSrc GstImplementsInterface GstMixer
GstOss4Source GstImplementsInterface GstMixer GstPropertyProbe
GstV4l2Src GstURIHandler GstImplementsInterface GstTuner GstColorBalance GstVideoOrientation GstPropertyProbe
GstUDPSrc GstURIHandler
GstWavpackEnc GstPreset
GstTagLibMux GstTagSetter
GstId3v2Mux GstTagSetter
GstApev2Mux GstTagSetter
GstDeinterlace GstChildProxy
GstFlacEnc GstTagSetter GstPreset
GstFlacTag GstTagSetter
GstVideoBalance GstImplementsInterface GstColorBalance
GstIirEqualizer GstChildProxy
GstIirEqualizerNBands GstChildProxy
GstIirEqualizer3Bands GstChildProxy GstPreset
GstIirEqualizer10Bands GstChildProxy GstPreset
GstPulseMixer GstImplementsInterface GstMixer GstPropertyProbe
GstSpeexEnc GstTagSetter GstPreset
GstOssMixerElement GstImplementsInterface GstMixer
GstV4l2Radio GstURIHandler GstImplementsInterface GstTuner GstPropertyProbe
GstOss4Mixer GstImplementsInterface GstMixer GstPropertyProbe
GstAviMux GstTagSetter
GstMatroskaMux GstTagSetter
GstWebMMux GstTagSetter
GstDeinterlace GstChildProxy
GstFlvMux GstTagSetter
GstQTMux GstTagSetter GstTagXmpWriter
GstMP4Mux GstTagSetter GstTagXmpWriter
GstISMLMux GstTagSetter GstTagXmpWriter
Gst3GPPMux GstTagSetter GstTagXmpWriter
GstGConfAudioSink GstChildProxy
GstGConfAudioSrc GstChildProxy
GstGConfVideoSink GstChildProxy
GstGConfVideoSrc GstChildProxy
GstGPPMux GstTagSetter GstTagXmpWriter
GstHDV1394Src GstURIHandler GstPropertyProbe
GstHalAudioSink GstChildProxy
GstHalAudioSrc GstChildProxy
GstISMLMux GstTagSetter GstTagXmpWriter
GstId3v2Mux GstTagSetter
GstIirEqualizer GstChildProxy
GstIirEqualizer10Bands GstChildProxy GstPreset
GstIirEqualizer3Bands GstChildProxy GstPreset
GstIirEqualizerNBands GstChildProxy
GstMJ2Mux GstTagSetter GstTagXmpWriter
GstMP4Mux GstTagSetter GstTagXmpWriter
GstMatroskaMux GstTagSetter
GstOss4Mixer GstImplementsInterface GstMixer GstPropertyProbe
GstOss4Sink GstStreamVolume GstPropertyProbe
GstOss4Source GstImplementsInterface GstMixer GstPropertyProbe
GstOssMixerElement GstImplementsInterface GstMixer
GstOssSrc GstImplementsInterface GstMixer
GstPipeline GstChildProxy
GstPulseMixer GstImplementsInterface GstMixer GstPropertyProbe
GstPulseSink GstStreamVolume GstImplementsInterface GstPropertyProbe
GstPulseSrc GstImplementsInterface GstMixer GstPropertyProbe
GstPushFileSrc GstChildProxy GstURIHandler
GstQTMoovRecover GstChildProxy
GstQTMux GstTagSetter GstTagXmpWriter
GstRTSPSrc GstChildProxy GstURIHandler
GstRgVolume GstChildProxy
GstRtpBin GstChildProxy
GstShout2send GstTagSetter
GstSoupHTTPSrc GstURIHandler
GstSpeexEnc GstTagSetter GstPreset
GstSwitchSink GstChildProxy
GstSwitchSrc GstChildProxy
GstTagLibMux GstTagSetter
GstUDPSink GstURIHandler
GstUDPSrc GstURIHandler
GstV4l2Radio GstURIHandler GstImplementsInterface GstTuner GstPropertyProbe
GstV4l2Sink GstImplementsInterface GstXOverlay GstNavigation GstColorBalance GstVideoOrientation GstPropertyProbe
GstV4l2Src GstURIHandler GstImplementsInterface GstTuner GstColorBalance GstVideoOrientation GstPropertyProbe
GstVideoBalance GstImplementsInterface GstColorBalance
GstVideoMixer GstChildProxy
GstVideoMixer2 GstChildProxy
GdkPixbuf GIcon
GstWavpackEnc GstPreset
GstWebMMux GstTagSetter

View file

@ -1,10 +1,11 @@
GIcon GObject
GstChildProxy GstObject
GstTagSetter GstElement
GstStreamVolume GObject
GstColorBalance GstImplementsInterface GstElement
GstImplementsInterface GstElement
GstMixer GstImplementsInterface GstElement
GstTuner GstImplementsInterface GstElement
GstColorBalance GstImplementsInterface GstElement
GstVideoOrientation GstImplementsInterface GstElement
GstStreamVolume GObject
GstTagSetter GstElement
GstTagXmpWriter GstElement
GIcon GObject
GstTuner GstImplementsInterface GstElement
GstVideoOrientation GstImplementsInterface GstElement
GstXOverlay GstImplementsInterface GstElement

View file

@ -1732,8 +1732,9 @@ gst_flac_dec_src_query (GstPad * pad, GstQuery * query)
gst_query_parse_duration (query, &fmt, NULL);
/* try any demuxers before us first */
if (fmt == GST_FORMAT_TIME && peer && gst_pad_query (peer, query)) {
/* try any demuxers or parsers before us first */
if ((fmt == GST_FORMAT_TIME || fmt == GST_FORMAT_DEFAULT) &&
peer != NULL && gst_pad_query (peer, query)) {
gst_query_parse_duration (query, NULL, &len);
GST_DEBUG_OBJECT (flacdec, "peer returned duration %" GST_TIME_FORMAT,
GST_TIME_ARGS (len));

View file

@ -198,6 +198,9 @@ static GstFlowReturn gst_flac_parse_parse_frame (GstBaseParse * parse,
GstBaseParseFrame * frame);
static GstFlowReturn gst_flac_parse_pre_push_frame (GstBaseParse * parse,
GstBaseParseFrame * frame);
static gboolean gst_flac_parse_convert (GstBaseParse * parse,
GstFormat src_format, gint64 src_value, GstFormat dest_format,
gint64 * dest_value);
GST_BOILERPLATE (GstFlacParse, gst_flac_parse, GstBaseParse,
GST_TYPE_BASE_PARSE);
@ -244,6 +247,7 @@ gst_flac_parse_class_init (GstFlacParseClass * klass)
baseparse_class->parse_frame = GST_DEBUG_FUNCPTR (gst_flac_parse_parse_frame);
baseparse_class->pre_push_frame =
GST_DEBUG_FUNCPTR (gst_flac_parse_pre_push_frame);
baseparse_class->convert = GST_DEBUG_FUNCPTR (gst_flac_parse_convert);
}
static void
@ -756,17 +760,15 @@ gst_flac_parse_handle_streaminfo (GstFlacParse * flacparse, GstBuffer * buffer)
if (!gst_bit_reader_get_bits_uint16 (&reader, &flacparse->min_blocksize, 16))
goto error;
if (flacparse->min_blocksize < 16) {
GST_ERROR_OBJECT (flacparse, "Invalid minimum block size: %u",
GST_WARNING_OBJECT (flacparse, "Invalid minimum block size: %u",
flacparse->min_blocksize);
return FALSE;
}
if (!gst_bit_reader_get_bits_uint16 (&reader, &flacparse->max_blocksize, 16))
goto error;
if (flacparse->max_blocksize < 16) {
GST_ERROR_OBJECT (flacparse, "Invalid maximum block size: %u",
GST_WARNING_OBJECT (flacparse, "Invalid maximum block size: %u",
flacparse->max_blocksize);
return FALSE;
}
if (!gst_bit_reader_get_bits_uint32 (&reader, &flacparse->min_framesize, 24))
@ -796,10 +798,10 @@ gst_flac_parse_handle_streaminfo (GstFlacParse * flacparse, GstBuffer * buffer)
if (!gst_bit_reader_get_bits_uint64 (&reader, &flacparse->total_samples, 36))
goto error;
if (flacparse->total_samples)
gst_base_parse_set_duration (GST_BASE_PARSE (flacparse), GST_FORMAT_TIME,
GST_FRAMES_TO_CLOCK_TIME (flacparse->total_samples,
flacparse->samplerate), 0);
if (flacparse->total_samples) {
gst_base_parse_set_duration (GST_BASE_PARSE (flacparse),
GST_FORMAT_DEFAULT, flacparse->total_samples, 0);
}
GST_DEBUG_OBJECT (flacparse, "STREAMINFO:\n"
"\tmin/max blocksize: %u/%u,\n"
@ -1353,3 +1355,35 @@ gst_flac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
return GST_FLOW_OK;
}
static gboolean
gst_flac_parse_convert (GstBaseParse * parse,
GstFormat src_format, gint64 src_value, GstFormat dest_format,
gint64 * dest_value)
{
GstFlacParse *flacparse = GST_FLAC_PARSE (parse);
if (flacparse->samplerate > 0) {
if (src_format == GST_FORMAT_DEFAULT && dest_format == GST_FORMAT_TIME) {
if (src_value != -1)
*dest_value =
gst_util_uint64_scale (src_value, GST_SECOND,
flacparse->samplerate);
else
*dest_value = -1;
return TRUE;
} else if (src_format == GST_FORMAT_TIME &&
dest_format == GST_FORMAT_DEFAULT) {
if (src_value != -1)
*dest_value =
gst_util_uint64_scale (src_value, flacparse->samplerate,
GST_SECOND);
else
*dest_value = -1;
return TRUE;
}
}
return GST_BASE_PARSE_CLASS (parent_class)->convert (parse, src_format,
src_value, dest_format, dest_value);
}

View file

@ -78,6 +78,9 @@ static gboolean gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * caps);
static gboolean gst_au_parse_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_au_parse_src_event (GstPad * pad, GstEvent * event);
static gboolean gst_au_parse_sink_event (GstPad * pad, GstEvent * event);
static gboolean gst_au_parse_src_convert (GstAuParse * auparse,
GstFormat src_format, gint64 srcval, GstFormat dest_format,
gint64 * destval);
GST_BOILERPLATE (GstAuParse, gst_au_parse, GstElement, GST_TYPE_ELEMENT);
@ -251,7 +254,9 @@ gst_au_parse_parse_header (GstAuParse * auparse)
}
auparse->offset = GST_READ_UINT32_BE (head + 4);
/* Do not trust size, could be set to -1 : unknown */
/* Do not trust size, could be set to -1 : unknown
* otherwise: filesize = size + auparse->offset
*/
size = GST_READ_UINT32_BE (head + 8);
auparse->encoding = GST_READ_UINT32_BE (head + 12);
auparse->samplerate = GST_READ_UINT32_BE (head + 16);
@ -425,6 +430,9 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf)
GstFlowReturn ret = GST_FLOW_OK;
GstAuParse *auparse;
gint avail, sendnow = 0;
gint64 timestamp;
gint64 duration;
gint64 offset;
auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
@ -446,7 +454,7 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf)
goto out;
gst_pad_push_event (auparse->srcpad,
gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_DEFAULT,
gst_event_new_new_segment (FALSE, 1.0, GST_FORMAT_TIME,
0, GST_CLOCK_TIME_NONE, 0));
}
@ -464,6 +472,7 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf)
if (sendnow > 0) {
GstBuffer *outbuf;
const guint8 *data;
gint64 pos;
ret = gst_pad_alloc_buffer_and_set_caps (auparse->srcpad,
auparse->buffer_offset, sendnow, GST_PAD_CAPS (auparse->srcpad),
@ -478,6 +487,22 @@ gst_au_parse_chain (GstPad * pad, GstBuffer * buf)
memcpy (GST_BUFFER_DATA (outbuf), data, sendnow);
gst_adapter_flush (auparse->adapter, sendnow);
pos = auparse->buffer_offset - auparse->offset;
pos = MAX (pos, 0);
if (auparse->sample_size > 0 && auparse->samplerate > 0) {
gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, pos,
GST_FORMAT_DEFAULT, &offset);
gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, pos,
GST_FORMAT_TIME, &timestamp);
gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES,
sendnow, GST_FORMAT_TIME, &duration);
GST_BUFFER_OFFSET (outbuf) = offset;
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_DURATION (outbuf) = duration;
}
auparse->buffer_offset += sendnow;
ret = gst_pad_push (auparse->srcpad, outbuf);
@ -517,6 +542,9 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
/* fallthrough */
case GST_FORMAT_DEFAULT:{
switch (dest_format) {
case GST_FORMAT_DEFAULT:
*destval = srcval;
break;
case GST_FORMAT_BYTES:
*destval = srcval * samplesize;
break;
@ -532,8 +560,8 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
case GST_FORMAT_TIME:{
switch (dest_format) {
case GST_FORMAT_BYTES:
*destval =
gst_util_uint64_scale_int (srcval, rate * samplesize, GST_SECOND);
*destval = samplesize *
gst_util_uint64_scale_int (srcval, rate, GST_SECOND);
break;
case GST_FORMAT_DEFAULT:
*destval = gst_util_uint64_scale_int (srcval, rate, GST_SECOND);
@ -581,8 +609,7 @@ gst_au_parse_src_query (GstPad * pad, GstQuery * query)
len -= auparse->offset;
GST_OBJECT_UNLOCK (auparse);
ret = gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, len,
format, &val);
ret = gst_au_parse_src_convert (auparse, bformat, len, format, &val);
if (ret) {
gst_query_set_duration (query, format, val);
@ -611,6 +638,17 @@ gst_au_parse_src_query (GstPad * pad, GstQuery * query)
}
break;
}
case GST_QUERY_SEEKING:{
GstFormat format;
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
/* FIXME: query duration in 'format'
gst_query_set_seeking (query, format, TRUE, 0, duration);
*/
gst_query_set_seeking (query, format, TRUE, 0, GST_CLOCK_TIME_NONE);
ret = TRUE;
break;
}
default:
ret = gst_pad_query_default (pad, query);
break;
@ -628,6 +666,7 @@ gst_au_parse_handle_seek (GstAuParse * auparse, GstEvent * event)
GstFormat format;
gdouble rate;
gint64 start, stop;
gboolean res;
gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
&stop_type, &stop);
@ -637,19 +676,79 @@ gst_au_parse_handle_seek (GstAuParse * auparse, GstEvent * event)
return FALSE;
}
/* FIXME: implement seeking */
return FALSE;
res = gst_au_parse_src_convert (auparse, GST_FORMAT_TIME, start,
GST_FORMAT_BYTES, &start);
if (stop > 0) {
res = gst_au_parse_src_convert (auparse, GST_FORMAT_TIME, stop,
GST_FORMAT_BYTES, &stop);
}
GST_INFO_OBJECT (auparse,
"seeking: %" G_GINT64_FORMAT " ... %" G_GINT64_FORMAT, start, stop);
event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, start_type, start,
stop_type, stop);
res = gst_pad_push_event (auparse->sinkpad, event);
return res;
}
static gboolean
gst_au_parse_sink_event (GstPad * pad, GstEvent * event)
{
GstAuParse *auparse;
gboolean ret;
gboolean ret = TRUE;
auparse = GST_AU_PARSE (gst_pad_get_parent (pad));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_NEWSEGMENT:
{
GstFormat format;
gdouble rate, arate;
gint64 start, stop, time, offset = 0;
gboolean update;
GstSegment segment;
GstEvent *new_event = NULL;
gst_segment_init (&segment, GST_FORMAT_UNDEFINED);
gst_event_parse_new_segment_full (event, &update, &rate, &arate, &format,
&start, &stop, &time);
gst_segment_set_newsegment_full (&segment, update, rate, arate, format,
start, stop, time);
if (auparse->sample_size > 0) {
if (start > 0) {
offset = start;
start -= auparse->offset;
start = MAX (start, 0);
}
if (stop > 0) {
stop -= auparse->offset;
stop = MAX (stop, 0);
}
gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, start,
GST_FORMAT_TIME, &start);
gst_au_parse_src_convert (auparse, GST_FORMAT_BYTES, stop,
GST_FORMAT_TIME, &stop);
}
if (auparse->srcpad) {
GST_INFO_OBJECT (auparse,
"new segment: %" GST_TIME_FORMAT " ... %" GST_TIME_FORMAT,
GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
new_event = gst_event_new_new_segment_full (update, rate, arate,
GST_FORMAT_TIME, start, stop, start);
ret = gst_pad_push_event (auparse->srcpad, new_event);
}
auparse->buffer_offset = offset;
gst_event_unref (event);
break;
}
default:
ret = gst_pad_event_default (pad, event);
break;

View file

@ -1881,6 +1881,8 @@ gst_avi_demux_roundup_list (GstAviDemux * avi, GstBuffer ** buf)
data = gst_buffer_map (obuf, NULL, NULL, GST_MAP_WRITE);
gst_buffer_extract (*buf, 0, data, size);
/* assume 0 padding, at least makes outcome deterministic */
data[size] = 0;
gst_buffer_unmap (obuf, data, size + 1);
gst_buffer_replace (buf, obuf);
}

View file

@ -113,7 +113,7 @@ gst_rnd_buffer_size_base_init (gpointer g_class)
gst_element_class_set_details_simple (gstelement_class, "Random buffer size",
"Testing", "pull random sized buffers",
"Stefan Kost <stefan.kost@nokia.com>)");
"Stefan Kost <stefan.kost@nokia.com>");
}

File diff suppressed because it is too large Load diff

View file

@ -43,8 +43,6 @@ G_BEGIN_DECLS
typedef struct _GstDeinterlace GstDeinterlace;
typedef struct _GstDeinterlaceClass GstDeinterlaceClass;
#define GST_DEINTERLACE_MAX_FIELD_HISTORY 10
typedef enum
{
GST_DEINTERLACE_TOMSMOCOMP,
@ -79,6 +77,39 @@ typedef enum {
GST_DEINTERLACE_MODE_DISABLED
} GstDeinterlaceMode;
typedef enum
{
GST_DEINTERLACE_LOCKING_NONE,
GST_DEINTERLACE_LOCKING_AUTO,
GST_DEINTERLACE_LOCKING_ACTIVE,
GST_DEINTERLACE_LOCKING_PASSIVE,
} GstDeinterlaceLocking;
#define GST_DEINTERLACE_MAX_FIELD_HISTORY 10
#define GST_DEINTERLACE_MAX_BUFFER_STATE_HISTORY 50
/* check max field history is large enough */
#if GST_DEINTERLACE_MAX_FIELD_HISTORY < GST_DEINTERLACE_MAX_BUFFER_STATE_HISTORY * 3
#undef GST_DEINTERLACE_MAX_FIELD_HISTORY
#define GST_DEINTERLACE_MAX_FIELD_HISTORY (GST_DEINTERLACE_MAX_BUFFER_STATE_HISTORY * 3)
#endif
typedef struct _TelecinePattern TelecinePattern;
struct _TelecinePattern
{
const gchar *nick;
guint8 length;
guint8 ratio_n, ratio_d;
guint8 states[GST_DEINTERLACE_MAX_BUFFER_STATE_HISTORY];
};
typedef struct _GstDeinterlaceBufferState GstDeinterlaceBufferState;
struct _GstDeinterlaceBufferState
{
GstClockTime timestamp;
GstClockTime duration;
guint8 state;
};
struct _GstDeinterlace
{
GstElement parent;
@ -92,8 +123,10 @@ struct _GstDeinterlace
GstDeinterlaceFields fields;
GstDeinterlaceMethods method_id; /* current state (differs when flushing) */
GstDeinterlaceMethods user_set_method_id; /* property value */
/* current state (differs when flushing/inverse telecine using weave) */
GstDeinterlaceMethods method_id;
/* property value */
GstDeinterlaceMethods user_set_method_id;
GstDeinterlaceMethod *method;
GstVideoFormat format;
@ -134,6 +167,24 @@ struct _GstDeinterlace
gboolean reconfigure;
GstDeinterlaceMode new_mode;
GstDeinterlaceFields new_fields;
GstDeinterlaceLocking locking;
gint low_latency;
gboolean drop_orphans;
gboolean ignore_obscure;
gboolean pattern_lock;
gboolean pattern_refresh;
GstDeinterlaceBufferState buf_states[GST_DEINTERLACE_MAX_BUFFER_STATE_HISTORY];
gint state_count;
gint pattern;
guint8 pattern_phase;
guint8 pattern_count;
guint8 output_count;
GstClockTime pattern_base_ts;
GstClockTime pattern_buf_dur;
gboolean need_more;
gboolean have_eos;
};
struct _GstDeinterlaceClass

View file

@ -2723,6 +2723,7 @@ gst_qtdemux_loop_state_header (GstQTDemux * qtdemux)
("We got less than expected (received %u, wanted %u, offset %"
G_GUINT64_FORMAT ")",
GST_BUFFER_SIZE (moov), (guint) length, cur_offset));
gst_buffer_unref (moov);
ret = GST_FLOW_ERROR;
goto beach;
}
@ -9320,6 +9321,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case GST_MAKE_FOURCC ('V', 'P', '8', '0'):
_codec ("On2 VP8");
caps = gst_caps_from_string ("video/x-vp8");
break;
case FOURCC_ovc1:
_codec ("VC-1");
caps = gst_caps_new_simple ("video/x-wmv",

View file

@ -8,6 +8,7 @@ libgstmatroska_la_SOURCES = \
matroska-parse.c \
matroska-ids.c \
matroska-mux.c \
matroska-read-common.c \
webm-mux.c \
lzo.c
@ -19,6 +20,7 @@ noinst_HEADERS = \
matroska-parse.h \
matroska-ids.h \
matroska-mux.h \
matroska-read-common.h \
webm-mux.h \
lzo.h

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
/* GStreamer Matroska muxer/demuxer
* (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* (c) 2011 Debarshi Ray <rishi@gnu.org>
*
* matroska-demux.h: matroska file/stream demuxer definition
*
@ -27,6 +28,7 @@
#include "ebml-read.h"
#include "matroska-ids.h"
#include "matroska-read-common.h"
G_BEGIN_DECLS
@ -41,28 +43,16 @@ G_BEGIN_DECLS
#define GST_IS_MATROSKA_DEMUX_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_DEMUX))
typedef enum {
GST_MATROSKA_DEMUX_STATE_START,
GST_MATROSKA_DEMUX_STATE_SEGMENT,
GST_MATROSKA_DEMUX_STATE_HEADER,
GST_MATROSKA_DEMUX_STATE_DATA,
GST_MATROSKA_DEMUX_STATE_SEEK,
GST_MATROSKA_DEMUX_STATE_SCANNING
} GstMatroskaDemuxState;
typedef struct _GstMatroskaDemux {
GstElement parent;
/* < private > */
GstIndex *element_index;
gint element_index_writer_id;
GstMatroskaReadCommon common;
/* pads */
GstPad *sinkpad;
GPtrArray *src;
GstClock *clock;
guint num_streams;
guint num_v_streams;
guint num_a_streams;
guint num_t_streams;
@ -74,30 +64,20 @@ typedef struct _GstMatroskaDemux {
/* state */
gboolean streaming;
GstMatroskaDemuxState state;
guint level_up;
guint64 seek_block;
gboolean seek_first;
/* did we parse cues/tracks/segmentinfo already? */
gboolean index_parsed;
gboolean tracks_parsed;
gboolean segmentinfo_parsed;
gboolean attachments_parsed;
GList *tags_parsed;
GList *seek_parsed;
/* start-of-segment */
guint64 ebml_segment_start;
/* a cue (index) table */
GArray *index;
/* cluster positions (optional) */
GArray *clusters;
/* timescale in the file */
guint64 time_scale;
/* keeping track of playback position */
GstSegment segment;
gboolean segment_running;

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
/* GStreamer Matroska muxer/demuxer
* (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* (c) 2011 Debarshi Ray <rishi@gnu.org>
*
* matroska-parse.h: matroska file/stream parseer definition
*
@ -27,6 +28,7 @@
#include "ebml-read.h"
#include "matroska-ids.h"
#include "matroska-read-common.h"
G_BEGIN_DECLS
@ -41,29 +43,17 @@ G_BEGIN_DECLS
#define GST_IS_MATROSKA_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MATROSKA_PARSE))
typedef enum {
GST_MATROSKA_PARSE_STATE_START,
GST_MATROSKA_PARSE_STATE_SEGMENT,
GST_MATROSKA_PARSE_STATE_HEADER,
GST_MATROSKA_PARSE_STATE_DATA,
GST_MATROSKA_PARSE_STATE_SEEK,
GST_MATROSKA_PARSE_STATE_SCANNING
} GstMatroskaParseState;
typedef struct _GstMatroskaParse {
GstElement parent;
/* < private > */
GstIndex *element_index;
gint element_index_writer_id;
GstMatroskaReadCommon common;
/* pads */
GstPad *sinkpad;
GstPad *srcpad;
GPtrArray *src;
GstClock *clock;
guint num_streams;
guint num_v_streams;
guint num_a_streams;
guint num_t_streams;
@ -79,28 +69,17 @@ typedef struct _GstMatroskaParse {
/* state */
//gboolean streaming;
GstMatroskaParseState state;
guint level_up;
guint64 seek_block;
gboolean seek_first;
/* did we parse cues/tracks/segmentinfo already? */
gboolean index_parsed;
gboolean tracks_parsed;
gboolean segmentinfo_parsed;
gboolean attachments_parsed;
GList *tags_parsed;
GList *seek_parsed;
/* start-of-segment */
guint64 ebml_segment_start;
/* a cue (index) table */
GArray *index;
/* timescale in the file */
guint64 time_scale;
/* keeping track of playback position */
GstSegment segment;
gboolean segment_running;

View file

@ -0,0 +1,609 @@
/* GStreamer Matroska muxer/demuxer
* (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* (c) 2006 Tim-Philipp Müller <tim centricular net>
* (c) 2008 Sebastian Dröge <slomo@circular-chaos.org>
* (c) 2011 Debarshi Ray <rishi@gnu.org>
*
* matroska-read-common.c: shared by matroska file/stream demuxer and parser
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#ifdef HAVE_ZLIB
#include <zlib.h>
#endif
#ifdef HAVE_BZ2
#include <bzlib.h>
#endif
#include "lzo.h"
#include "ebml-read.h"
#include "matroska-read-common.h"
GST_DEBUG_CATEGORY_STATIC (matroskareadcommon_debug);
#define GST_CAT_DEFAULT matroskareadcommon_debug
#define DEBUG_ELEMENT_START(common, ebml, element) \
GST_DEBUG_OBJECT (common, "Parsing " element " element at offset %" \
G_GUINT64_FORMAT, gst_ebml_read_get_pos (ebml))
#define DEBUG_ELEMENT_STOP(common, ebml, element, ret) \
GST_DEBUG_OBJECT (common, "Parsing " element " element " \
" finished with '%s'", gst_flow_get_name (ret))
GstFlowReturn
gst_matroska_decode_content_encodings (GArray * encodings)
{
gint i;
if (encodings == NULL)
return GST_FLOW_OK;
for (i = 0; i < encodings->len; i++) {
GstMatroskaTrackEncoding *enc =
&g_array_index (encodings, GstMatroskaTrackEncoding, i);
guint8 *data = NULL;
guint size;
if ((enc->scope & GST_MATROSKA_TRACK_ENCODING_SCOPE_NEXT_CONTENT_ENCODING)
== 0)
continue;
/* Encryption not supported yet */
if (enc->type != 0)
return GST_FLOW_ERROR;
if (i + 1 >= encodings->len)
return GST_FLOW_ERROR;
if (enc->comp_settings_length == 0)
continue;
data = enc->comp_settings;
size = enc->comp_settings_length;
if (!gst_matroska_decompress_data (enc, &data, &size, enc->comp_algo))
return GST_FLOW_ERROR;
g_free (enc->comp_settings);
enc->comp_settings = data;
enc->comp_settings_length = size;
}
return GST_FLOW_OK;
}
gboolean
gst_matroska_decompress_data (GstMatroskaTrackEncoding * enc,
guint8 ** data_out, guint * size_out,
GstMatroskaTrackCompressionAlgorithm algo)
{
guint8 *new_data = NULL;
guint new_size = 0;
guint8 *data = *data_out;
guint size = *size_out;
gboolean ret = TRUE;
if (algo == GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_ZLIB) {
#ifdef HAVE_ZLIB
/* zlib encoded data */
z_stream zstream;
guint orig_size;
int result;
orig_size = size;
zstream.zalloc = (alloc_func) 0;
zstream.zfree = (free_func) 0;
zstream.opaque = (voidpf) 0;
if (inflateInit (&zstream) != Z_OK) {
GST_WARNING ("zlib initialization failed.");
ret = FALSE;
goto out;
}
zstream.next_in = (Bytef *) data;
zstream.avail_in = orig_size;
new_size = orig_size;
new_data = g_malloc (new_size);
zstream.avail_out = new_size;
zstream.next_out = (Bytef *) new_data;
do {
result = inflate (&zstream, Z_NO_FLUSH);
if (result != Z_OK && result != Z_STREAM_END) {
GST_WARNING ("zlib decompression failed.");
g_free (new_data);
inflateEnd (&zstream);
break;
}
new_size += 4000;
new_data = g_realloc (new_data, new_size);
zstream.next_out = (Bytef *) (new_data + zstream.total_out);
zstream.avail_out += 4000;
} while (zstream.avail_in != 0 && result != Z_STREAM_END);
if (result != Z_STREAM_END) {
ret = FALSE;
goto out;
} else {
new_size = zstream.total_out;
inflateEnd (&zstream);
}
#else
GST_WARNING ("zlib encoded tracks not supported.");
ret = FALSE;
goto out;
#endif
} else if (algo == GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_BZLIB) {
#ifdef HAVE_BZ2
/* bzip2 encoded data */
bz_stream bzstream;
guint orig_size;
int result;
bzstream.bzalloc = NULL;
bzstream.bzfree = NULL;
bzstream.opaque = NULL;
orig_size = size;
if (BZ2_bzDecompressInit (&bzstream, 0, 0) != BZ_OK) {
GST_WARNING ("bzip2 initialization failed.");
ret = FALSE;
goto out;
}
bzstream.next_in = (char *) data;
bzstream.avail_in = orig_size;
new_size = orig_size;
new_data = g_malloc (new_size);
bzstream.avail_out = new_size;
bzstream.next_out = (char *) new_data;
do {
result = BZ2_bzDecompress (&bzstream);
if (result != BZ_OK && result != BZ_STREAM_END) {
GST_WARNING ("bzip2 decompression failed.");
g_free (new_data);
BZ2_bzDecompressEnd (&bzstream);
break;
}
new_size += 4000;
new_data = g_realloc (new_data, new_size);
bzstream.next_out = (char *) (new_data + bzstream.total_out_lo32);
bzstream.avail_out += 4000;
} while (bzstream.avail_in != 0 && result != BZ_STREAM_END);
if (result != BZ_STREAM_END) {
ret = FALSE;
goto out;
} else {
new_size = bzstream.total_out_lo32;
BZ2_bzDecompressEnd (&bzstream);
}
#else
GST_WARNING ("bzip2 encoded tracks not supported.");
ret = FALSE;
goto out;
#endif
} else if (algo == GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_LZO1X) {
/* lzo encoded data */
int result;
int orig_size, out_size;
orig_size = size;
out_size = size;
new_size = size;
new_data = g_malloc (new_size);
do {
orig_size = size;
out_size = new_size;
result = lzo1x_decode (new_data, &out_size, data, &orig_size);
if (orig_size > 0) {
new_size += 4000;
new_data = g_realloc (new_data, new_size);
}
} while (orig_size > 0 && result == LZO_OUTPUT_FULL);
new_size -= out_size;
if (result != LZO_OUTPUT_FULL) {
GST_WARNING ("lzo decompression failed");
g_free (new_data);
ret = FALSE;
goto out;
}
} else if (algo == GST_MATROSKA_TRACK_COMPRESSION_ALGORITHM_HEADERSTRIP) {
/* header stripped encoded data */
if (enc->comp_settings_length > 0) {
new_data = g_malloc (size + enc->comp_settings_length);
new_size = size + enc->comp_settings_length;
memcpy (new_data, enc->comp_settings, enc->comp_settings_length);
memcpy (new_data + enc->comp_settings_length, data, size);
}
} else {
GST_ERROR ("invalid compression algorithm %d", algo);
ret = FALSE;
}
out:
if (!ret) {
*data_out = NULL;
*size_out = 0;
} else {
*data_out = new_data;
*size_out = new_size;
}
return ret;
}
static gint
gst_matroska_index_compare (GstMatroskaIndex * i1, GstMatroskaIndex * i2)
{
if (i1->time < i2->time)
return -1;
else if (i1->time > i2->time)
return 1;
else if (i1->block < i2->block)
return -1;
else if (i1->block > i2->block)
return 1;
else
return 0;
}
/* skip unknown or alike element */
GstFlowReturn
gst_matroska_read_common_parse_skip (GstMatroskaReadCommon * common,
GstEbmlRead * ebml, const gchar * parent_name, guint id)
{
if (id == GST_EBML_ID_VOID) {
GST_DEBUG_OBJECT (common, "Skipping EBML Void element");
} else if (id == GST_EBML_ID_CRC32) {
GST_DEBUG_OBJECT (common, "Skipping EBML CRC32 element");
} else {
GST_WARNING_OBJECT (common,
"Unknown %s subelement 0x%x - ignoring", parent_name, id);
}
return gst_ebml_read_skip (ebml);
}
static GstFlowReturn
gst_matroska_read_common_parse_index_cuetrack (GstMatroskaReadCommon * common,
GstEbmlRead * ebml, guint * nentries)
{
guint32 id;
GstFlowReturn ret;
GstMatroskaIndex idx;
idx.pos = (guint64) - 1;
idx.track = 0;
idx.time = GST_CLOCK_TIME_NONE;
idx.block = 1;
DEBUG_ELEMENT_START (common, ebml, "CueTrackPositions");
if ((ret = gst_ebml_read_master (ebml, &id)) != GST_FLOW_OK) {
DEBUG_ELEMENT_STOP (common, ebml, "CueTrackPositions", ret);
return ret;
}
while (ret == GST_FLOW_OK && gst_ebml_read_has_remaining (ebml, 1, TRUE)) {
if ((ret = gst_ebml_peek_id (ebml, &id)) != GST_FLOW_OK)
break;
switch (id) {
/* track number */
case GST_MATROSKA_ID_CUETRACK:
{
guint64 num;
if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK)
break;
if (num == 0) {
idx.track = 0;
GST_WARNING_OBJECT (common, "Invalid CueTrack 0");
break;
}
GST_DEBUG_OBJECT (common, "CueTrack: %" G_GUINT64_FORMAT, num);
idx.track = num;
break;
}
/* position in file */
case GST_MATROSKA_ID_CUECLUSTERPOSITION:
{
guint64 num;
if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK)
break;
if (num > G_MAXINT64) {
GST_WARNING_OBJECT (common, "CueClusterPosition %" G_GUINT64_FORMAT
" too large", num);
break;
}
idx.pos = num;
break;
}
/* number of block in the cluster */
case GST_MATROSKA_ID_CUEBLOCKNUMBER:
{
guint64 num;
if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK)
break;
if (num == 0) {
GST_WARNING_OBJECT (common, "Invalid CueBlockNumber 0");
break;
}
GST_DEBUG_OBJECT (common, "CueBlockNumber: %" G_GUINT64_FORMAT, num);
idx.block = num;
/* mild sanity check, disregard strange cases ... */
if (idx.block > G_MAXUINT16) {
GST_DEBUG_OBJECT (common, "... looks suspicious, ignoring");
idx.block = 1;
}
break;
}
default:
ret = gst_matroska_read_common_parse_skip (common, ebml,
"CueTrackPositions", id);
break;
case GST_MATROSKA_ID_CUECODECSTATE:
case GST_MATROSKA_ID_CUEREFERENCE:
ret = gst_ebml_read_skip (ebml);
break;
}
}
DEBUG_ELEMENT_STOP (common, ebml, "CueTrackPositions", ret);
if ((ret == GST_FLOW_OK || ret == GST_FLOW_UNEXPECTED)
&& idx.pos != (guint64) - 1 && idx.track > 0) {
g_array_append_val (common->index, idx);
(*nentries)++;
} else if (ret == GST_FLOW_OK || ret == GST_FLOW_UNEXPECTED) {
GST_DEBUG_OBJECT (common, "CueTrackPositions without valid content");
}
return ret;
}
static GstFlowReturn
gst_matroska_read_common_parse_index_pointentry (GstMatroskaReadCommon *
common, GstEbmlRead * ebml)
{
guint32 id;
GstFlowReturn ret;
GstClockTime time = GST_CLOCK_TIME_NONE;
guint nentries = 0;
DEBUG_ELEMENT_START (common, ebml, "CuePoint");
if ((ret = gst_ebml_read_master (ebml, &id)) != GST_FLOW_OK) {
DEBUG_ELEMENT_STOP (common, ebml, "CuePoint", ret);
return ret;
}
while (ret == GST_FLOW_OK && gst_ebml_read_has_remaining (ebml, 1, TRUE)) {
if ((ret = gst_ebml_peek_id (ebml, &id)) != GST_FLOW_OK)
break;
switch (id) {
/* one single index entry ('point') */
case GST_MATROSKA_ID_CUETIME:
{
if ((ret = gst_ebml_read_uint (ebml, &id, &time)) != GST_FLOW_OK)
break;
GST_DEBUG_OBJECT (common, "CueTime: %" G_GUINT64_FORMAT, time);
time = time * common->time_scale;
break;
}
/* position in the file + track to which it belongs */
case GST_MATROSKA_ID_CUETRACKPOSITIONS:
{
if ((ret =
gst_matroska_read_common_parse_index_cuetrack (common, ebml,
&nentries)) != GST_FLOW_OK)
break;
break;
}
default:
ret = gst_matroska_read_common_parse_skip (common, ebml, "CuePoint",
id);
break;
}
}
DEBUG_ELEMENT_STOP (common, ebml, "CuePoint", ret);
if (nentries > 0) {
if (time == GST_CLOCK_TIME_NONE) {
GST_WARNING_OBJECT (common, "CuePoint without valid time");
g_array_remove_range (common->index, common->index->len - nentries,
nentries);
} else {
gint i;
for (i = common->index->len - nentries; i < common->index->len; i++) {
GstMatroskaIndex *idx =
&g_array_index (common->index, GstMatroskaIndex, i);
idx->time = time;
GST_DEBUG_OBJECT (common, "Index entry: pos=%" G_GUINT64_FORMAT
", time=%" GST_TIME_FORMAT ", track=%u, block=%u", idx->pos,
GST_TIME_ARGS (idx->time), (guint) idx->track, (guint) idx->block);
}
}
} else {
GST_DEBUG_OBJECT (common, "Empty CuePoint");
}
return ret;
}
gint
gst_matroska_read_common_stream_from_num (GstMatroskaReadCommon * common,
guint track_num)
{
guint n;
g_assert (common->src->len == common->num_streams);
for (n = 0; n < common->src->len; n++) {
GstMatroskaTrackContext *context = g_ptr_array_index (common->src, n);
if (context->num == track_num) {
return n;
}
}
if (n == common->num_streams)
GST_WARNING_OBJECT (common,
"Failed to find corresponding pad for tracknum %d", track_num);
return -1;
}
GstFlowReturn
gst_matroska_read_common_parse_index (GstMatroskaReadCommon * common,
GstEbmlRead * ebml)
{
guint32 id;
GstFlowReturn ret = GST_FLOW_OK;
guint i;
if (common->index)
g_array_free (common->index, TRUE);
common->index =
g_array_sized_new (FALSE, FALSE, sizeof (GstMatroskaIndex), 128);
DEBUG_ELEMENT_START (common, ebml, "Cues");
if ((ret = gst_ebml_read_master (ebml, &id)) != GST_FLOW_OK) {
DEBUG_ELEMENT_STOP (common, ebml, "Cues", ret);
return ret;
}
while (ret == GST_FLOW_OK && gst_ebml_read_has_remaining (ebml, 1, TRUE)) {
if ((ret = gst_ebml_peek_id (ebml, &id)) != GST_FLOW_OK)
break;
switch (id) {
/* one single index entry ('point') */
case GST_MATROSKA_ID_POINTENTRY:
ret = gst_matroska_read_common_parse_index_pointentry (common, ebml);
break;
default:
ret = gst_matroska_read_common_parse_skip (common, ebml, "Cues", id);
break;
}
}
DEBUG_ELEMENT_STOP (common, ebml, "Cues", ret);
/* Sort index by time, smallest time first, for easier searching */
g_array_sort (common->index, (GCompareFunc) gst_matroska_index_compare);
/* Now sort the track specific index entries into their own arrays */
for (i = 0; i < common->index->len; i++) {
GstMatroskaIndex *idx = &g_array_index (common->index, GstMatroskaIndex,
i);
gint track_num;
GstMatroskaTrackContext *ctx;
if (common->element_index) {
gint writer_id;
if (idx->track != 0 &&
(track_num =
gst_matroska_read_common_stream_from_num (common,
idx->track)) != -1) {
ctx = g_ptr_array_index (common->src, track_num);
if (ctx->index_writer_id == -1)
gst_index_get_writer_id (common->element_index,
GST_OBJECT (ctx->pad), &ctx->index_writer_id);
writer_id = ctx->index_writer_id;
} else {
if (common->element_index_writer_id == -1)
gst_index_get_writer_id (common->element_index, GST_OBJECT (common),
&common->element_index_writer_id);
writer_id = common->element_index_writer_id;
}
GST_LOG_OBJECT (common, "adding association %" GST_TIME_FORMAT "-> %"
G_GUINT64_FORMAT " for writer id %d", GST_TIME_ARGS (idx->time),
idx->pos, writer_id);
gst_index_add_association (common->element_index, writer_id,
GST_ASSOCIATION_FLAG_KEY_UNIT, GST_FORMAT_TIME, idx->time,
GST_FORMAT_BYTES, idx->pos + common->ebml_segment_start, NULL);
}
if (idx->track == 0)
continue;
track_num = gst_matroska_read_common_stream_from_num (common, idx->track);
if (track_num == -1)
continue;
ctx = g_ptr_array_index (common->src, track_num);
if (ctx->index_table == NULL)
ctx->index_table =
g_array_sized_new (FALSE, FALSE, sizeof (GstMatroskaIndex), 128);
g_array_append_vals (ctx->index_table, idx, 1);
}
common->index_parsed = TRUE;
/* sanity check; empty index normalizes to no index */
if (common->index->len == 0) {
g_array_free (common->index, TRUE);
common->index = NULL;
}
return ret;
}

View file

@ -0,0 +1,79 @@
/* GStreamer Matroska muxer/demuxer
* (c) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
* (c) 2011 Debarshi Ray <rishi@gnu.org>
*
* matroska-read-common.h: shared by matroska file/stream demuxer and parser
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_MATROSKA_READ_COMMON_H__
#define __GST_MATROSKA_READ_COMMON_H__
#include <glib.h>
#include <gst/gst.h>
#include "matroska-ids.h"
G_BEGIN_DECLS
typedef enum {
GST_MATROSKA_READ_STATE_START,
GST_MATROSKA_READ_STATE_SEGMENT,
GST_MATROSKA_READ_STATE_HEADER,
GST_MATROSKA_READ_STATE_DATA,
GST_MATROSKA_READ_STATE_SEEK,
GST_MATROSKA_READ_STATE_SCANNING
} GstMatroskaReadState;
typedef struct _GstMatroskaReadCommon {
GstIndex *element_index;
gint element_index_writer_id;
/* pads */
GPtrArray *src;
guint num_streams;
/* state */
GstMatroskaReadState state;
/* did we parse cues/tracks/segmentinfo already? */
gboolean index_parsed;
/* start-of-segment */
guint64 ebml_segment_start;
/* a cue (index) table */
GArray *index;
/* timescale in the file */
guint64 time_scale;
} GstMatroskaReadCommon;
GstFlowReturn gst_matroska_decode_content_encodings (GArray * encodings);
gboolean gst_matroska_decompress_data (GstMatroskaTrackEncoding * enc,
guint8 ** data_out, guint * size_out,
GstMatroskaTrackCompressionAlgorithm algo);
GstFlowReturn gst_matroska_read_common_parse_index (GstMatroskaReadCommon *
common, GstEbmlRead * ebml);
GstFlowReturn gst_matroska_read_common_parse_skip (GstMatroskaReadCommon *
common, GstEbmlRead * ebml, const gchar * parent_name, guint id);
gint gst_matroska_read_common_stream_from_num (GstMatroskaReadCommon * common,
guint track_num);
G_END_DECLS
#endif /* __GST_MATROSKA_READ_COMMON_H__ */

View file

@ -190,8 +190,9 @@ gst_rtp_ac3_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
gst_rtp_buffer_unmap (&rtp);
GST_DEBUG_OBJECT (rtpac3depay, "pushing buffer of size %d",
gst_buffer_get_size (outbuf));
if (outbuf)
GST_DEBUG_OBJECT (rtpac3depay, "pushing buffer of size %d",
gst_buffer_get_size (outbuf));
return outbuf;

View file

@ -166,7 +166,7 @@ gst_rtp_bv_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
gst_rtp_buffer_unmap (&rtp);
if (marker) {
if (marker && outbuf) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
}

View file

@ -235,7 +235,7 @@ gst_rtp_g722_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
marker = gst_rtp_buffer_get_marker (&rtp);
gst_rtp_buffer_unmap (&rtp);
if (marker) {
if (marker && outbuf) {
/* mark talk spurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
}

View file

@ -222,6 +222,8 @@ gst_rtp_g726_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
if (depay->aal2 || depay->force_aal2) {
/* AAL2, we can just copy the bytes */
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
if (!outbuf)
goto bad_len;
} else {
guint8 *in, *out, tmp, *odata;
guint len;
@ -231,6 +233,8 @@ gst_rtp_g726_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
len = gst_rtp_buffer_get_payload_len (&rtp);
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
if (!outbuf)
goto bad_len;
outbuf = gst_buffer_make_writable (outbuf);
odata = gst_buffer_map (outbuf, &osize, NULL, GST_MAP_WRITE);
@ -331,6 +335,9 @@ gst_rtp_g726_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
}
return outbuf;
bad_len:
return NULL;
}
static void

View file

@ -136,7 +136,7 @@ gst_rtp_gsm_depay_process (GstBaseRTPDepayload * _depayload, GstBuffer * buf)
gst_rtp_buffer_unmap (&rtp);
if (marker) {
if (marker && outbuf) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
}

View file

@ -190,7 +190,7 @@ gst_rtp_ilbc_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
gst_rtp_buffer_unmap (&rtp);
if (marker) {
if (marker && outbuf) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
}

View file

@ -716,7 +716,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstBaseRTPPayload * basepayload,
guint qt;
qt = info[i].qt;
if (qt > 15)
if (qt >= G_N_ELEMENTS (tables))
goto invalid_quant;
qsize = tables[qt].size;

View file

@ -131,8 +131,9 @@ gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_buffer (buf);
GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %d",
GST_BUFFER_SIZE (outbuf));
if (outbuf)
GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %d",
GST_BUFFER_SIZE (outbuf));
return outbuf;
}

View file

@ -169,8 +169,9 @@ gst_rtp_mp2t_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
gst_rtp_buffer_get_payload_subbuffer (buf, rtpmp2tdepay->skip_first_bytes,
-1);
GST_DEBUG ("gst_rtp_mp2t_depay_chain: pushing buffer of size %d",
GST_BUFFER_SIZE (outbuf));
if (outbuf)
GST_DEBUG ("gst_rtp_mp2t_depay_chain: pushing buffer of size %d",
GST_BUFFER_SIZE (outbuf));
return outbuf;

View file

@ -51,7 +51,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
/* All optional parameters
*
* "profile-level-id=[1,MAX]"
* "config="
* "config="
*/
)
);
@ -229,7 +229,7 @@ gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
if (!gst_bit_reader_get_bits_uint8 (&br, &sr_idx, 4))
goto bad_config;
if (sr_idx > 12 && sr_idx != 15) {
if (sr_idx >= G_N_ELEMENTS (aac_sample_rates) && sr_idx != 15) {
GST_WARNING_OBJECT (depayload, "invalid sample rate index %d", sr_idx);
goto bad_config;
}

View file

@ -172,10 +172,11 @@ gst_rtp_mpv_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_subbuffer (&rtp, payload_header, -1);
GST_DEBUG_OBJECT (rtpmpvdepay,
"gst_rtp_mpv_depay_chain: pushing buffer of size %d",
gst_buffer_get_size (outbuf));
if (outbuf) {
GST_DEBUG_OBJECT (rtpmpvdepay,
"gst_rtp_mpv_depay_chain: pushing buffer of size %d",
gst_buffer_get_size (outbuf));
}
return outbuf;
}

View file

@ -46,18 +46,18 @@ static GstStaticPadTemplate gst_rtp_pcma_depay_sink_template =
GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"clock-rate = (int) 8000, " "encoding-name = (string) \"PCMA\";"
"clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"PCMA\";"
"application/x-rtp, "
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_PCMA_STRING ", "
"clock-rate = (int) 8000")
"clock-rate = (int) [1, MAX ]")
);
static GstStaticPadTemplate gst_rtp_pcma_depay_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-alaw, channels = (int) 1, rate = (int) 8000")
GST_STATIC_CAPS ("audio/x-alaw, channels = (int) 1, rate = (int) [1, MAX ]")
);
static GstBuffer *gst_rtp_pcma_depay_process (GstBaseRTPDepayload * depayload,
@ -144,12 +144,14 @@ gst_rtp_pcma_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
gst_rtp_buffer_unmap (&rtp);
GST_BUFFER_DURATION (outbuf) =
gst_util_uint64_scale_int (len, GST_SECOND, depayload->clock_rate);
if (outbuf) {
GST_BUFFER_DURATION (outbuf) =
gst_util_uint64_scale_int (len, GST_SECOND, depayload->clock_rate);
if (marker) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
if (marker) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
}
}

View file

@ -46,18 +46,19 @@ static GstStaticPadTemplate gst_rtp_pcmu_depay_sink_template =
GST_STATIC_CAPS ("application/x-rtp, "
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"clock-rate = (int) 8000, " "encoding-name = (string) \"PCMU\";"
"clock-rate = (int) [1, MAX ], " "encoding-name = (string) \"PCMU\";"
"application/x-rtp, "
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_PCMU_STRING ", "
"clock-rate = (int) 8000")
"clock-rate = (int) [1, MAX ]")
);
static GstStaticPadTemplate gst_rtp_pcmu_depay_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-mulaw, channels = (int) 1, rate = (int) 8000")
GST_STATIC_CAPS ("audio/x-mulaw, "
"channels = (int) 1, rate = (int) [1, MAX ]")
);
static GstBuffer *gst_rtp_pcmu_depay_process (GstBaseRTPDepayload * depayload,
@ -144,12 +145,14 @@ gst_rtp_pcmu_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
outbuf = gst_rtp_buffer_get_payload_buffer (&rtp);
gst_rtp_buffer_unmap (&rtp);
GST_BUFFER_DURATION (outbuf) =
gst_util_uint64_scale_int (len, GST_SECOND, depayload->clock_rate);
if (outbuf) {
GST_BUFFER_DURATION (outbuf) =
gst_util_uint64_scale_int (len, GST_SECOND, depayload->clock_rate);
if (marker) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
if (marker) {
/* mark start of talkspurt with DISCONT */
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
}
}
return outbuf;

View file

@ -164,7 +164,7 @@ static const gint frame_size[16] = {
static gint
get_frame_len (GstRtpQCELPDepay * depay, guint8 frame_type)
{
if (frame_type > 16)
if (frame_type >= G_N_ELEMENTS (frame_size))
return 0;
return frame_size[frame_type];

View file

@ -212,7 +212,8 @@ gst_rtp_speex_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
/* nothing special to be done */
outbuf = gst_rtp_buffer_get_payload_buffer (buf);
GST_BUFFER_DURATION (outbuf) = 20 * GST_MSECOND;
if (outbuf)
GST_BUFFER_DURATION (outbuf) = 20 * GST_MSECOND;
return outbuf;
}

View file

@ -5502,8 +5502,10 @@ restart:
src->need_redirect = FALSE;
/* can't continue without a valid url */
if (G_UNLIKELY (src->conninfo.url == NULL))
if (G_UNLIKELY (src->conninfo.url == NULL)) {
res = GST_RTSP_EINVAL;
goto no_url;
}
src->tried_url_auth = FALSE;
if ((res = gst_rtsp_conninfo_connect (src, &src->conninfo, async)) < 0)

View file

@ -56,7 +56,7 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2_debug);
#define DEFAULT_PROP_DEVICE_NAME NULL
#define DEFAULT_PROP_DEVICE_FD -1
#define DEFAULT_PROP_FLAGS 0
#define DEFAULT_PROP_NORM NULL
#define DEFAULT_PROP_TV_NORM 0
#define DEFAULT_PROP_CHANNEL NULL
#define DEFAULT_PROP_FREQUENCY 0
@ -316,6 +316,58 @@ gst_v4l2_device_get_type (void)
return v4l2_device_type;
}
#define GST_TYPE_V4L2_TV_NORM (gst_v4l2_tv_norm_get_type ())
static GType
gst_v4l2_tv_norm_get_type (void)
{
static GType v4l2_tv_norm = 0;
if (!v4l2_tv_norm) {
static const GEnumValue tv_norms[] = {
{0, "none", "none"},
{V4L2_STD_NTSC, "NTSC", "NTSC"},
{V4L2_STD_NTSC_M, "NTSC-M", "NTSC-M"},
{V4L2_STD_NTSC_M_JP, "NTSC-M-JP", "NTSC-M-JP"},
{V4L2_STD_NTSC_M_KR, "NTSC-M-KR", "NTSC-M-KR"},
{V4L2_STD_NTSC_443, "NTSC-443", "NTSC-443"},
{V4L2_STD_PAL, "PAL", "PAL"},
{V4L2_STD_PAL_BG, "PAL-BG", "PAL-BG"},
{V4L2_STD_PAL_B, "PAL-B", "PAL-B"},
{V4L2_STD_PAL_B1, "PAL-B1", "PAL-B1"},
{V4L2_STD_PAL_G, "PAL-G", "PAL-G"},
{V4L2_STD_PAL_H, "PAL-H", "PAL-H"},
{V4L2_STD_PAL_I, "PAL-I", "PAL-I"},
{V4L2_STD_PAL_DK, "PAL-DK", "PAL-DK"},
{V4L2_STD_PAL_D, "PAL-D", "PAL-D"},
{V4L2_STD_PAL_D1, "PAL-D1", "PAL-D1"},
{V4L2_STD_PAL_K, "PAL-K", "PAL-K"},
{V4L2_STD_PAL_M, "PAL-M", "PAL-M"},
{V4L2_STD_PAL_N, "PAL-N", "PAL-N"},
{V4L2_STD_PAL_Nc, "PAL-Nc", "PAL-Nc"},
{V4L2_STD_PAL_60, "PAL-60", "PAL-60"},
{V4L2_STD_SECAM, "SECAM", "SECAM"},
{V4L2_STD_SECAM_B, "SECAM-B", "SECAM-B"},
{V4L2_STD_SECAM_G, "SECAM-G", "SECAM-G"},
{V4L2_STD_SECAM_H, "SECAM-H", "SECAM-H"},
{V4L2_STD_SECAM_DK, "SECAM-DK", "SECAM-DK"},
{V4L2_STD_SECAM_D, "SECAM-D", "SECAM-D"},
{V4L2_STD_SECAM_K, "SECAM-K", "SECAM-K"},
{V4L2_STD_SECAM_K1, "SECAM-K1", "SECAM-K1"},
{V4L2_STD_SECAM_L, "SECAM-L", "SECAM-L"},
{V4L2_STD_SECAM_LC, "SECAM-Lc", "SECAM-Lc"},
{0, NULL, NULL}
};
v4l2_tv_norm = g_enum_register_static ("V4L2_TV_norms", tv_norms);
}
return v4l2_tv_norm;
}
void
gst_v4l2_object_install_properties_helper (GObjectClass * gobject_class,
const char *default_device)
@ -384,6 +436,19 @@ gst_v4l2_object_install_properties_helper (GObjectClass * gobject_class,
"Hue or color balance", G_MININT,
G_MAXINT, 0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
/**
* GstV4l2Src:norm
*
* TV norm
*
* Since: 0.10.30
*/
g_object_class_install_property (gobject_class, PROP_TV_NORM,
g_param_spec_enum ("norm", "TV norm",
"video standard",
GST_TYPE_V4L2_TV_NORM, DEFAULT_PROP_TV_NORM,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
GstV4l2Object *
@ -440,9 +505,6 @@ gst_v4l2_object_destroy (GstV4l2Object * v4l2object)
if (v4l2object->channel)
g_free (v4l2object->channel);
if (v4l2object->norm)
g_free (v4l2object->norm);
if (v4l2object->formats) {
gst_v4l2_object_clear_format_list (v4l2object);
}
@ -510,23 +572,10 @@ gst_v4l2_object_set_property_helper (GstV4l2Object * v4l2object,
return TRUE;
}
break;
#if 0
case PROP_NORM:
if (GST_V4L2_IS_OPEN (v4l2object)) {
GstTuner *tuner = GST_TUNER (v4l2object->element);
GstTunerNorm *norm = gst_tuner_find_norm_by_name (tuner,
(gchar *) g_value_get_string (value));
if (norm) {
/* like gst_tuner_set_norm (tuner, norm)
without g_object_notify */
gst_v4l2_tuner_set_norm (v4l2object, norm);
}
} else {
g_free (v4l2object->norm);
v4l2object->norm = g_value_dup_string (value);
}
case PROP_TV_NORM:
v4l2object->tv_norm = g_value_get_enum (value);
break;
#if 0
case PROP_CHANNEL:
if (GST_V4L2_IS_OPEN (v4l2object)) {
GstTuner *tuner = GST_TUNER (v4l2object->element);
@ -631,6 +680,9 @@ gst_v4l2_object_get_property_helper (GstV4l2Object * v4l2object,
return TRUE;
}
break;
case PROP_TV_NORM:
g_value_set_enum (value, v4l2object->tv_norm);
break;
default:
return FALSE;
break;
@ -650,16 +702,18 @@ gst_v4l2_set_defaults (GstV4l2Object * v4l2object)
tuner = GST_TUNER (v4l2object->element);
if (v4l2object->norm)
norm = gst_tuner_find_norm_by_name (tuner, v4l2object->norm);
if (v4l2object->tv_norm)
norm = gst_v4l2_tuner_get_norm_by_std_id (v4l2object, v4l2object->tv_norm);
GST_DEBUG_OBJECT (v4l2object->element, "tv_norm=%d, norm=%p",
v4l2object->tv_norm, norm);
if (norm) {
gst_tuner_set_norm (tuner, norm);
} else {
norm =
GST_TUNER_NORM (gst_tuner_get_norm (GST_TUNER (v4l2object->element)));
if (norm) {
g_free (v4l2object->norm);
v4l2object->norm = g_strdup (norm->label);
v4l2object->tv_norm =
gst_v4l2_tuner_get_std_id_by_norm (v4l2object, norm);
gst_tuner_norm_changed (tuner, norm);
}
}
@ -1887,13 +1941,15 @@ default_frame_sizes:
}
/* Since we can't get framerate directly, try to use the current norm */
if (v4l2object->norm && v4l2object->norms) {
if (v4l2object->tv_norm && v4l2object->norms) {
GList *norms;
GstTunerNorm *norm = NULL;
GstTunerNorm *current =
gst_v4l2_tuner_get_norm_by_std_id (v4l2object, v4l2object->tv_norm);
for (norms = v4l2object->norms; norms != NULL; norms = norms->next) {
norm = (GstTunerNorm *) norms->data;
if (!strcmp (norm->label, v4l2object->norm))
if (!strcmp (norm->label, current->label))
break;
}
/* If it's possible, set framerate to that (discrete) value */

View file

@ -108,7 +108,7 @@ struct _GstV4l2Object {
GList *channels;
/* properties */
gchar *norm;
v4l2_std_id tv_norm;
gchar *channel;
gulong frequency;
@ -133,11 +133,12 @@ GType gst_v4l2_object_get_type (void);
PROP_DEVICE, \
PROP_DEVICE_NAME, \
PROP_DEVICE_FD, \
PROP_FLAGS, \
PROP_FLAGS, \
PROP_BRIGHTNESS, \
PROP_CONTRAST, \
PROP_SATURATION, \
PROP_HUE
PROP_HUE, \
PROP_TV_NORM
/* create/destroy */
GstV4l2Object * gst_v4l2_object_new (GstElement * element,

View file

@ -55,6 +55,7 @@
#include "gstv4l2colorbalance.h"
#include "gstv4l2tuner.h"
#ifdef HAVE_XVIDEO
#include "gstv4l2xoverlay.h"
#endif
@ -91,6 +92,7 @@ enum
GST_IMPLEMENT_V4L2_PROBE_METHODS (GstV4l2SinkClass, gst_v4l2sink);
GST_IMPLEMENT_V4L2_COLOR_BALANCE_METHODS (GstV4l2Sink, gst_v4l2sink);
GST_IMPLEMENT_V4L2_TUNER_METHODS (GstV4l2Sink, gst_v4l2sink);
#ifdef HAVE_XVIDEO
GST_IMPLEMENT_V4L2_XOVERLAY_METHODS (GstV4l2Sink, gst_v4l2sink);
#endif
@ -105,10 +107,10 @@ gst_v4l2sink_iface_supported (GstImplementsInterface * iface, GType iface_type)
g_assert (iface_type == GST_TYPE_X_OVERLAY ||
iface_type == GST_TYPE_NAVIGATION ||
iface_type == GST_TYPE_COLOR_BALANCE ||
iface_type == GST_TYPE_VIDEO_ORIENTATION);
iface_type == GST_TYPE_VIDEO_ORIENTATION || iface_type == GST_TYPE_TUNER);
#else
g_assert (iface_type == GST_TYPE_COLOR_BALANCE ||
iface_type == GST_TYPE_VIDEO_ORIENTATION);
iface_type == GST_TYPE_VIDEO_ORIENTATION || iface_type == GST_TYPE_TUNER);
#endif
if (v4l2object->video_fd == -1)
@ -151,6 +153,11 @@ gst_v4l2sink_init_interfaces (GType type)
NULL,
NULL,
};
static const GInterfaceInfo v4l2_tuner_info = {
(GInterfaceInitFunc) gst_v4l2sink_tuner_interface_init,
NULL,
NULL,
};
#ifdef HAVE_XVIDEO
static const GInterfaceInfo v4l2_xoverlay_info = {
(GInterfaceInitFunc) gst_v4l2sink_xoverlay_interface_init,
@ -181,6 +188,7 @@ gst_v4l2sink_init_interfaces (GType type)
g_type_add_interface_static (type,
GST_TYPE_IMPLEMENTS_INTERFACE, &v4l2iface_info);
g_type_add_interface_static (type, GST_TYPE_TUNER, &v4l2_tuner_info);
#ifdef HAVE_XVIDEO
g_type_add_interface_static (type, GST_TYPE_X_OVERLAY, &v4l2_xoverlay_info);
g_type_add_interface_static (type,

View file

@ -237,7 +237,6 @@ gst_v4l2_tuner_set_norm (GstV4l2Object * v4l2object, GstTunerNorm * norm)
GstTunerNorm *
gst_v4l2_tuner_get_norm (GstV4l2Object * v4l2object)
{
GList *item;
v4l2_std_id norm;
/* assert that we're opened and that we're using a known item */
@ -245,6 +244,14 @@ gst_v4l2_tuner_get_norm (GstV4l2Object * v4l2object)
gst_v4l2_get_norm (v4l2object, &norm);
return gst_v4l2_tuner_get_norm_by_std_id (v4l2object, norm);
}
GstTunerNorm *
gst_v4l2_tuner_get_norm_by_std_id (GstV4l2Object * v4l2object, v4l2_std_id norm)
{
GList *item;
for (item = v4l2object->norms; item != NULL; item = item->next) {
if (norm & GST_V4L2_TUNER_NORM (item->data)->index)
return (GstTunerNorm *) item->data;
@ -253,6 +260,20 @@ gst_v4l2_tuner_get_norm (GstV4l2Object * v4l2object)
return NULL;
}
v4l2_std_id
gst_v4l2_tuner_get_std_id_by_norm (GstV4l2Object * v4l2object,
GstTunerNorm * norm)
{
GList *item;
for (item = v4l2object->norms; item != NULL; item = item->next) {
if (norm == GST_TUNER_NORM (item->data))
return GST_V4L2_TUNER_NORM (item->data)->index;
}
return 0;
}
void
gst_v4l2_tuner_set_frequency_and_notify (GstV4l2Object * v4l2object,
GstTunerChannel * channel, gulong frequency)

View file

@ -94,6 +94,11 @@ void gst_v4l2_tuner_set_norm_and_notify (GstV4l2Object * v4l2o
GstTunerNorm* gst_v4l2_tuner_get_norm (GstV4l2Object * v4l2object);
gboolean gst_v4l2_tuner_set_norm (GstV4l2Object * v4l2object,
GstTunerNorm * norm);
GstTunerNorm* gst_v4l2_tuner_get_norm_by_std_id (GstV4l2Object * v4l2object,
v4l2_std_id norm);
v4l2_std_id gst_v4l2_tuner_get_std_id_by_norm (GstV4l2Object * v4l2object,
GstTunerNorm * norm);
/* frequency */
void gst_v4l2_tuner_set_frequency_and_notify (GstV4l2Object * v4l2object,
GstTunerChannel * channel,

View file

@ -229,6 +229,9 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
standard.frameperiod.denominator, standard.frameperiod.numerator);
v4l2norm->index = standard.id;
GST_DEBUG_OBJECT (v4l2object->element, "index=%08x, label=%s",
(unsigned int) v4l2norm->index, norm->label);
v4l2object->norms = g_list_prepend (v4l2object->norms, (gpointer) norm);
}
v4l2object->norms = g_list_reverse (v4l2object->norms);