Merge remote-tracking branch 'origin/0.10'
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 24 Apr 2012 16:14:31 +0000 (18:14 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 24 Apr 2012 16:14:31 +0000 (18:14 +0200)
Video base classes and theora plugin still needs to be ported again

Conflicts:
docs/libs/gst-plugins-base-libs-docs.sgml
docs/libs/gst-plugins-base-libs-sections.txt
docs/libs/gst-plugins-base-libs.types
ext/theora/gsttheoradec.c
ext/theora/gsttheoradec.h
ext/theora/gsttheoraenc.c
ext/theora/gsttheoraenc.h
gst-libs/gst/video/Makefile.am
gst-libs/gst/video/video.c
gst-libs/gst/video/video.h
gst/playback/gsturidecodebin.c
tests/check/libs/video.c
tests/check/pipelines/theoraenc.c
win32/common/libgstvideo.def

1  2 
docs/libs/gst-plugins-base-libs-docs.sgml
docs/libs/gst-plugins-base-libs-sections.txt
gst-libs/gst/video/Makefile.am
tests/check/pipelines/theoraenc.c

        <xi:include href="xml/gstvideooverlaycomposition.xml" />
        <xi:include href="xml/gstvideofilter.xml" />
        <xi:include href="xml/gstvideosink.xml" />
 +      <xi:include href="xml/gstcolorbalance.xml" />
 +      <xi:include href="xml/gstcolorbalancechannel.xml" />
 +      <xi:include href="xml/gstvideoorientation.xml" />
 +      <xi:include href="xml/gstvideooverlay.xml" />
+       <xi:include href="xml/gstvideodecoder.xml" />
+       <xi:include href="xml/gstvideoencoder.xml" />
+       <xi:include href="xml/gstvideoutils.xml" />
      </chapter>
    </part>
  
@@@ -1925,16 -2211,189 +1925,99 @@@ GstEncodingTargetClas
  <SECTION>
  <FILE>gstvideo</FILE>
  <INCLUDE>gst/video/video.h</INCLUDE>
 -GST_VIDEO_BLUE_MASK_15
 -GST_VIDEO_BLUE_MASK_15_INT
 -GST_VIDEO_BLUE_MASK_16
 -GST_VIDEO_BLUE_MASK_16_INT
 -GST_VIDEO_BYTE1_MASK_24
 -GST_VIDEO_BYTE1_MASK_24_INT
 -GST_VIDEO_BYTE1_MASK_32
 -GST_VIDEO_BYTE1_MASK_32_INT
 -GST_VIDEO_BYTE2_MASK_24
 -GST_VIDEO_BYTE2_MASK_24_INT
 -GST_VIDEO_BYTE2_MASK_32
 -GST_VIDEO_BYTE2_MASK_32_INT
 -GST_VIDEO_BYTE3_MASK_24
 -GST_VIDEO_BYTE3_MASK_24_INT
 -GST_VIDEO_BYTE3_MASK_32
 -GST_VIDEO_BYTE3_MASK_32_INT
 -GST_VIDEO_BYTE4_MASK_32
 -GST_VIDEO_BYTE4_MASK_32_INT
 -GST_VIDEO_CAPS_ABGR
 -GST_VIDEO_CAPS_ARGB
 -GST_VIDEO_CAPS_BGR
 -GST_VIDEO_CAPS_BGRA
 -GST_VIDEO_CAPS_BGRx
 -GST_VIDEO_CAPS_BGRx_HOST_ENDIAN
 -GST_VIDEO_CAPS_RGB
 -GST_VIDEO_CAPS_RGBA
 -GST_VIDEO_CAPS_RGB_15
 -GST_VIDEO_CAPS_RGB_16
 -GST_VIDEO_CAPS_RGBx
 -GST_VIDEO_CAPS_YUV
 -GST_VIDEO_CAPS_xBGR
 -GST_VIDEO_CAPS_xRGB
 -GST_VIDEO_CAPS_xRGB_HOST_ENDIAN
 -GST_VIDEO_CAPS_BGR_15
 -GST_VIDEO_CAPS_BGR_16
 -GST_VIDEO_CAPS_RGB8_PALETTED
 -GST_VIDEO_CAPS_GRAY8
 -GST_VIDEO_CAPS_GRAY16
 -GST_VIDEO_CAPS_ARGB_64
 -GST_VIDEO_CAPS_r210
 -GST_VIDEO_COMP1_MASK_15
 -GST_VIDEO_COMP1_MASK_15_INT
 -GST_VIDEO_COMP1_MASK_16
 -GST_VIDEO_COMP1_MASK_16_INT
 -GST_VIDEO_COMP2_MASK_15
 -GST_VIDEO_COMP2_MASK_15_INT
 -GST_VIDEO_COMP2_MASK_16
 -GST_VIDEO_COMP2_MASK_16_INT
 -GST_VIDEO_COMP3_MASK_15
 -GST_VIDEO_COMP3_MASK_15_INT
 -GST_VIDEO_COMP3_MASK_16
 -GST_VIDEO_COMP3_MASK_16_INT
  GST_VIDEO_FPS_RANGE
 -GST_VIDEO_GREEN_MASK_15
 -GST_VIDEO_GREEN_MASK_15_INT
 -GST_VIDEO_GREEN_MASK_16
 -GST_VIDEO_GREEN_MASK_16_INT
 -GST_VIDEO_RED_MASK_15
 -GST_VIDEO_RED_MASK_15_INT
 -GST_VIDEO_RED_MASK_16
 -GST_VIDEO_RED_MASK_16_INT
  GST_VIDEO_SIZE_RANGE
+ GST_VIDEO_BUFFER_TFF
+ GST_VIDEO_BUFFER_RFF
+ GST_VIDEO_BUFFER_ONEFIELD
+ GST_VIDEO_BUFFER_PROGRESSIVE
+ GstVideoChromaSite
+ GstVideoColorMatrix
+ GstVideoColorPrimaries
+ GstVideoColorRange
+ GstVideoColorimetry
+ GstVideoFlags
+ GstVideoFormatFlags
+ GstVideoFormatPack
+ GstVideoFormatUnpack
+ GstVideoInterlaceMode
+ GstVideoTransferFunction
  GstVideoFormat
+ GstVideoFormatInfo
+ GST_VIDEO_FORMAT_INFO_BITS
+ GST_VIDEO_FORMAT_INFO_DATA
+ GST_VIDEO_FORMAT_INFO_DEPTH
+ GST_VIDEO_FORMAT_INFO_FLAGS
+ GST_VIDEO_FORMAT_INFO_FORMAT
+ GST_VIDEO_FORMAT_INFO_HAS_ALPHA
+ GST_VIDEO_FORMAT_INFO_HAS_PALETTE
+ GST_VIDEO_FORMAT_INFO_H_SUB
+ GST_VIDEO_FORMAT_INFO_IS_GRAY
+ GST_VIDEO_FORMAT_INFO_IS_LE
+ GST_VIDEO_FORMAT_INFO_IS_RGB
+ GST_VIDEO_FORMAT_INFO_IS_YUV
+ GST_VIDEO_FORMAT_INFO_IS_COMPLEX
+ GST_VIDEO_FORMAT_INFO_NAME
+ GST_VIDEO_FORMAT_INFO_N_COMPONENTS
+ GST_VIDEO_FORMAT_INFO_N_PLANES
+ GST_VIDEO_FORMAT_INFO_OFFSET
+ GST_VIDEO_FORMAT_INFO_PLANE
+ GST_VIDEO_FORMAT_INFO_POFFSET
+ GST_VIDEO_FORMAT_INFO_PSTRIDE
+ GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT
+ GST_VIDEO_FORMAT_INFO_SCALE_WIDTH
+ GST_VIDEO_FORMAT_INFO_SHIFT
+ GST_VIDEO_FORMAT_INFO_STRIDE
+ GST_VIDEO_FORMAT_INFO_W_SUB
+ GstVideoInfo
+ GST_VIDEO_INFO_COMP_BITS
+ GST_VIDEO_INFO_COMP_DATA
+ GST_VIDEO_INFO_COMP_DEPTH
+ GST_VIDEO_INFO_COMP_HEIGHT
+ GST_VIDEO_INFO_COMP_OFFSET
+ GST_VIDEO_INFO_COMP_PLANE
+ GST_VIDEO_INFO_COMP_POFFSET
+ GST_VIDEO_INFO_COMP_PSTRIDE
+ GST_VIDEO_INFO_COMP_STRIDE
+ GST_VIDEO_INFO_COMP_WIDTH
+ GST_VIDEO_INFO_FLAGS
+ GST_VIDEO_INFO_FLAG_IS_SET
+ GST_VIDEO_INFO_FLAG_SET
+ GST_VIDEO_INFO_FLAG_UNSET
+ GST_VIDEO_INFO_FORMAT
+ GST_VIDEO_INFO_FPS_D
+ GST_VIDEO_INFO_FPS_N
+ GST_VIDEO_INFO_HAS_ALPHA
+ GST_VIDEO_INFO_HEIGHT
+ GST_VIDEO_INFO_INTERLACE_MODE
+ GST_VIDEO_INFO_IS_GRAY
+ GST_VIDEO_INFO_IS_INTERLACED
+ GST_VIDEO_INFO_IS_RGB
+ GST_VIDEO_INFO_IS_YUV
+ GST_VIDEO_INFO_NAME
+ GST_VIDEO_INFO_N_COMPONENTS
+ GST_VIDEO_INFO_N_PLANES
+ GST_VIDEO_INFO_PAR_D
+ GST_VIDEO_INFO_PAR_N
+ GST_VIDEO_INFO_PLANE_OFFSET
+ GST_VIDEO_INFO_PLANE_STRIDE
+ GST_VIDEO_INFO_SIZE
+ GST_VIDEO_INFO_WIDTH
+ GST_VIDEO_MAX_COMPONENTS
+ GST_VIDEO_MAX_PLANES
+ GST_VIDEO_SUB_SCALE
+ gst_video_info_convert
+ gst_video_info_from_caps
+ gst_video_info_init
+ gst_video_info_set_format
+ gst_video_info_to_caps
  gst_video_calculate_display_ratio
 -gst_video_frame_rate
 -gst_video_get_size
 -gst_video_get_size_from_caps
 -gst_video_format_convert
 -gst_video_format_new_caps
 -gst_video_format_new_caps_interlaced
 -gst_video_format_new_template_caps
 -gst_video_format_get_component_height
 -gst_video_format_get_component_offset
 -gst_video_format_get_component_width
 -gst_video_format_get_component_depth
 -gst_video_format_get_pixel_stride
 -gst_video_format_get_row_stride
 -gst_video_format_get_size
 -gst_video_format_get_info
 -gst_video_format_has_alpha
 -gst_video_format_is_rgb
 -gst_video_format_is_gray
 -gst_video_format_is_yuv
  gst_video_format_to_fourcc
  gst_video_format_from_fourcc
 -gst_video_format_to_string
 -gst_video_format_from_masks
 -gst_video_format_parse_caps
 -gst_video_format_parse_caps_interlaced
 -gst_video_parse_caps_framerate
 -gst_video_parse_caps_pixel_aspect_ratio
 -gst_video_parse_caps_color_matrix
 -gst_video_parse_caps_chroma_site
  gst_video_parse_caps_palette
 -gst_video_colorimetry_from_string
 -gst_video_colorimetry_matches
 -gst_video_colorimetry_to_string
 -GstVideoConvertFrameCallback
 -gst_video_convert_frame
 -gst_video_convert_frame_async
 +GstVideoConvertSampleCallback
 +gst_video_convert_sample
 +gst_video_convert_sample_async
  gst_video_event_new_still_frame
  gst_video_event_parse_still_frame
  gst_video_event_new_upstream_force_key_unit
@@@ -12,40 -17,36 +12,46 @@@ lib_LTLIBRARIES = libgstvideo-@GST_API_
  
  CLEANFILES = $(BUILT_SOURCES)
  
 -# video-blend.h should be disted but not installed into the includedir
 -libgstvideo_@GST_MAJORMINOR@_la_SOURCES = \
 -      video.c gstvideosink.c gstvideofilter.c convertframe.c \
 -      video-blend.c video-blend.h video-overlay-composition.c \
 -      gstvideodecoder.c gstvideoencoder.c \
 +EXTRA_DIST = video-marshal.list
 +
 +libgstvideo_@GST_API_VERSION@_la_SOURCES = \
 +      colorbalance.c          \
 +      colorbalancechannel.c   \
 +      navigation.c            \
 +      video.c                 \
 +      gstvideosink.c          \
 +      gstvideofilter.c        \
 +      convertframe.c          \
 +      gstvideometa.c          \
 +      gstvideopool.c          \
 +      videoorientation.c      \
-       videooverlay.c
++      videooverlay.c          \
++      gstvideodecoder.c       \
++      gstvideoencoder.c       \
+       gstvideoutils.c
 -nodist_libgstvideo_@GST_MAJORMINOR@_la_SOURCES = \
 -      $(built_sources) $(built_headers) \
 -      $(ORC_NODIST_SOURCES)
 -libgstvideo_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/video
 -libgstvideo_@GST_MAJORMINOR@include_HEADERS = \
 -      video.h gstvideosink.h gstvideofilter.h video-overlay-composition.h \
 -      gstvideodecoder.h gstvideoencoder.h \
 -      gstvideoutils.h
 -nodist_libgstvideo_@GST_MAJORMINOR@include_HEADERS = $(built_headers)
  
 -libgstvideo_@GST_MAJORMINOR@_la_CFLAGS = \
 -      $(GST_PLUGINS_BASE_CFLAGS)\
 -      $(GST_BASE_CFLAGS) \
 -      $(GST_CFLAGS) \
 -      $(ORC_CFLAGS)
 -
 -libgstvideo_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) \
 -      $(GST_LIBS) \
 -      $(ORC_LIBS)
 +nodist_libgstvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES)
 +
 +libgstvideo_@GST_API_VERSION@includedir = $(includedir)/gstreamer-@GST_API_VERSION@/gst/video
 +libgstvideo_@GST_API_VERSION@include_HEADERS = \
 +      colorbalance.h          \
 +      colorbalancechannel.h   \
 +      navigation.h            \
 +      video.h                 \
 +      gstvideosink.h          \
 +      gstvideofilter.h        \
 +      gstvideometa.h          \
 +      gstvideopool.h          \
 +      videoorientation.h      \
-       videooverlay.h
++      videooverlay.h          \
++      gstvideodecoder.h       \
++      gstvideoencoder.h       \
++      gstvideoutils.h
 +nodist_libgstvideo_@GST_API_VERSION@include_HEADERS = $(built_headers)
  
 -libgstvideo_@GST_MAJORMINOR@_la_LDFLAGS = \
 -      $(GST_LIB_LDFLAGS) \
 -      $(GST_ALL_LDFLAGS) \
 -      $(GST_LT_LDFLAGS)
 +libgstvideo_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 +libgstvideo_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
 +libgstvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
  
  include $(top_srcdir)/common/gst-glib-gen.mak
  
@@@ -308,126 -308,7 +308,6 @@@ GST_START_TEST (test_continuity
  
  GST_END_TEST;
  
- static GstPadProbeReturn
- drop_second_data_buffer (GstPad * droppad, GstPadProbeInfo * info,
-     gpointer unused)
- {
-   GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
-   if (GST_BUFFER_OFFSET (buffer) == 1)
-     return GST_PAD_PROBE_DROP;
-   else
-     return GST_PAD_PROBE_OK;
- }
- GST_START_TEST (test_discontinuity)
- {
-   GstElement *bin;
-   GstPad *pad, *droppad;
-   gchar *pipe_str;
-   GstBuffer *buffer;
-   GError *error = NULL;
-   guint drop_id;
-   pipe_str = g_strdup_printf ("videotestsrc num-buffers=10"
-       " ! video/x-raw,format=(string)I420,framerate=10/1"
-       " ! theoraenc ! fakesink name=fs0");
-   bin = gst_parse_launch (pipe_str, &error);
-   fail_unless (bin != NULL, "Error parsing pipeline: %s",
-       error ? error->message : "(invalid error)");
-   g_free (pipe_str);
-   /* the plan: same as test_continuity, but dropping a buffer and seeing if
-      theoraenc correctly notes the discontinuity */
-   /* get the pad to use to drop buffers */
-   {
-     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "theoraenc0");
-     fail_unless (sink != NULL, "Could not get theoraenc out of bin");
-     droppad = gst_element_get_static_pad (sink, "sink");
-     fail_unless (droppad != NULL, "Could not get pad out of theoraenc");
-     gst_object_unref (sink);
-   }
-   /* get the pad */
-   {
-     GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0");
-     fail_unless (sink != NULL, "Could not get fakesink out of bin");
-     pad = gst_element_get_static_pad (sink, "sink");
-     fail_unless (pad != NULL, "Could not get pad out of fakesink");
-     gst_object_unref (sink);
-   }
-   drop_id = gst_pad_add_probe (droppad, GST_PAD_PROBE_TYPE_BUFFER,
-       drop_second_data_buffer, NULL, NULL);
-   gst_buffer_straw_start_pipeline (bin, pad);
-   /* header packets should have timestamp == NONE, granulepos 0 */
-   buffer = gst_buffer_straw_get_buffer (bin, pad);
-   check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
-   check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
-   check_buffer_granulepos (buffer, 0);
-   check_buffer_is_header (buffer, TRUE);
-   gst_buffer_unref (buffer);
-   buffer = gst_buffer_straw_get_buffer (bin, pad);
-   check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
-   check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
-   check_buffer_granulepos (buffer, 0);
-   check_buffer_is_header (buffer, TRUE);
-   gst_buffer_unref (buffer);
-   buffer = gst_buffer_straw_get_buffer (bin, pad);
-   check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
-   check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
-   check_buffer_granulepos (buffer, 0);
-   check_buffer_is_header (buffer, TRUE);
-   gst_buffer_unref (buffer);
-   {
-     buffer = gst_buffer_straw_get_buffer (bin, pad);
-     check_buffer_timestamp (buffer, 0);
-     /* plain division because I know the answer is exact */
-     check_buffer_duration (buffer, GST_SECOND / 10);
-     check_buffer_granulepos (buffer, 1 << GRANULEPOS_SHIFT);
-     check_buffer_is_header (buffer, FALSE);
-     fail_if (GST_BUFFER_IS_DISCONT (buffer), "expected continuous buffer yo");
-     gst_buffer_unref (buffer);
-     /* check discontinuity with the next buffer */
-     buffer = gst_buffer_straw_get_buffer (bin, pad);
-     check_buffer_duration (buffer, GST_SECOND / 10);
-     /* After a discont, we'll always get a keyframe, so this one should be 
-      * 3<<GRANULEPOS_SHIFT */
-     check_buffer_granulepos (buffer, 3 << GRANULEPOS_SHIFT);
-     check_buffer_is_header (buffer, FALSE);
-     fail_unless (GST_BUFFER_IS_DISCONT (buffer),
-         "expected discontinuous buffer yo");
-     gst_buffer_unref (buffer);
-     /* Then the buffer after that should be continuous */
-     buffer = gst_buffer_straw_get_buffer (bin, pad);
-     fail_if (GST_BUFFER_IS_DISCONT (buffer), "expected continuous buffer yo");
-     /* plain division because I know the answer is exact */
-     check_buffer_duration (buffer, GST_SECOND / 10);
-     check_buffer_granulepos (buffer, (3 << GRANULEPOS_SHIFT) | 1);
-     check_buffer_is_header (buffer, FALSE);
-     gst_buffer_unref (buffer);
-   }
-   gst_buffer_straw_stop_pipeline (bin, pad);
-   gst_pad_remove_probe (droppad, drop_id);
-   gst_object_unref (droppad);
-   gst_object_unref (pad);
-   gst_object_unref (bin);
- }
- GST_END_TEST;
--
  #endif /* #ifndef GST_DISABLE_PARSE */
  
  static Suite *