Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 22 Aug 2011 10:33:35 +0000 (12:33 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 22 Aug 2011 10:33:35 +0000 (12:33 +0200)
Conflicts:
gst/gstbuffer.h
gst/gstcaps.c
gst/gstcaps.h
gst/gstevent.c

1  2 
gst/gst.c
gst/gstbuffer.h
gst/gstcaps.c
gst/gstdebugutils.c
gst/gstelement.c
gst/gstelement.h
gst/gstelementfactory.c
gst/gstevent.c
gst/gstobject.c
libs/gst/base/gstbaseparse.c

diff --cc gst/gst.c
Simple merge
diff --cc gst/gstbuffer.h
@@@ -379,14 -408,15 +379,14 @@@ typedef enum 
   * GST_BUFFER_COPY_ALL:
   *
   * Combination of all possible fields that can be copied with
 - * gst_buffer_copy_metadata().
 - *
 - * Since: 0.10.13
 + * gst_buffer_copy_into().
   */
- #define GST_BUFFER_COPY_ALL  (GST_BUFFER_COPY_METADATA | GST_BUFFER_COPY_MEMORY)
 -#define GST_BUFFER_COPY_ALL ((GstBufferCopyFlags) (GST_BUFFER_COPY_FLAGS | GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_CAPS))
++#define GST_BUFFER_COPY_ALL  ((GstBufferCopyFlags)(GST_BUFFER_COPY_METADATA | GST_BUFFER_COPY_MEMORY))
  
 -/* copies metadata into newly allocated buffer */
 -void            gst_buffer_copy_metadata        (GstBuffer *dest, const GstBuffer *src,
 -                                                 GstBufferCopyFlags flags);
 +/* copies memory or metadata into newly allocated buffer */
 +void            gst_buffer_copy_into            (GstBuffer *dest, GstBuffer *src,
 +                                                 GstBufferCopyFlags flags,
 +                                                 gsize offset, gsize size);
  
  /**
   * gst_buffer_is_writable:
diff --cc gst/gstcaps.c
@@@ -1180,14 -1303,14 +1180,14 @@@ gst_caps_intersect_zig_zag (const GstCa
     * the structures diagonally down, then we iterate over the caps2
     * structures.
     */
 -  len1 = caps1->structs->len;
 -  len2 = caps2->structs->len;
 +  len1 = GST_CAPS_LEN (caps1);
 +  len2 = GST_CAPS_LEN (caps2);
    for (i = 0; i < len1 + len2 - 1; i++) {
 -    /* caps1 index goes from 0 to caps1->structs->len-1 */
 +    /* caps1 index goes from 0 to GST_CAPS_LEN (caps1)-1 */
      j = MIN (i, len1 - 1);
 -    /* caps2 index stays 0 until i reaches caps1->structs->len, then it counts
 -     * up from 1 to caps2->structs->len - 1 */
 +    /* caps2 index stays 0 until i reaches GST_CAPS_LEN (caps1), then it counts
 +     * up from 1 to GST_CAPS_LEN (caps2) - 1 */
-     k = MAX (0, i - j);
+     k = (i > j) ? (i - j) : 0;  /* MAX (0, i - j) */
  
      /* now run the diagonal line, end condition is the left or bottom
       * border */
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc gst/gstevent.c
@@@ -801,9 -774,9 +801,9 @@@ gst_event_parse_buffer_size (GstEvent 
    g_return_if_fail (GST_IS_EVENT (event));
    g_return_if_fail (GST_EVENT_TYPE (event) == GST_EVENT_BUFFERSIZE);
  
 -  structure = event->structure;
 +  structure = GST_EVENT_STRUCTURE (event);
    if (format)
-     *format =
+     *format = (GstFormat)
          g_value_get_enum (gst_structure_id_get_value (structure,
              GST_QUARK (FORMAT)));
    if (minsize)
@@@ -917,9 -938,9 +917,9 @@@ gst_event_parse_qos (GstEvent * event, 
    g_return_if_fail (GST_IS_EVENT (event));
    g_return_if_fail (GST_EVENT_TYPE (event) == GST_EVENT_QOS);
  
 -  structure = event->structure;
 +  structure = GST_EVENT_STRUCTURE (event);
    if (type)
-     *type =
+     *type = (GstQOSType)
          g_value_get_enum (gst_structure_id_get_value (structure,
              GST_QUARK (TYPE)));
    if (proportion)
@@@ -1211,9 -1232,10 +1211,10 @@@ gst_event_parse_step (GstEvent * event
    g_return_if_fail (GST_IS_EVENT (event));
    g_return_if_fail (GST_EVENT_TYPE (event) == GST_EVENT_STEP);
  
 -  structure = event->structure;
 +  structure = GST_EVENT_STRUCTURE (event);
    if (format)
-     *format = g_value_get_enum (gst_structure_id_get_value (structure,
+     *format =
+         (GstFormat) g_value_get_enum (gst_structure_id_get_value (structure,
              GST_QUARK (FORMAT)));
    if (amount)
      *amount = g_value_get_uint64 (gst_structure_id_get_value (structure,
diff --cc gst/gstobject.c
Simple merge
@@@ -1583,10 -1559,8 +1583,10 @@@ gst_base_parse_check_media (GstBasePars
      /* historical default */
      parse->priv->is_video = FALSE;
    }
 +  if (caps)
 +    gst_caps_unref (caps);
  
-   GST_DEBUG_OBJECT (parse, "media is video == %d", parse->priv->is_video);
+   GST_DEBUG_OBJECT (parse, "media is video: %d", parse->priv->is_video);
  }
  
  /* takes ownership of frame */