Merge remote-tracking branch 'origin/master' into 0.11
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 2 Dec 2011 11:10:17 +0000 (11:10 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 2 Dec 2011 11:10:17 +0000 (11:10 +0000)
Conflicts:
gst-libs/gst/netbuffer/gstnetbuffer.c
gst/ffmpegcolorspace/avcodec.h
gst/ffmpegcolorspace/gstffmpegcodecmap.c
gst/ffmpegcolorspace/imgconvert.c
gst/ffmpegcolorspace/imgconvert_template.h
gst/ffmpegcolorspace/mem.c
gst/playback/README
gst/playback/gstplaybasebin.c
gst/playback/gstplaybasebin.h
gst/playback/gstplaybin.c
sys/v4l/v4lmjpegsrc_calls.c
sys/v4l/videodev_mjpeg.h
tests/check/elements/gnomevfssink.c

57 files changed:
1  2 
docs/design/design-decodebin.txt
docs/design/design-encoding.txt
ext/alsa/gstalsamixer.c
ext/libvisual/visual.c
ext/ogg/gstoggdemux.c
ext/theora/gsttheoradec.c
ext/theora/gsttheoradec.h
ext/theora/gsttheoraparse.c
ext/vorbis/gstvorbisdec.c
gst-libs/gst/app/gstappsink.c
gst-libs/gst/app/gstappsrc.c
gst-libs/gst/app/gstappsrc.h
gst-libs/gst/audio/audio.c
gst-libs/gst/audio/gstaudiobasesink.c
gst-libs/gst/audio/gstaudiobasesrc.c
gst-libs/gst/audio/gstaudioencoder.c
gst-libs/gst/audio/gstaudioringbuffer.c
gst-libs/gst/audio/multichannel.h
gst-libs/gst/fft/gstfftf32.c
gst-libs/gst/fft/gstfftf64.c
gst-libs/gst/fft/gstffts16.c
gst-libs/gst/fft/gstffts32.c
gst-libs/gst/interfaces/navigation.c
gst-libs/gst/pbutils/descriptions.c
gst-libs/gst/pbutils/encoding-profile.c
gst-libs/gst/pbutils/encoding-target.h
gst-libs/gst/pbutils/gstdiscoverer-types.c
gst-libs/gst/pbutils/gstdiscoverer.c
gst-libs/gst/rtp/gstrtcpbuffer.c
gst-libs/gst/rtp/gstrtpbaseaudiopayload.c
gst-libs/gst/rtp/gstrtpbuffer.c
gst-libs/gst/rtsp/gstrtspconnection.c
gst-libs/gst/tag/gstexiftag.c
gst-libs/gst/tag/gstvorbistag.c
gst-libs/gst/tag/gstxmptag.c
gst-libs/gst/video/videooverlay.c
gst/adder/gstadder.c
gst/audioconvert/audioconvert.c
gst/audiorate/gstaudiorate.c
gst/audioresample/gstaudioresample.c
gst/audioresample/resample.c
gst/encoding/gststreamsplitter.c
gst/playback/gstdecodebin.c
gst/playback/gstdecodebin2.c
gst/playback/gstplaybin2.c
gst/playback/gstplaysink.c
gst/playback/gsturidecodebin.c
gst/tcp/gstmultifdsink.c
gst/tcp/gsttcp.c
gst/typefind/gsttypefindfunctions.c
gst/videotestsrc/gstvideotestsrc.c
sys/xvimage/xvimagesink.c
sys/xvimage/xvimagesink.h
tests/check/elements/adder.c
tests/check/elements/audioresample.c
tests/check/elements/textoverlay.c
tests/examples/encoding/encoding.c

Simple merge
Simple merge
Simple merge
@@@ -621,11 -548,10 +621,11 @@@ gst_visual_src_query (GstPad * pad, Gst
              GST_TIME_FORMAT " max %" GST_TIME_FORMAT,
              GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency));
  
-         /* the max samples we must buffer buffer */
+         /* the max samples we must buffer */
          max_samples = MAX (VISUAL_SAMPLES, visual->spf);
          our_latency =
 -            gst_util_uint64_scale_int (max_samples, GST_SECOND, visual->rate);
 +            gst_util_uint64_scale_int (max_samples, GST_SECOND,
 +            GST_AUDIO_INFO_RATE (&visual->info));
  
          GST_DEBUG_OBJECT (visual, "Our latency: %" GST_TIME_FORMAT,
              GST_TIME_ARGS (our_latency));
Simple merge
Simple merge
@@@ -69,14 -69,11 +69,14 @@@ struct _GstTheoraDe
    GstClockTime last_timestamp;
    guint64 frame_nr;
    gboolean need_keyframe;
 -  gint width, height;
 +  GstVideoInfo vinfo;
 +
    gint offset_x, offset_y;
    gint output_bpp;
 +  GstBufferPool *pool;
 +  gboolean use_cropping;
  
-   /* telemetry debuging options */
+   /* telemetry debugging options */
    gint telemetry_mv;
    gint telemetry_mbmode;
    gint telemetry_qi;
Simple merge
Simple merge
@@@ -225,14 -285,14 +225,14 @@@ gst_app_sink_class_init (GstAppSinkClas
        NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
    /**
     * GstAppSink::new-preroll:
-    * @appsink: the appsink element that emited the signal
+    * @appsink: the appsink element that emitted the signal
     *
 -   * Signal that a new preroll buffer is available.
 +   * Signal that a new preroll sample is available.
     *
-    * This signal is emited from the steaming thread and only when the
+    * This signal is emitted from the steaming thread and only when the
     * "emit-signals" property is %TRUE.
     *
 -   * The new preroll buffer can be retrieved with the "pull-preroll" action
 +   * The new preroll sample can be retrieved with the "pull-preroll" action
     * signal or gst_app_sink_pull_preroll() either from this signal callback
     * or from any other thread.
     *
        G_STRUCT_OFFSET (GstAppSinkClass, new_preroll),
        NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
    /**
 -   * GstAppSink::new-buffer:
 -   * @appsink: the appsink element that emitted the signal
 -   *
 -   * Signal that a new buffer is available.
 -   *
 -   * This signal is emitted from the steaming thread and only when the
 -   * "emit-signals" property is %TRUE.
 -   *
 -   * The new buffer can be retrieved with the "pull-buffer" action
 -   * signal or gst_app_sink_pull_buffer() either from this signal callback
 -   * or from any other thread.
 -   *
 -   * Note that this signal is only emitted when the "emit-signals" property is
 -   * set to %TRUE, which it is not by default for performance reasons.
 -   */
 -  gst_app_sink_signals[SIGNAL_NEW_BUFFER] =
 -      g_signal_new ("new-buffer", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
 -      G_STRUCT_OFFSET (GstAppSinkClass, new_buffer),
 -      NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
 -  /**
 -   * GstAppSink::new-buffer-list:
 -   * @appsink: the appsink element that emitted the signal
 +   * GstAppSink::new-sample:
 +   * @appsink: the appsink element that emited the signal
     *
 -   * Signal that a new bufferlist is available.
 +   * Signal that a new sample is available.
     *
-    * This signal is emited from the steaming thread and only when the
+    * This signal is emitted from the steaming thread and only when the
     * "emit-signals" property is %TRUE.
     *
 -   * The new buffer can be retrieved with the "pull-buffer-list" action
 -   * signal or gst_app_sink_pull_buffer_list() either from this signal callback
 +   * The new sample can be retrieved with the "pull-sample" action
 +   * signal or gst_app_sink_pull_sample() either from this signal callback
     * or from any other thread.
     *
-    * Note that this signal is only emited when the "emit-signals" property is
+    * Note that this signal is only emitted when the "emit-signals" property is
     * set to %TRUE, which it is not by default for performance reasons.
     */
 -  gst_app_sink_signals[SIGNAL_NEW_BUFFER_LIST] =
 -      g_signal_new ("new-buffer-list", G_TYPE_FROM_CLASS (klass),
 -      G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstAppSinkClass, new_buffer_list),
 +  gst_app_sink_signals[SIGNAL_NEW_SAMPLE] =
 +      g_signal_new ("new-sample", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
 +      G_STRUCT_OFFSET (GstAppSinkClass, new_sample),
        NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE);
  
    /**
Simple merge
Simple merge
@@@ -614,15 -704,13 +614,15 @@@ done
  /**
   * gst_audio_buffer_clip:
   * @buffer: The buffer to clip.
 - * @segment: Segment in %GST_FORMAT_TIME or %GST_FORMAT_DEFAULT to which the buffer should be clipped.
 + * @segment: Segment in %GST_FORMAT_TIME or %GST_FORMAT_DEFAULT to which
 + *           the buffer should be clipped.
   * @rate: sample rate.
 - * @frame_size: size of one audio frame in bytes.
 + * @bpf: size of one audio frame in bytes. This is the size of one sample
 + * * channels.
   *
-  * Clip the the buffer to the given %GstSegment.
+  * Clip the buffer to the given %GstSegment.
   *
 - * After calling this function the caller does not own a reference to 
 + * After calling this function the caller does not own a reference to
   * @buffer anymore.
   *
   * Returns: %NULL if the buffer is completely outside the configured segment,
Simple merge
@@@ -895,9 -893,9 +895,9 @@@ gst_audio_base_src_create (GstBaseSrc 
  
          /* the running_time converted to a sample (relative to the ringbuffer) */
          running_time_sample =
 -            gst_util_uint64_scale_int (running_time, spec->rate, GST_SECOND);
 +            gst_util_uint64_scale_int (running_time, rate, GST_SECOND);
  
-         /* the segmentnr corrensponding to running_time, round down */
+         /* the segmentnr corresponding to running_time, round down */
          running_time_segment = running_time_sample / sps;
  
          /* the segment currently read from the ringbuffer */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -36,10 -36,10 +36,10 @@@ G_BEGIN_DECL
   * GST_ENCODING_CATEGORY_DEVICE:
   *
   * #GstEncodingTarget category for device-specific targets.
-  * The name of the target will usually be the contructor and model of the device,
+  * The name of the target will usually be the constructor and model of the device,
   * and that target will contain #GstEncodingProfiles suitable for that device.
   */
 -#define GST_ENCODING_CATEGORY_DEVICE          "device"
 +#define GST_ENCODING_CATEGORY_DEVICE            "device"
  
  /**
   * GST_ENCODING_CATEGORY_ONLINE_SERVICE:
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1193,22 -1172,23 +1193,22 @@@ gst_adder_collected (GstCollectPads * p
       * - currently we just set rate as received from last seek-event
       *
       * When seeking we set the start and stop positions as given in the seek
-      * event. We also adjust offset & timestamp acordingly.
+      * event. We also adjust offset & timestamp accordingly.
       * This basically ignores all newsegments sent by upstream.
       */
 -    event = gst_event_new_new_segment_full (FALSE, adder->segment_rate,
 -        1.0, GST_FORMAT_TIME, adder->segment_start, adder->segment_end,
 -        adder->segment_start);
 -    if (adder->segment_rate > 0.0) {
 -      adder->timestamp = adder->segment_start;
 +    event = gst_event_new_segment (&adder->segment);
 +
 +    if (adder->segment.rate > 0.0) {
 +      adder->segment.position = adder->segment.start;
      } else {
 -      adder->timestamp = adder->segment_end;
 +      adder->segment.position = adder->segment.stop;
      }
 -    adder->offset = gst_util_uint64_scale (adder->timestamp,
 -        adder->rate, GST_SECOND);
 +    adder->offset = gst_util_uint64_scale (adder->segment.position,
 +        rate, GST_SECOND);
      GST_INFO_OBJECT (adder, "seg_start %" G_GUINT64_FORMAT ", seg_end %"
 -        G_GUINT64_FORMAT, adder->segment_start, adder->segment_end);
 +        G_GUINT64_FORMAT, adder->segment.start, adder->segment.stop);
      GST_INFO_OBJECT (adder, "timestamp %" G_GINT64_FORMAT ",new offset %"
 -        G_GINT64_FORMAT, adder->timestamp, adder->offset);
 +        G_GINT64_FORMAT, adder->segment.position, adder->offset);
  
      if (event) {
        if (!gst_pad_push_event (adder->srcpad, event)) {
Simple merge
Simple merge
@@@ -62,18 -62,48 +62,18 @@@ GST_DEBUG_CATEGORY (audio_resample_debu
  enum
  {
    PROP_0,
 -  PROP_QUALITY,
 -  PROP_FILTER_LENGTH
 +  PROP_QUALITY
  };
  
 +#if G_BYTE_ORDER == G_LITTLE_ENDIAN
  #define SUPPORTED_CAPS \
 -GST_STATIC_CAPS ( \
 -    "audio/x-raw-float, " \
 -      "rate = (int) [ 1, MAX ], "     \
 -      "channels = (int) [ 1, MAX ], " \
 -      "endianness = (int) BYTE_ORDER, " \
 -      "width = (int) { 32, 64 }; " \
 -    "audio/x-raw-int, " \
 -      "rate = (int) [ 1, MAX ], " \
 -      "channels = (int) [ 1, MAX ], " \
 -      "endianness = (int) BYTE_ORDER, " \
 -      "width = (int) 32, " \
 -      "depth = (int) 32, " \
 -      "signed = (boolean) true; " \
 -    "audio/x-raw-int, " \
 -      "rate = (int) [ 1, MAX ], " \
 -      "channels = (int) [ 1, MAX ], " \
 -      "endianness = (int) BYTE_ORDER, " \
 -      "width = (int) 24, " \
 -      "depth = (int) 24, " \
 -      "signed = (boolean) true; " \
 -    "audio/x-raw-int, " \
 -      "rate = (int) [ 1, MAX ], " \
 -      "channels = (int) [ 1, MAX ], " \
 -      "endianness = (int) BYTE_ORDER, " \
 -      "width = (int) 16, " \
 -      "depth = (int) 16, " \
 -      "signed = (boolean) true; " \
 -    "audio/x-raw-int, " \
 -      "rate = (int) [ 1, MAX ], " \
 -      "channels = (int) [ 1, MAX ], " \
 -      "endianness = (int) BYTE_ORDER, " \
 -      "width = (int) 8, " \
 -      "depth = (int) 8, " \
 -      "signed = (boolean) true" \
 -)
 +  GST_AUDIO_CAPS_MAKE ("{ F32LE, F64LE, S32LE, S24LE, S16LE, S8 }")
 +#else
 +#define SUPPORTED_CAPS \
 +  GST_AUDIO_CAPS_MAKE ("{ F32BE, F64BE, S32BE, S24BE, S16BE, S8 }")
 +#endif
  
- /* If TRUE integer arithmetic resampling is faster and will be used if appropiate */
+ /* If TRUE integer arithmetic resampling is faster and will be used if appropriate */
  #if defined AUDIORESAMPLE_FORMAT_INT
  static gboolean gst_audio_resample_use_int = TRUE;
  #elif defined AUDIORESAMPLE_FORMAT_FLOAT
Simple merge
Simple merge
Simple merge
@@@ -714,12 -753,12 +714,12 @@@ gst_decode_bin_class_init (GstDecodeBin
     * @caps: The #GstCaps.
     * @factory: A #GstElementFactory to use.
     *
 -   * This signal is emitted once decodebin2 has found all the possible
 +   * This signal is emitted once decodebin has found all the possible
     * #GstElementFactory that can be used to handle the given @caps. For each of
-    * those factories, this signal is emited.
+    * those factories, this signal is emitted.
     *
     * The signal handler should return a #GST_TYPE_AUTOPLUG_SELECT_RESULT enum
 -   * value indicating what decodebin2 should do next.
 +   * value indicating what decodebin should do next.
     *
     * A value of #GST_AUTOPLUG_SELECT_TRY will try to autoplug an element from
     * @factory.
            DEFAULT_HIGH_PERCENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
  
    /**
 -   * GstDecodebin2:max-size-bytes
 +   * GstDecodeBin:max-size-bytes
     *
-    * Max amount amount of bytes in the queue (0=automatic).
+    * Max amount of bytes in the queue (0=automatic).
     *
     * Since: 0.10.26
     */
            0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES,
            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
    /**
 -   * GstDecodebin2:max-size-buffers
 +   * GstDecodeBin:max-size-buffers
     *
-    * Max amount amount of buffers in the queue (0=automatic).
+    * Max amount of buffers in the queue (0=automatic).
     *
     * Since: 0.10.26
     */
            0, G_MAXUINT, DEFAULT_MAX_SIZE_BUFFERS,
            G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
    /**
 -   * GstDecodebin2:max-size-time
 +   * GstDecodeBin:max-size-time
     *
-    * Max amount amount of time in the queue (in ns, 0=automatic).
+    * Max amount of time in the queue (in ns, 0=automatic).
     *
     * Since: 0.10.26
     */
Simple merge
Simple merge
@@@ -571,10 -582,10 +571,10 @@@ gst_uri_decode_bin_class_init (GstURIDe
     *
     * This signal is emitted once uridecodebin has found all the possible
     * #GstElementFactory that can be used to handle the given @caps. For each of
-    * those factories, this signal is emited.
+    * those factories, this signal is emitted.
     *
     * The signal handler should return a #GST_TYPE_AUTOPLUG_SELECT_RESULT enum
 -   * value indicating what decodebin2 should do next.
 +   * value indicating what decodebin should do next.
     *
     * A value of #GST_AUTOPLUG_SELECT_TRY will try to autoplug an element from
     * @factory.
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -790,10 -775,10 +790,10 @@@ fakesink_handoff_cb (GstElement * objec
  
    ctx->out_buffer_count++;
    if (ctx->latency == GST_CLOCK_TIME_NONE) {
 -    ctx->latency = 1000 - GST_BUFFER_SIZE (buffer) / 8;
 +    ctx->latency = 1000 - gst_buffer_get_size (buffer) / 8;
    }
  
-   /* Check if we have a perfectly timestampped stream */
+   /* Check if we have a perfectly timestamped stream */
    if (ctx->next_out_ts != GST_CLOCK_TIME_NONE)
      fail_unless (ctx->next_out_ts == GST_BUFFER_TIMESTAMP (buffer),
          "expected timestamp %" GST_TIME_FORMAT " got timestamp %"
Simple merge
Simple merge