Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 2 Jun 2011 10:18:13 +0000 (12:18 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 2 Jun 2011 10:18:13 +0000 (12:18 +0200)
Conflicts:
gst-libs/gst/video/video.h
gst/playback/gstplaysinkaudioconvert.c
gst/playback/gstplaysinkvideoconvert.c
tests/check/libs/rtp.c

1  2 
configure.ac
gst-libs/gst/video/video.h
gst/volume/gstvolume.c
tests/check/elements/ffmpegcolorspace.c
tests/check/elements/volume.c
tests/check/elements/vorbistag.c
tests/check/libs/libsabi.c
tests/check/libs/rtp.c
win32/common/libgstvideo.def

diff --cc configure.ac
Simple merge
@@@ -436,67 -436,139 +436,137 @@@ typedef enum 
  #define GST_VIDEO_BUFFER_PROGRESSIVE GST_BUFFER_FLAG_MEDIA4
  
  /* functions */
- const GValue *gst_video_frame_rate (GstPad *pad);
- gboolean gst_video_get_size   (GstPad *pad,
-                                gint   *width,
-                                gint   *height);
- gboolean gst_video_calculate_display_ratio (guint *dar_n, guint *dar_d,
-             guint video_width, guint video_height, 
-             guint video_par_n, guint video_par_d, 
-             guint display_par_n, guint display_par_d);
- gboolean gst_video_format_parse_caps (const GstCaps *caps,
-     GstVideoFormat *format, int *width, int *height);
- gboolean gst_video_format_parse_caps_interlaced (GstCaps *caps, gboolean *interlaced);
- gboolean gst_video_parse_caps_framerate (GstCaps *caps,
-     int *fps_n, int *fps_d);
- gboolean gst_video_parse_caps_pixel_aspect_ratio (GstCaps *caps,
-     int *par_n, int *par_d);
- const char *gst_video_parse_caps_color_matrix (GstCaps * caps);
- const char *gst_video_parse_caps_chroma_site (GstCaps * caps);
- GstBuffer *gst_video_parse_caps_palette (GstCaps * caps);
- GstCaps * gst_video_format_new_caps (GstVideoFormat format,
-     int width, int height, int framerate_n, int framerate_d,
-     int par_n, int par_d);
- GstCaps * gst_video_format_new_caps_interlaced (GstVideoFormat format,
-     int width, int height, int framerate_n, int framerate_d,
-     int par_n, int par_d, gboolean interlaced);
- GstCaps * gst_video_format_new_template_caps (GstVideoFormat format);
- GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc);
- guint32 gst_video_format_to_fourcc (GstVideoFormat format);
- gboolean gst_video_format_is_rgb (GstVideoFormat format);
- gboolean gst_video_format_is_yuv (GstVideoFormat format);
- gboolean gst_video_format_is_gray (GstVideoFormat format);
- gboolean gst_video_format_has_alpha (GstVideoFormat format);
- int gst_video_format_get_component_depth (GstVideoFormat format, int component);
- int gst_video_format_get_row_stride (GstVideoFormat format, int component,
-     int width);
- int gst_video_format_get_pixel_stride (GstVideoFormat format, int component);
- int gst_video_format_get_component_width (GstVideoFormat format, int component,
-     int width);
- int gst_video_format_get_component_height (GstVideoFormat format, int component,
-     int height);
- int gst_video_format_get_component_offset (GstVideoFormat format, int component,
-     int width, int height);
- int gst_video_format_get_size (GstVideoFormat format, int width, int height);
- gboolean gst_video_get_size_from_caps (const GstCaps * caps, gint * size);
- gboolean gst_video_format_convert (GstVideoFormat format, int width, int height,
-     int fps_n, int fps_d,
-     GstFormat src_format, gint64 src_value,
-     GstFormat dest_format, gint64 * dest_value);
- GstEvent *gst_video_event_new_still_frame (gboolean in_still);
- gboolean gst_video_event_parse_still_frame (GstEvent *event, gboolean *in_still);
- GstBuffer *gst_video_convert_frame(GstBuffer *buf, GstCaps *from_caps, const GstCaps *to_caps,
-                                  GstClockTime timeout, GError **error);
--
- typedef void (*GstVideoConvertFrameCallback) (GstBuffer *buf, GError *error, gpointer user_data);
- void gst_video_convert_frame_async(GstBuffer *buf, GstCaps *from_caps, const GstCaps *to_caps,
-                                  GstClockTime timeout, GstVideoConvertFrameCallback callback,
-                                    gpointer user_data, GDestroyNotify destroy_notify);
+ const GValue * gst_video_frame_rate (GstPad * pad);
  
 -
+ gboolean       gst_video_get_size   (GstPad * pad,
+                                      gint   * width,
+                                      gint   * height);
+ gboolean       gst_video_calculate_display_ratio (guint * dar_n,
+                                                   guint * dar_d,
+                                                   guint   video_width,
+                                                   guint   video_height,
+                                                   guint   video_par_n,
+                                                   guint   video_par_d,
+                                                   guint   display_par_n,
+                                                   guint   display_par_d);
+ gboolean       gst_video_format_parse_caps (const GstCaps  * caps,
+                                             GstVideoFormat * format,
+                                             int            * width,
+                                             int            * height);
+ gboolean       gst_video_format_parse_caps_interlaced  (GstCaps  * caps,
+                                                         gboolean * interlaced);
+ gboolean       gst_video_parse_caps_pixel_aspect_ratio (GstCaps  * caps,
+                                                         int      * par_n,
+                                                         int      * par_d);
+ gboolean       gst_video_parse_caps_framerate    (GstCaps * caps,
+                                                   int     * fps_n,
+                                                   int     * fps_d);
+ const char *   gst_video_parse_caps_color_matrix (GstCaps * caps);
+ const char *   gst_video_parse_caps_chroma_site  (GstCaps * caps);
+ GstBuffer *    gst_video_parse_caps_palette      (GstCaps * caps);
+ /* create caps given format and details */
+ GstCaps *      gst_video_format_new_caps (GstVideoFormat format,
+                                           int width, int height,
+                                           int framerate_n,
+                                           int framerate_d,
+                                           int par_n, int par_d);
+ GstCaps *      gst_video_format_new_caps_interlaced (GstVideoFormat format,
+                                                      int width, int height,
+                                                      int framerate_n,
+                                                      int framerate_d,
+                                                      int par_n, int par_d,
+                                                      gboolean interlaced);
+ GstCaps *      gst_video_format_new_template_caps (GstVideoFormat format);
+ /* format properties */
+ GstVideoFormat gst_video_format_from_fourcc (guint32 fourcc) G_GNUC_CONST;
+ guint32        gst_video_format_to_fourcc (GstVideoFormat format) G_GNUC_CONST;
+ gboolean       gst_video_format_is_rgb    (GstVideoFormat format) G_GNUC_CONST;
+ gboolean       gst_video_format_is_yuv    (GstVideoFormat format) G_GNUC_CONST;
+ gboolean       gst_video_format_is_gray   (GstVideoFormat format) G_GNUC_CONST;
+ gboolean       gst_video_format_has_alpha (GstVideoFormat format) G_GNUC_CONST;
+ int            gst_video_format_get_component_depth  (GstVideoFormat format,
+                                                       int            component) G_GNUC_CONST;
+ int            gst_video_format_get_row_stride       (GstVideoFormat format,
+                                                       int            component,
+                                                       int            width) G_GNUC_CONST;
+ int            gst_video_format_get_pixel_stride     (GstVideoFormat format,
+                                                       int            component) G_GNUC_CONST;
+ int            gst_video_format_get_component_width  (GstVideoFormat format,
+                                                       int            component,
+                                                       int            width) G_GNUC_CONST;
+ int            gst_video_format_get_component_height (GstVideoFormat format,
+                                                       int            component,
+                                                       int            height) G_GNUC_CONST;
+ int            gst_video_format_get_component_offset (GstVideoFormat format,
+                                                       int            component,
+                                                       int            width,
+                                                       int            height) G_GNUC_CONST;
+ int            gst_video_format_get_size             (GstVideoFormat format,
+                                                       int            width,
+                                                       int            height) G_GNUC_CONST;
+ gboolean       gst_video_get_size_from_caps (const GstCaps * caps, gint * size);
+ gboolean       gst_video_format_convert (GstVideoFormat  format,
+                                          int             width,
+                                          int             height,
+                                          int             fps_n,
+                                          int             fps_d,
+                                          GstFormat       src_format,
+                                          gint64          src_value,
+                                          GstFormat       dest_format,
+                                          gint64        * dest_value);
+ /* video still frame event creation and parsing */
+ GstEvent *     gst_video_event_new_still_frame   (gboolean in_still);
+ gboolean       gst_video_event_parse_still_frame (GstEvent * event, gboolean * in_still);
+ /* convert/encode video frame from one format to another */
+ typedef void (*GstVideoConvertFrameCallback) (GstBuffer * buf, GError *error, gpointer user_data);
+ void           gst_video_convert_frame_async (GstBuffer                    * buf,
+                                               const GstCaps                * to_caps,
+                                               GstClockTime                   timeout,
+                                               GstVideoConvertFrameCallback   callback,
+                                               gpointer                       user_data,
+                                               GDestroyNotify                 destroy_notify);
+ GstBuffer *    gst_video_convert_frame       (GstBuffer     * buf,
+                                               const GstCaps * to_caps,
+                                               GstClockTime    timeout,
+                                               GError       ** error);
  G_END_DECLS
  
  #endif /* __GST_VIDEO_H__ */
Simple merge
Simple merge
Simple merge
  #define HAVE_ABI_SIZES FALSE
  #endif
  #endif
+ #endif
  
 +/* disabled for 0.11 */
 +#undef HAVE_ABI_SIZES
 +#define HAVE_ABI_SIZES FALSE
 +
  GST_START_TEST (test_ABI)
  {
    gst_check_abi_list (list, HAVE_ABI_SIZES);
@@@ -674,23 -635,17 +674,20 @@@ GST_START_TEST (test_rtcp_buffer
  {
    GstBuffer *buf;
    GstRTCPPacket packet;
-   guint8 *data;
-   gsize size;
 +  GstRTCPBuffer rtcp = { NULL, };
  
    buf = gst_rtcp_buffer_new (1400);
    fail_unless (buf != NULL);
-   data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
-   fail_unless_equals_int (size, 1400);
 -  fail_unless_equals_int (GST_BUFFER_SIZE (buf), 1400);
++  fail_unless_equals_int (gst_buffer_get_size (buf), 1400);
 +
 +  gst_rtcp_buffer_map (buf, GST_MAP_READWRITE, &rtcp);
  
 -  fail_unless (gst_rtcp_buffer_get_first_packet (buf, &packet) == FALSE);
 -  fail_unless (gst_rtcp_buffer_get_packet_count (buf) == 0);
    fail_unless (gst_rtcp_buffer_validate (buf) == FALSE);
 +  fail_unless (gst_rtcp_buffer_get_first_packet (&rtcp, &packet) == FALSE);
 +  fail_unless (gst_rtcp_buffer_get_packet_count (&rtcp) == 0);
  
    /* add an SR packet */
 -  fail_unless (gst_rtcp_buffer_add_packet (buf, GST_RTCP_TYPE_SR,
 +  fail_unless (gst_rtcp_buffer_add_packet (&rtcp, GST_RTCP_TYPE_SR,
            &packet) == TRUE);
  
    fail_unless (gst_rtcp_packet_get_padding (&packet) == 0);
Simple merge