Merge branch 'master' into 0.11
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 4 Mar 2011 15:30:36 +0000 (16:30 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 4 Mar 2011 15:30:36 +0000 (16:30 +0100)
36 files changed:
android/apetag.mk
android/avi.mk
android/flv.mk
android/icydemux.mk
android/id3demux.mk
android/qtdemux.mk
android/rtp.mk
android/rtpmanager.mk
android/rtsp.mk
android/soup.mk
android/udp.mk
android/wavenc.mk
android/wavparse.mk
configure.ac
ext/jpeg/gstjpegdec.c
ext/taglib/gstid3v2mux.cc
gst/alpha/gstalpha.c
gst/debugutils/efence.c
gst/replaygain/Makefile.am
gst/rtpmanager/rtpsession.c
gst/rtsp/gstrtspsrc.c
gst/udp/gstdynudpsink.c
gst/udp/gstudp.c
gst/udp/gstudpsrc.c
sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2bufferpool.h
sys/v4l2/gstv4l2object.c
sys/v4l2/gstv4l2xoverlay.c
sys/v4l2/v4l2src_calls.c
sys/ximage/gstximagesrc.c
sys/ximage/gstximagesrc.h
sys/ximage/ximageutil.c
sys/ximage/ximageutil.h
tests/examples/pulse/Makefile.am
tests/examples/v4l2/Makefile.am
tests/icles/Makefile.am

index 217ae8a..10ce6f9 100644 (file)
@@ -10,14 +10,14 @@ apetag_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(apetag_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgsttag-0.10          \
-       libgstpbutils-0.10
+       libgsttag-0.11          \
+       libgstpbutils-0.11
 
 LOCAL_MODULE:= libgstapetag
 
@@ -26,7 +26,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs                  \
     $(LOCAL_PATH)                                              \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
     $(TARGET_OUT_HEADERS)/glib-2.0      \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -43,7 +43,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index 9ff2132..978fc06 100644 (file)
@@ -13,13 +13,13 @@ avi_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(avi_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgstriff-0.10
+       libgstriff-0.11
 
 LOCAL_MODULE:= libgstavi
 
@@ -29,7 +29,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/../gst-libs                  \
        $(LOCAL_PATH)/                                          \
     $(LOCAL_PATH)/gst-libs/gst/audio    \
-    $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+    $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -45,7 +45,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index f59b7bc..6c4bc75 100644 (file)
@@ -12,8 +12,8 @@ flv_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(flv_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-       libgstreamer-0.10     \
-    libgstbase-0.10       \
+       libgstreamer-0.11     \
+    libgstbase-0.11       \
     libglib-2.0           \
     libgthread-2.0        \
     libgmodule-2.0        \
@@ -28,7 +28,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs                  \
        $(LOCAL_PATH)                                           \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
     $(TARGET_OUT_HEADERS)/glib-2.0      \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -44,7 +44,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index 4819a9b..a491a62 100644 (file)
@@ -10,13 +10,13 @@ icydemux_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(icydemux_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgsttag-0.10                  
+       libgsttag-0.11                  
 
 LOCAL_MODULE:= libgsticydemux
 
@@ -25,7 +25,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs          \
        $(LOCAL_PATH)                                           \
-    $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+    $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -41,7 +41,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index c615eb0..610b65f 100644 (file)
@@ -12,14 +12,14 @@ id3demux_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(id3demux_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgsttag-0.10          \
-       libgstpbutils-0.10
+       libgsttag-0.11          \
+       libgstpbutils-0.11
 
 LOCAL_MODULE:= libgstid3demux
 
@@ -28,7 +28,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs                  \
     $(LOCAL_PATH)                                              \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
     $(TARGET_OUT_HEADERS)/glib-2.0      \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -44,7 +44,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index 3708dd3..7ef99ee 100644 (file)
@@ -14,16 +14,16 @@ qtdemux_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(qtdemux_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgsttag-0.10                  \
-       libgstrtp-0.10                  \
-       libgstriff-0.10                 \
-       libgstaudio-0.10
+       libgsttag-0.11                  \
+       libgstrtp-0.11                  \
+       libgstriff-0.11                 \
+       libgstaudio-0.11
 
 LOCAL_MODULE:= libgstqtdemux
 
@@ -32,7 +32,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs          \
        $(LOCAL_PATH)                                           \
-    $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+    $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -48,7 +48,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index 331c598..57dfc3a 100644 (file)
@@ -74,15 +74,15 @@ rtp_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(rtp_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-       libgstreamer-0.10               \
-       libgstbase-0.10                 \
+       libgstreamer-0.11               \
+       libgstbase-0.11                 \
        libglib-2.0                     \
        libgthread-2.0                  \
        libgmodule-2.0                  \
        libgobject-2.0                  \
-       libgsttag-0.10                  \
-       libgstrtp-0.10                  \
-       libgstaudio-0.10
+       libgsttag-0.11                  \
+       libgstrtp-0.11                  \
+       libgstaudio-0.11
 
 LOCAL_MODULE:= libgstrtp
 
@@ -91,7 +91,7 @@ LOCAL_C_INCLUDES := \
        $(LOCAL_PATH)/..                                \
        $(LOCAL_PATH)/../gst-libs                       \
        $(LOCAL_PATH)                                           \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -107,7 +107,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index f7aa667..148a4cd 100644 (file)
@@ -22,14 +22,14 @@ LOCAL_SRC_FILES:= $(addprefix ../,$(rtpmanager_LOCAL_SRC_FILES_BASE)) \
                                  $(addprefix ../android/,$(rtpmanager_LOCAL_SRC_FILES_ANDROID))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgstnetbuffer-0.10    \
-       libgstrtp-0.10
+       libgstnetbuffer-0.11    \
+       libgstrtp-0.11
 
 LOCAL_MODULE:= libgstrtpmanager
 
@@ -39,7 +39,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/../gst-libs          \
        $(LOCAL_PATH)                                   \
        $(LOCAL_PATH)/gst/rtpmanager            \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -55,7 +55,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index cb2c7d2..29f8906 100644 (file)
@@ -13,16 +13,16 @@ rtsp_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(rtsp_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgstrtp-0.10                  \
-       libgstinterfaces-0.10   \
-       libgstrtsp-0.10         \
-       libgstsdp-0.10
+       libgstrtp-0.11                  \
+       libgstinterfaces-0.11   \
+       libgstrtsp-0.11         \
+       libgstsdp-0.11
 
 LOCAL_MODULE:= libgstrtsp
 
@@ -31,7 +31,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs                  \
        $(LOCAL_PATH)                                           \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -47,7 +47,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index e869a25..29d9d14 100644 (file)
@@ -10,13 +10,13 @@ soup_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(soup_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgsttag-0.10          \
+       libgsttag-0.11          \
        libsoup-2.4
 
 LOCAL_MODULE:= libgstsouphttpsrc
@@ -26,7 +26,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs                  \
        $(LOCAL_PATH)                                           \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include                \
@@ -43,7 +43,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index 1139a4a..6a522bc 100644 (file)
@@ -19,14 +19,14 @@ LOCAL_SRC_FILES:= $(addprefix ../,$(udp_LOCAL_SRC_FILES_BASE)) \
                                  $(addprefix ../android/,$(udp_LOCAL_SRC_FILES_ANDROID))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgsttag-0.10                  \
-       libgstnetbuffer-0.10
+       libgsttag-0.11                  \
+       libgstnetbuffer-0.11
 
 LOCAL_MODULE:= libgstudp
 
@@ -36,7 +36,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/../gst-libs                  \
        $(LOCAL_PATH)                                           \
        $(LOCAL_PATH)/gst/udp                           \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -52,7 +52,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H -DGSTREAMER_BUILT_FOR_ANDROID
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index a3fc824..5ba7769 100644 (file)
@@ -10,13 +10,13 @@ wavenc_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(wavenc_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-    libgstriff-0.10            
+    libgstriff-0.11            
 
 LOCAL_MODULE:= libgstwavenc
 
@@ -25,7 +25,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs          \
        $(LOCAL_PATH)                                           \
-    $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+    $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -41,7 +41,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index 2447bb6..d10a7b0 100644 (file)
@@ -10,13 +10,13 @@ wavparse_LOCAL_SRC_FILES:= \
 LOCAL_SRC_FILES:= $(addprefix ../,$(wavparse_LOCAL_SRC_FILES))
 
 LOCAL_SHARED_LIBRARIES := \
-    libgstreamer-0.10       \
-    libgstbase-0.10         \
+    libgstreamer-0.11       \
+    libgstbase-0.11         \
     libglib-2.0             \
     libgthread-2.0          \
     libgmodule-2.0          \
     libgobject-2.0                     \
-       libgstriff-0.10
+       libgstriff-0.11
 
 LOCAL_MODULE:= libgstwavparse
 
@@ -25,7 +25,7 @@ LOCAL_C_INCLUDES := \
     $(LOCAL_PATH)/..                           \
     $(LOCAL_PATH)/../gst-libs                  \
        $(LOCAL_PATH)                                           \
-       $(TARGET_OUT_HEADERS)/gstreamer-0.10 \
+       $(TARGET_OUT_HEADERS)/gstreamer-0.11 \
        $(TARGET_OUT_HEADERS)/glib-2.0          \
     $(TARGET_OUT_HEADERS)/glib-2.0/glib \
        external/libxml2/include
@@ -41,7 +41,7 @@ LOCAL_CFLAGS := -DHAVE_CONFIG_H
 #
 LOCAL_PRELINK_MODULE := false
 
-#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.10
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.10
+#It's a gstreamer plugins, and it must be installed on ..../lib/gstreamer-0.11
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/gstreamer-0.11
 
 include $(BUILD_SHARED_LIBRARY)
index dd36366..f429d6b 100644 (file)
@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
 dnl initialize autoconf
 dnl releases only do -Wall, git and prerelease does -Werror too
 dnl use a three digit version number for releases, and four for git/pre
-AC_INIT(GStreamer Good Plug-ins, 0.10.27.1,
+AC_INIT(GStreamer Good Plug-ins, 0.11.0.1,
     http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
     gst-plugins-good)
 
@@ -40,7 +40,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
 dnl our libraries and install dirs use major.minor as a version
 GST_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
 dnl we override it here if we need to for the release candidate of new series
-GST_MAJORMINOR=0.10
+GST_MAJORMINOR=0.11
 AC_SUBST(GST_MAJORMINOR)
 
 AG_GST_LIBTOOL_PREPARE
@@ -54,8 +54,8 @@ AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
 dnl *** required versions of GStreamer stuff ***
-GST_REQ=0.10.32
-GSTPB_REQ=0.10.32
+GST_REQ=0.11.0
+GSTPB_REQ=0.11.0
 
 dnl *** autotools stuff ****
 
@@ -1258,7 +1258,7 @@ sed \
     -e "s/.* PACKAGE_STRING$/#define PACKAGE_STRING \"$PACKAGE_STRING\"/" \
     -e 's/.* PACKAGE_TARNAME$/#define PACKAGE_TARNAME "'$PACKAGE_TARNAME'"/' \
     -e 's/.* PACKAGE_VERSION$/#define PACKAGE_VERSION "'$PACKAGE_VERSION'"/' \
-    -e 's/.* PLUGINDIR$/#ifdef _DEBUG\n#  define PLUGINDIR PREFIX "\\\\debug\\\\lib\\\\gstreamer-0.10"\n#else\n#  define PLUGINDIR PREFIX "\\\\lib\\\\gstreamer-0.10"\n#endif/' \
+    -e 's/.* PLUGINDIR$/#ifdef _DEBUG\n#  define PLUGINDIR PREFIX "\\\\debug\\\\lib\\\\gstreamer-0.11"\n#else\n#  define PLUGINDIR PREFIX "\\\\lib\\\\gstreamer-0.11"\n#endif/' \
     -e 's/.* USE_BINARY_REGISTRY$/#define USE_BINARY_REGISTRY/' \
     -e 's/.* VERSION$/#define VERSION "'$VERSION'"/' \
     -e "s/.* DEFAULT_AUDIOSINK$/#define DEFAULT_AUDIOSINK \"directsoundsink\"/" \
index 71ae4b9..c2189cc 100644 (file)
@@ -1061,7 +1061,7 @@ gst_jpeg_dec_update_qos (GstJpegDec * dec, gdouble proportion,
   GST_OBJECT_LOCK (dec);
   dec->proportion = proportion;
   if (G_LIKELY (ts != GST_CLOCK_TIME_NONE)) {
-    if (G_UNLIKELY (diff > 0))
+    if (G_UNLIKELY (diff > dec->qos_duration))
       dec->earliest_time = ts + 2 * diff + dec->qos_duration;
     else
       dec->earliest_time = ts + diff;
index 6468048..cc307aa 100644 (file)
@@ -368,7 +368,7 @@ add_id3v2frame_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
     GstBuffer *buf;
 
     val = gst_tag_list_get_value_index (list, tag, i);
-    buf = (GstBuffer *) gst_value_get_mini_object (val);
+    buf = (GstBuffer *) g_value_get_boxed (val);
 
     if (buf && GST_BUFFER_CAPS (buf)) {
       GstStructure *s;
@@ -403,7 +403,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
     GST_DEBUG ("image %u/%u", n + 1, num_tags);
 
     val = gst_tag_list_get_value_index (list, tag, n);
-    image = (GstBuffer *) gst_value_get_mini_object (val);
+    image = (GstBuffer *) g_value_get_boxed (val);
 
     if (GST_IS_BUFFER (image) && GST_BUFFER_SIZE (image) > 0 &&
         GST_BUFFER_CAPS (image) != NULL &&
index d72c8c5..e9c29d5 100644 (file)
@@ -397,7 +397,7 @@ gst_alpha_set_property (GObject * object, guint prop_id,
     case PROP_PREFER_PASSTHROUGH:{
       gboolean prefer_passthrough = g_value_get_boolean (value);
 
-      reconfigure = ((! !prefer_passthrough) != (! !alpha->prefer_passthrough))
+      reconfigure = ((!!prefer_passthrough) != (!!alpha->prefer_passthrough))
           && (alpha->method == ALPHA_METHOD_SET) && (alpha->alpha == 1.0);
       alpha->prefer_passthrough = prefer_passthrough;
       break;
index fa64326..9d5a599 100644 (file)
@@ -84,26 +84,42 @@ static gboolean gst_efence_activate_src_pull (GstPad * pad, gboolean active);
 
 static GstElementClass *parent_class = NULL;
 
-typedef struct _GstFencedBuffer GstFencedBuffer;
-struct _GstFencedBuffer
+typedef struct _GstMetaFenced
 {
-  GstBuffer buffer;
+  GstMeta meta;
+
   void *region;
   unsigned int length;
-};
+} GstMetaFenced;
+
+static const GstMetaInfo *
+gst_meta_fenced_get_info (void)
+{
+  static const GstMetaInfo *meta_fenced_info = NULL;
+
+  if (meta_fenced_info == NULL) {
+    meta_fenced_info = gst_meta_register ("GstMetaFenced", "GstMetaFenced",
+        sizeof (GstMetaFenced),
+        (GstMetaInitFunction) NULL,
+        (GstMetaFreeFunction) NULL,
+        (GstMetaCopyFunction) NULL,
+        (GstMetaSubFunction) NULL,
+        (GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
+  }
+  return meta_fenced_info;
+}
 
-GType gst_fenced_buffer_get_type (void);
-static void gst_fenced_buffer_finalize (GstFencedBuffer * buf);
-static GstFencedBuffer *gst_fenced_buffer_copy (const GstBuffer * buffer);
+#define GST_META_FENCED_GET(buf) ((GstMetaFenced *)gst_buffer_get_meta(buf,gst_meta_fenced_get_info()))
+#define GST_META_FENCED_ADD(buf) ((GstMetaFenced *)gst_buffer_add_meta(buf,gst_meta_fenced_get_info(),NULL))
+
+static void gst_fenced_buffer_dispose (GstBuffer * buf);
+static GstBuffer *gst_fenced_buffer_copy (const GstBuffer * buffer);
 static void *gst_fenced_buffer_alloc (GstBuffer * buffer, unsigned int length,
     gboolean fence_top);
+#if 0
 static GstFlowReturn gst_efence_buffer_alloc (GstPad * pad, guint64 offset,
     guint size, GstCaps * caps, GstBuffer ** buf);
-
-#define GST_TYPE_FENCED_BUFFER (gst_fenced_buffer_get_type())
-
-#define GST_IS_FENCED_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FENCED_BUFFER))
-#define GST_FENCED_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_FENCED_BUFFER, GstFencedBuffer))
+#endif
 
 GType
 gst_gst_efence_get_type (void)
@@ -182,8 +198,10 @@ gst_efence_init (GstEFence * filter)
       GST_DEBUG_FUNCPTR (gst_pad_proxy_setcaps));
   gst_pad_set_chain_function (filter->sinkpad,
       GST_DEBUG_FUNCPTR (gst_efence_chain));
+#if 0
   gst_pad_set_bufferalloc_function (filter->sinkpad,
       GST_DEBUG_FUNCPTR (gst_efence_buffer_alloc));
+#endif
   gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
 
   filter->srcpad =
@@ -217,11 +235,13 @@ gst_efence_chain (GstPad * pad, GstBuffer * buffer)
   efence = GST_EFENCE (GST_OBJECT_PARENT (pad));
   g_return_val_if_fail (GST_IS_EFENCE (efence), GST_FLOW_ERROR);
 
+#if 0
   if (GST_IS_FENCED_BUFFER (buffer)) {
     GST_DEBUG_OBJECT (efence, "Passing on existing fenced buffer with caps %"
         GST_PTR_FORMAT, GST_BUFFER_CAPS (buffer));
     return gst_pad_push (efence->srcpad, buffer);
   }
+#endif
 
   copy = (GstBuffer *) gst_fenced_buffer_copy (buffer);
 
@@ -277,6 +297,7 @@ gst_efence_activate_src_pull (GstPad * pad, gboolean active)
   return gst_pad_activate_pull (efence->sinkpad, active);
 }
 
+#if 0
 static GstFlowReturn
 gst_efence_buffer_alloc (GstPad * pad, guint64 offset,
     guint size, GstCaps * caps, GstBuffer ** buf)
@@ -306,6 +327,7 @@ gst_efence_buffer_alloc (GstPad * pad, guint64 offset,
 
   return GST_FLOW_OK;
 }
+#endif
 
 static void
 gst_efence_set_property (GObject * object, guint prop_id,
@@ -374,29 +396,23 @@ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
     plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
 
 
-static GstBufferClass *fenced_buffer_parent_class = NULL;
-
 static void
-gst_fenced_buffer_finalize (GstFencedBuffer * buffer)
+gst_fenced_buffer_dispose (GstBuffer * buffer)
 {
-  GstFencedBuffer *fenced_buffer;
+  GstMetaFenced *meta;
 
-  GST_DEBUG ("free buffer=%p", buffer);
+  meta = GST_META_FENCED_GET (buffer);
 
-  fenced_buffer = GST_FENCED_BUFFER (buffer);
+  GST_DEBUG ("free buffer=%p", buffer);
 
   /* free our data */
   if (GST_BUFFER_DATA (buffer)) {
-    GST_DEBUG ("free region %p %d", fenced_buffer->region,
-        fenced_buffer->length);
-    munmap (fenced_buffer->region, fenced_buffer->length);
+    GST_DEBUG ("free region %p %d", meta->region, meta->length);
+    munmap (meta->region, meta->length);
   }
-
-  GST_MINI_OBJECT_CLASS (fenced_buffer_parent_class)->finalize (GST_MINI_OBJECT
-      (buffer));
 }
 
-static GstFencedBuffer *
+static GstBuffer *
 gst_fenced_buffer_copy (const GstBuffer * buffer)
 {
   GstBuffer *copy;
@@ -406,11 +422,10 @@ gst_fenced_buffer_copy (const GstBuffer * buffer)
   g_return_val_if_fail (buffer != NULL, NULL);
 
   /* create a fresh new buffer */
-  copy = (GstBuffer *) gst_mini_object_new (GST_TYPE_FENCED_BUFFER);
+  copy = gst_buffer_new ();
 
   /* we simply copy everything from our parent */
-  ptr = gst_fenced_buffer_alloc (GST_BUFFER (copy),
-      GST_BUFFER_SIZE (buffer), TRUE);
+  ptr = gst_fenced_buffer_alloc (copy, GST_BUFFER_SIZE (buffer), TRUE);
   memcpy (ptr, GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer));
 
   /* copy relevant flags */
@@ -434,7 +449,7 @@ gst_fenced_buffer_copy (const GstBuffer * buffer)
       ", caps: %" GST_PTR_FORMAT, buffer,
       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (copy)), GST_BUFFER_CAPS (copy));
 
-  return GST_FENCED_BUFFER (copy);
+  return copy;
 }
 
 void *
@@ -443,7 +458,7 @@ gst_fenced_buffer_alloc (GstBuffer * buffer, unsigned int length,
 {
   int alloc_size;
   void *region;
-  GstFencedBuffer *fenced_buffer = (GstFencedBuffer *) buffer;
+  GstMetaFenced *meta;
   int page_size;
 
   GST_DEBUG ("buffer=%p length=%d fence_top=%d", buffer, length, fence_top);
@@ -467,21 +482,29 @@ gst_fenced_buffer_alloc (GstBuffer * buffer, unsigned int length,
     g_warning ("mmap failed");
     return NULL;
   }
+
+  GST_MINI_OBJECT_CAST (buffer)->dispose =
+      (GstMiniObjectDisposeFunction) gst_fenced_buffer_dispose;
+  GST_MINI_OBJECT_CAST (buffer)->copy =
+      (GstMiniObjectCopyFunction) gst_fenced_buffer_copy;
+
+  meta = GST_META_FENCED_ADD (buffer);
+
 #if 0
   munmap (region, page_size);
   munmap (region + alloc_size - page_size, page_size);
 
-  fenced_buffer->region = region + page_size;
-  fenced_buffer->length = alloc_size - page_size;
+  meta->region = region + page_size;
+  meta->length = alloc_size - page_size;
 #else
   mprotect (region, page_size, PROT_NONE);
   mprotect ((char *) region + alloc_size - page_size, page_size, PROT_NONE);
 
-  fenced_buffer->region = region;
-  fenced_buffer->length = alloc_size;
+  meta->region = region;
+  meta->length = alloc_size;
 #endif
 
-  GST_DEBUG ("new region %p %d", fenced_buffer->region, fenced_buffer->length);
+  GST_DEBUG ("new region %p %d", meta->region, meta->length);
 
   if (fence_top) {
     int offset;
@@ -494,39 +517,3 @@ gst_fenced_buffer_alloc (GstBuffer * buffer, unsigned int length,
     return (void *) ((char *) region + page_size);
   }
 }
-
-static void
-gst_fenced_buffer_class_init (gpointer g_class, gpointer class_data)
-{
-  GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
-
-  fenced_buffer_parent_class = g_type_class_peek_parent (g_class);
-
-  mini_object_class->finalize =
-      (GstMiniObjectFinalizeFunction) gst_fenced_buffer_finalize;
-  mini_object_class->copy = (GstMiniObjectCopyFunction) gst_fenced_buffer_copy;
-}
-
-GType
-gst_fenced_buffer_get_type (void)
-{
-  static GType fenced_buf_type = 0;
-
-  if (G_UNLIKELY (!fenced_buf_type)) {
-    static const GTypeInfo fenced_buf_info = {
-      sizeof (GstBufferClass),
-      NULL,
-      NULL,
-      (GClassInitFunc) gst_fenced_buffer_class_init,
-      NULL,
-      NULL,
-      sizeof (GstFencedBuffer),
-      0,
-      NULL,
-    };
-
-    fenced_buf_type = g_type_register_static (GST_TYPE_BUFFER,
-        "GstFencedBuffer", &fenced_buf_info, 0);
-  }
-  return fenced_buf_type;
-}
index 19e45fb..7a8ac11 100644 (file)
@@ -9,7 +9,7 @@ libgstreplaygain_la_SOURCES = \
 libgstreplaygain_la_CFLAGS  = \
        $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
 libgstreplaygain_la_LIBADD  = \
-       $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-0.10 \
+       $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_MAJORMINOR) \
        $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
 libgstreplaygain_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 libgstreplaygain_la_LIBTOOLFLAGS = --tag=disable-static
index a455ad3..aff14eb 100644 (file)
@@ -1600,6 +1600,8 @@ update_arrival_stats (RTPSession * sess, RTPArrivalStats * arrival,
     gboolean rtp, GstBuffer * buffer, GstClockTime current_time,
     GstClockTime running_time, guint64 ntpnstime)
 {
+  GstMetaNetAddress *meta;
+
   /* get time of arrival */
   arrival->current_time = current_time;
   arrival->running_time = running_time;
@@ -1615,11 +1617,12 @@ update_arrival_stats (RTPSession * sess, RTPArrivalStats * arrival,
   }
 
   /* for netbuffer we can store the IP address to check for collisions */
-  arrival->have_address = GST_IS_NETBUFFER (buffer);
-  if (arrival->have_address) {
-    GstNetBuffer *netbuf = (GstNetBuffer *) buffer;
-
-    memcpy (&arrival->address, &netbuf->from, sizeof (GstNetAddress));
+  meta = gst_buffer_get_meta_net_address (buffer);
+  if (meta) {
+    arrival->have_address = TRUE;
+    memcpy (&arrival->address, &meta->naddr, sizeof (GstNetAddress));
+  } else {
+    arrival->have_address = FALSE;
   }
 }
 
index 980fd02..b78a8fa 100644 (file)
@@ -1583,18 +1583,14 @@ again:
 
   /* we keep these elements, we configure all in configure_transport when the
    * server told us to really use the UDP ports. */
-  stream->udpsrc[0] = gst_object_ref (udpsrc0);
-  stream->udpsrc[1] = gst_object_ref (udpsrc1);
+  stream->udpsrc[0] = gst_object_ref_sink (udpsrc0);
+  stream->udpsrc[1] = gst_object_ref_sink (udpsrc1);
 
   /* keep track of next available port number when we have a range
    * configured */
   if (src->next_port_num != 0)
     src->next_port_num = tmp_rtcp + 1;
 
-  /* they are ours now */
-  gst_object_sink (udpsrc0);
-  gst_object_sink (udpsrc1);
-
   return TRUE;
 
   /* ERRORS */
@@ -2664,8 +2660,7 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
       goto no_element;
 
     /* take ownership */
-    gst_object_ref (stream->udpsrc[0]);
-    gst_object_sink (stream->udpsrc[0]);
+    gst_object_ref_sink (stream->udpsrc[0]);
 
     /* change state */
     gst_element_set_state (stream->udpsrc[0], GST_STATE_PAUSED);
@@ -2680,8 +2675,7 @@ gst_rtspsrc_stream_configure_mcast (GstRTSPSrc * src, GstRTSPStream * stream,
       goto no_element;
 
     /* take ownership */
-    gst_object_ref (stream->udpsrc[1]);
-    gst_object_sink (stream->udpsrc[1]);
+    gst_object_ref_sink (stream->udpsrc[1]);
 
     gst_element_set_state (stream->udpsrc[1], GST_STATE_PAUSED);
   }
index d7b5678..ec65089 100644 (file)
@@ -211,29 +211,29 @@ gst_dynudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
   GstDynUDPSink *sink;
   gint ret, size;
   guint8 *data;
-  GstNetBuffer *netbuf;
+  GstMetaNetAddress *meta;
   struct sockaddr_in theiraddr;
   guint16 destport;
   guint32 destaddr;
 
   memset (&theiraddr, 0, sizeof (theiraddr));
 
-  if (GST_IS_NETBUFFER (buffer)) {
-    netbuf = GST_NETBUFFER (buffer);
-  } else {
+  meta = gst_buffer_get_meta_net_address (buffer);
+
+  if (meta == NULL) {
     GST_DEBUG ("Received buffer is not a GstNetBuffer, skipping");
     return GST_FLOW_OK;
   }
 
   sink = GST_DYNUDPSINK (bsink);
 
-  size = GST_BUFFER_SIZE (netbuf);
-  data = GST_BUFFER_DATA (netbuf);
+  size = GST_BUFFER_SIZE (buffer);
+  data = GST_BUFFER_DATA (buffer);
 
   GST_DEBUG ("about to send %d bytes", size);
 
-  // let's get the address from the netbuffer
-  gst_netaddress_get_ip4_address (&netbuf->to, &destaddr, &destport);
+  /* let's get the address from the metaata */
+  gst_netaddress_get_ip4_address (&meta->naddr, &destaddr, &destport);
 
   GST_DEBUG ("sending %d bytes to client %d port %d", size, destaddr, destport);
 
index fbdbfea..3b77865 100644 (file)
@@ -36,9 +36,10 @@ plugin_init (GstPlugin * plugin)
     return FALSE;
 #endif
 
-  /* register type of the netbuffer so that we can use it from multiple threads
-   * right away. Note that the plugin loading is always serialized */
-  gst_netbuffer_get_type ();
+  /* register info of the netaddress metadata so that we can use it from
+   * multiple threads right away. Note that the plugin loading is always
+   * serialized */
+  gst_meta_net_address_get_info ();
 
   if (!gst_element_register (plugin, "udpsink", GST_RANK_NONE,
           GST_TYPE_UDPSINK))
index 4363044..d2db1d2 100644 (file)
@@ -409,7 +409,8 @@ static GstFlowReturn
 gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
 {
   GstUDPSrc *udpsrc;
-  GstNetBuffer *outbuf;
+  GstMetaNetAddress *meta;
+  GstBuffer *outbuf;
   union gst_sockaddr
   {
     struct sockaddr sa;
@@ -527,8 +528,7 @@ no_select:
       break;
   }
 
-  /* special case buffer so receivers can also track the address */
-  outbuf = gst_netbuffer_new ();
+  outbuf = gst_buffer_new ();
   GST_BUFFER_MALLOCDATA (outbuf) = pktdata;
 
   /* patch pktdata and len when stripping off the headers */
@@ -542,10 +542,13 @@ no_select:
   GST_BUFFER_DATA (outbuf) = pktdata;
   GST_BUFFER_SIZE (outbuf) = ret;
 
+  /* use buffer metadata so receivers can also track the address */
+  meta = gst_buffer_add_meta_net_address (outbuf);
+
   switch (sa.sa.sa_family) {
     case AF_INET:
     {
-      gst_netaddress_set_ip4_address (&outbuf->from, sa.sa_in.sin_addr.s_addr,
+      gst_netaddress_set_ip4_address (&meta->naddr, sa.sa_in.sin_addr.s_addr,
           sa.sa_in.sin_port);
     }
       break;
@@ -554,7 +557,7 @@ no_select:
       guint8 ip6[16];
 
       memcpy (ip6, &sa.sa_in6.sin6_addr, sizeof (ip6));
-      gst_netaddress_set_ip6_address (&outbuf->from, ip6, sa.sa_in6.sin6_port);
+      gst_netaddress_set_ip6_address (&meta->naddr, ip6, sa.sa_in6.sin6_port);
     }
       break;
     default:
index e976ec5..5c3f018 100644 (file)
 GST_DEBUG_CATEGORY_EXTERN (v4l2_debug);
 #define GST_CAT_DEFAULT v4l2_debug
 
-
 /*
  * GstV4l2Buffer:
  */
-
-static GstBufferClass *v4l2buffer_parent_class = NULL;
+const GstMetaInfo *
+gst_meta_v4l2_get_info (void)
+{
+  static const GstMetaInfo *meta_info = NULL;
+
+  if (meta_info == NULL) {
+    meta_info =
+        gst_meta_register ("GstMetaV4l2", "GstMetaV4l2",
+        sizeof (GstMetaV4l2), (GstMetaInitFunction) NULL,
+        (GstMetaFreeFunction) NULL, (GstMetaCopyFunction) NULL,
+        (GstMetaSubFunction) NULL, (GstMetaSerializeFunction) NULL,
+        (GstMetaDeserializeFunction) NULL);
+  }
+  return meta_info;
+}
 
 static void
-gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer)
+gst_v4l2_buffer_dispose (GstBuffer * buffer)
 {
   GstV4l2BufferPool *pool;
   gboolean resuscitated = FALSE;
   gint index;
+  GstMetaV4l2 *meta;
 
-  pool = buffer->pool;
+  meta = GST_META_V4L2_GET (buffer);
+  g_assert (meta != NULL);
 
-  index = buffer->vbuffer.index;
+  pool = meta->pool;
+  index = meta->vbuffer.index;
 
   GST_LOG_OBJECT (pool->v4l2elem, "finalizing buffer %p %d", buffer, index);
 
@@ -95,7 +110,7 @@ gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer)
   if (resuscitated) {
     /* FIXME: check that the caps didn't change */
     GST_LOG_OBJECT (pool->v4l2elem, "reviving buffer %p, %d", buffer, index);
-    gst_buffer_ref (GST_BUFFER (buffer));
+    gst_buffer_ref (buffer);
     GST_BUFFER_SIZE (buffer) = 0;
     pool->buffers[index] = buffer;
   }
@@ -105,96 +120,63 @@ gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer)
   if (!resuscitated) {
     GST_LOG_OBJECT (pool->v4l2elem,
         "buffer %p (data %p, len %u) not recovered, unmapping",
-        buffer, GST_BUFFER_DATA (buffer), buffer->vbuffer.length);
-    gst_mini_object_unref (GST_MINI_OBJECT (pool));
-    v4l2_munmap ((void *) GST_BUFFER_DATA (buffer), buffer->vbuffer.length);
+        buffer, GST_BUFFER_DATA (buffer), meta->vbuffer.length);
+    v4l2_munmap ((void *) GST_BUFFER_DATA (buffer), meta->vbuffer.length);
 
-    GST_MINI_OBJECT_CLASS (v4l2buffer_parent_class)->finalize (GST_MINI_OBJECT
-        (buffer));
+    g_object_unref (pool);
   }
 }
 
-static void
-gst_v4l2_buffer_class_init (gpointer g_class, gpointer class_data)
-{
-  GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
-
-  v4l2buffer_parent_class = g_type_class_peek_parent (g_class);
-
-  mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
-      gst_v4l2_buffer_finalize;
-}
-
-GType
-gst_v4l2_buffer_get_type (void)
-{
-  static GType _gst_v4l2_buffer_type;
-
-  if (G_UNLIKELY (_gst_v4l2_buffer_type == 0)) {
-    static const GTypeInfo v4l2_buffer_info = {
-      sizeof (GstBufferClass),
-      NULL,
-      NULL,
-      gst_v4l2_buffer_class_init,
-      NULL,
-      NULL,
-      sizeof (GstV4l2Buffer),
-      0,
-      NULL,
-      NULL
-    };
-    _gst_v4l2_buffer_type = g_type_register_static (GST_TYPE_BUFFER,
-        "GstV4l2Buffer", &v4l2_buffer_info, 0);
-  }
-  return _gst_v4l2_buffer_type;
-}
-
-static GstV4l2Buffer *
+static GstBuffer *
 gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps)
 {
-  GstV4l2Buffer *ret;
-  guint8 *data;
+  GstBuffer *ret;
+  guint8 *mem;
+  GstMetaV4l2 *meta;
+
+  ret = gst_buffer_new ();
+  GST_MINI_OBJECT_CAST (ret)->dispose =
+      (GstMiniObjectDisposeFunction) gst_v4l2_buffer_dispose;
 
-  ret = (GstV4l2Buffer *) gst_mini_object_new (GST_TYPE_V4L2_BUFFER);
+  meta = GST_META_V4L2_ADD (ret);
 
   GST_LOG_OBJECT (pool->v4l2elem, "creating buffer %u, %p in pool %p", index,
       ret, pool);
 
-  ret->pool =
-      (GstV4l2BufferPool *) gst_mini_object_ref (GST_MINI_OBJECT (pool));
+  meta->pool = (GstV4l2BufferPool *) g_object_ref (pool);
 
-  ret->vbuffer.index = index;
-  ret->vbuffer.type = pool->type;
-  ret->vbuffer.memory = V4L2_MEMORY_MMAP;
+  meta->vbuffer.index = index;
+  meta->vbuffer.type = pool->type;
+  meta->vbuffer.memory = V4L2_MEMORY_MMAP;
 
-  if (v4l2_ioctl (pool->video_fd, VIDIOC_QUERYBUF, &ret->vbuffer) < 0)
+  if (v4l2_ioctl (pool->video_fd, VIDIOC_QUERYBUF, &meta->vbuffer) < 0)
     goto querybuf_failed;
 
-  GST_LOG_OBJECT (pool->v4l2elem, "  index:     %u", ret->vbuffer.index);
-  GST_LOG_OBJECT (pool->v4l2elem, "  type:      %d", ret->vbuffer.type);
-  GST_LOG_OBJECT (pool->v4l2elem, "  bytesused: %u", ret->vbuffer.bytesused);
-  GST_LOG_OBJECT (pool->v4l2elem, "  flags:     %08x", ret->vbuffer.flags);
-  GST_LOG_OBJECT (pool->v4l2elem, "  field:     %d", ret->vbuffer.field);
-  GST_LOG_OBJECT (pool->v4l2elem, "  memory:    %d", ret->vbuffer.memory);
-  if (ret->vbuffer.memory == V4L2_MEMORY_MMAP)
+  GST_LOG_OBJECT (pool->v4l2elem, "  index:     %u", meta->vbuffer.index);
+  GST_LOG_OBJECT (pool->v4l2elem, "  type:      %d", meta->vbuffer.type);
+  GST_LOG_OBJECT (pool->v4l2elem, "  bytesused: %u", meta->vbuffer.bytesused);
+  GST_LOG_OBJECT (pool->v4l2elem, "  flags:     %08x", meta->vbuffer.flags);
+  GST_LOG_OBJECT (pool->v4l2elem, "  field:     %d", meta->vbuffer.field);
+  GST_LOG_OBJECT (pool->v4l2elem, "  memory:    %d", meta->vbuffer.memory);
+  if (meta->vbuffer.memory == V4L2_MEMORY_MMAP)
     GST_LOG_OBJECT (pool->v4l2elem, "  MMAP offset:  %u",
-        ret->vbuffer.m.offset);
-  GST_LOG_OBJECT (pool->v4l2elem, "  length:    %u", ret->vbuffer.length);
-  GST_LOG_OBJECT (pool->v4l2elem, "  input:     %u", ret->vbuffer.input);
+        meta->vbuffer.m.offset);
+  GST_LOG_OBJECT (pool->v4l2elem, "  length:    %u", meta->vbuffer.length);
+  GST_LOG_OBJECT (pool->v4l2elem, "  input:     %u", meta->vbuffer.input);
 
-  data = (guint8 *) v4l2_mmap (0, ret->vbuffer.length,
+  mem = (guint8 *) v4l2_mmap (0, meta->vbuffer.length,
       PROT_READ | PROT_WRITE, MAP_SHARED, pool->video_fd,
-      ret->vbuffer.m.offset);
+      meta->vbuffer.m.offset);
 
-  if (data == MAP_FAILED)
+  if (mem == MAP_FAILED)
     goto mmap_failed;
 
-  GST_BUFFER_DATA (ret) = data;
-  GST_BUFFER_SIZE (ret) = ret->vbuffer.length;
+  GST_BUFFER_DATA (ret) = mem;
+  GST_BUFFER_SIZE (ret) = meta->vbuffer.length;
 
   GST_BUFFER_FLAG_SET (ret, GST_BUFFER_FLAG_READONLY);
 
-  gst_buffer_set_caps (GST_BUFFER (ret), caps);
+  gst_buffer_set_caps (ret, caps);
 
   return ret;
 
@@ -204,7 +186,7 @@ querybuf_failed:
     gint errnosave = errno;
 
     GST_WARNING ("Failed QUERYBUF: %s", g_strerror (errnosave));
-    gst_buffer_unref (GST_BUFFER (ret));
+    gst_buffer_unref (ret);
     errno = errnosave;
     return NULL;
   }
@@ -213,7 +195,7 @@ mmap_failed:
     gint errnosave = errno;
 
     GST_WARNING ("Failed to mmap: %s", g_strerror (errnosave));
-    gst_buffer_unref (GST_BUFFER (ret));
+    gst_buffer_unref (ret);
     errno = errnosave;
     return NULL;
   }
@@ -224,11 +206,13 @@ mmap_failed:
  * GstV4l2BufferPool:
  */
 
-static GstMiniObjectClass *buffer_pool_parent_class = NULL;
+static GObjectClass *buffer_pool_parent_class = NULL;
 
 static void
-gst_v4l2_buffer_pool_finalize (GstV4l2BufferPool * pool)
+gst_v4l2_buffer_pool_finalize (GObject * object)
 {
+  GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (object);
+
   g_mutex_free (pool->lock);
   pool->lock = NULL;
 
@@ -243,8 +227,7 @@ gst_v4l2_buffer_pool_finalize (GstV4l2BufferPool * pool)
     pool->buffers = NULL;
   }
 
-  GST_MINI_OBJECT_CLASS (buffer_pool_parent_class)->finalize (GST_MINI_OBJECT
-      (pool));
+  buffer_pool_parent_class->finalize (object);
 }
 
 static void
@@ -258,12 +241,11 @@ gst_v4l2_buffer_pool_init (GstV4l2BufferPool * pool, gpointer g_class)
 static void
 gst_v4l2_buffer_pool_class_init (gpointer g_class, gpointer class_data)
 {
-  GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
+  GObjectClass *object_class = G_OBJECT_CLASS (g_class);
 
   buffer_pool_parent_class = g_type_class_peek_parent (g_class);
 
-  mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
-      gst_v4l2_buffer_pool_finalize;
+  object_class->finalize = gst_v4l2_buffer_pool_finalize;
 }
 
 GType
@@ -273,7 +255,7 @@ gst_v4l2_buffer_pool_get_type (void)
 
   if (G_UNLIKELY (_gst_v4l2_buffer_pool_type == 0)) {
     static const GTypeInfo v4l2_buffer_pool_info = {
-      sizeof (GstMiniObjectClass),
+      sizeof (GObjectClass),
       NULL,
       NULL,
       gst_v4l2_buffer_pool_class_init,
@@ -284,7 +266,7 @@ gst_v4l2_buffer_pool_get_type (void)
       (GInstanceInitFunc) gst_v4l2_buffer_pool_init,
       NULL
     };
-    _gst_v4l2_buffer_pool_type = g_type_register_static (GST_TYPE_MINI_OBJECT,
+    _gst_v4l2_buffer_pool_type = g_type_register_static (G_TYPE_OBJECT,
         "GstV4l2BufferPool", &v4l2_buffer_pool_info, 0);
   }
   return _gst_v4l2_buffer_pool_type;
@@ -335,7 +317,7 @@ gst_v4l2_buffer_pool_new (GstElement * v4l2elem, gint fd, gint num_buffers,
   gint n;
   struct v4l2_requestbuffers breq;
 
-  pool = (GstV4l2BufferPool *) gst_mini_object_new (GST_TYPE_V4L2_BUFFER_POOL);
+  pool = (GstV4l2BufferPool *) g_object_new (GST_TYPE_V4L2_BUFFER_POOL, NULL);
 
   pool->video_fd = v4l2_dup (fd);
   if (pool->video_fd < 0)
@@ -370,7 +352,7 @@ gst_v4l2_buffer_pool_new (GstElement * v4l2elem, gint fd, gint num_buffers,
   pool->requeuebuf = requeuebuf;
   pool->type = type;
   pool->buffer_count = num_buffers;
-  pool->buffers = g_new0 (GstV4l2Buffer *, num_buffers);
+  pool->buffers = g_new0 (GstBuffer *, num_buffers);
   pool->avail_buffers = g_async_queue_new ();
 
   /* now, map the buffers: */
@@ -389,7 +371,7 @@ dup_failed:
   {
     gint errnosave = errno;
 
-    gst_mini_object_unref (GST_MINI_OBJECT (pool));
+    g_object_unref (pool);
 
     errno = errnosave;
 
@@ -461,7 +443,7 @@ gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool)
       gst_buffer_unref (buf);
   }
 
-  gst_mini_object_unref (GST_MINI_OBJECT (pool));
+  g_object_unref (pool);
 }
 
 /**
@@ -472,10 +454,10 @@ gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool)
  *
  * Get an available buffer in the pool
  */
-GstV4l2Buffer *
+GstBuffer *
 gst_v4l2_buffer_pool_get (GstV4l2BufferPool * pool, gboolean blocking)
 {
-  GstV4l2Buffer *buf;
+  GstBuffer *buf;
 
   if (blocking) {
     buf = g_async_queue_pop (pool->avail_buffers);
@@ -484,8 +466,10 @@ gst_v4l2_buffer_pool_get (GstV4l2BufferPool * pool, gboolean blocking)
   }
 
   if (buf) {
+    GstMetaV4l2 *meta = GST_META_V4L2_GET (buf);
+
     GST_V4L2_BUFFER_POOL_LOCK (pool);
-    GST_BUFFER_SIZE (buf) = buf->vbuffer.length;
+    GST_BUFFER_SIZE (buf) = meta->vbuffer.length;
     GST_BUFFER_FLAG_UNSET (buf, 0xffffffff);
     GST_V4L2_BUFFER_POOL_UNLOCK (pool);
   }
@@ -506,11 +490,16 @@ gst_v4l2_buffer_pool_get (GstV4l2BufferPool * pool, gboolean blocking)
  * Returns: %TRUE for success
  */
 gboolean
-gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool * pool, GstV4l2Buffer * buf)
+gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool * pool, GstBuffer * buf)
 {
-  GST_LOG_OBJECT (pool->v4l2elem, "enqueue pool buffer %d", buf->vbuffer.index);
+  GstMetaV4l2 *meta;
 
-  if (v4l2_ioctl (pool->video_fd, VIDIOC_QBUF, &buf->vbuffer) < 0)
+  meta = GST_META_V4L2_GET (buf);
+
+  GST_LOG_OBJECT (pool->v4l2elem, "enqueue pool buffer %d",
+      meta->vbuffer.index);
+
+  if (v4l2_ioctl (pool->video_fd, VIDIOC_QBUF, &meta->vbuffer) < 0)
     return FALSE;
 
   pool->num_live_buffers--;
@@ -530,18 +519,17 @@ gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool * pool, GstV4l2Buffer * buf)
  *
  * Returns: a buffer
  */
-GstV4l2Buffer *
+GstBuffer *
 gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool * pool)
 {
   GstV4l2Object *v4l2object = get_v4l2_object (pool->v4l2elem);
-  GstV4l2Buffer *pool_buffer;
+  GstBuffer *pool_buffer;
   struct v4l2_buffer buffer;
 
   memset (&buffer, 0x00, sizeof (buffer));
   buffer.type = pool->type;
   buffer.memory = V4L2_MEMORY_MMAP;
 
-
   if (v4l2_ioctl (pool->video_fd, VIDIOC_DQBUF, &buffer) >= 0) {
 
     GST_V4L2_BUFFER_POOL_LOCK (pool);
index caad9ac..a7e6a74 100644 (file)
@@ -46,12 +46,12 @@ GType gst_v4l2_buffer_pool_get_type (void);
 
 
 typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
-typedef struct _GstV4l2Buffer GstV4l2Buffer;
+typedef struct _GstMetaV4l2 GstMetaV4l2;
 
 
 struct _GstV4l2BufferPool
 {
-  GstMiniObject parent;
+  GObject parent;
 
   GstElement *v4l2elem;      /* the v4l2 src/sink that owns us.. maybe we should be owned by v4l2object? */
   gboolean requeuebuf;       /* if true, unusued buffers are automatically re-QBUF'd */
@@ -63,11 +63,11 @@ struct _GstV4l2BufferPool
   GAsyncQueue* avail_buffers;/* pool of available buffers, not with the driver and which aren't held outside the bufferpool */
   gint video_fd;             /* a dup(2) of the v4l2object's video_fd */
   guint buffer_count;
-  GstV4l2Buffer **buffers;
+  GstBuffer **buffers;
 };
 
-struct _GstV4l2Buffer {
-  GstBuffer   buffer;
+struct _GstMetaV4l2 {
+  GstMeta meta;
 
   struct v4l2_buffer vbuffer;
 
@@ -78,13 +78,17 @@ struct _GstV4l2Buffer {
   GstV4l2BufferPool *pool;
 };
 
+const GstMetaInfo * gst_meta_v4l2_get_info (void);
+#define GST_META_V4L2_GET(buf) ((GstMetaV4l2 *)gst_buffer_get_meta(buf,gst_meta_v4l2_get_info()))
+#define GST_META_V4L2_ADD(buf) ((GstMetaV4l2 *)gst_buffer_add_meta(buf,gst_meta_v4l2_get_info(),NULL))
+
 void gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool);
 GstV4l2BufferPool *gst_v4l2_buffer_pool_new (GstElement *v4l2elem, gint fd, gint num_buffers, GstCaps * caps, gboolean requeuebuf, enum v4l2_buf_type type);
 
 
-GstV4l2Buffer *gst_v4l2_buffer_pool_get (GstV4l2BufferPool *pool, gboolean blocking);
-gboolean gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool *pool, GstV4l2Buffer *buf);
-GstV4l2Buffer *gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool *pool);
+GstBuffer *gst_v4l2_buffer_pool_get (GstV4l2BufferPool *pool, gboolean blocking);
+gboolean gst_v4l2_buffer_pool_qbuf (GstV4l2BufferPool *pool, GstBuffer *buf);
+GstBuffer *gst_v4l2_buffer_pool_dqbuf (GstV4l2BufferPool *pool);
 
 gint gst_v4l2_buffer_pool_available_buffers (GstV4l2BufferPool *pool);
 
index 6cf9036..49d7042 100644 (file)
@@ -66,21 +66,21 @@ enum
   V4L2_STD_OBJECT_PROPS,
 };
 
+G_LOCK_DEFINE_STATIC (probe_lock);
+
 const GList *
 gst_v4l2_probe_get_properties (GstPropertyProbe * probe)
 {
   GObjectClass *klass = G_OBJECT_GET_CLASS (probe);
   static GList *list = NULL;
 
-  /* well, not perfect, but better than no locking at all.
-   * In the worst case we leak a list node, so who cares? */
-  GST_CLASS_LOCK (GST_OBJECT_CLASS (klass));
+  G_LOCK (probe_lock);
 
   if (!list) {
     list = g_list_append (NULL, g_object_class_find_property (klass, "device"));
   }
 
-  GST_CLASS_UNLOCK (GST_OBJECT_CLASS (klass));
+  G_UNLOCK (probe_lock);
 
   return list;
 }
index 2ad5631..c341e19 100644 (file)
@@ -45,7 +45,7 @@ struct _GstV4l2Xv
 {
   Display *dpy;
   gint port, idle_id, event_id;
-  GMutex *mutex;                       /* to serialize calls to X11 */
+  GMutex *mutex;                /* to serialize calls to X11 */
 };
 
 GST_DEBUG_CATEGORY_STATIC (v4l2xv_debug);
@@ -179,7 +179,7 @@ gst_v4l2_xoverlay_stop (GstV4l2Object * v4l2object)
 
 /* should be called with mutex held */
 static gboolean
-get_render_rect (GstV4l2Object * v4l2object, GstVideoRectangle *rect)
+get_render_rect (GstV4l2Object * v4l2object, GstVideoRectangle * rect)
 {
   GstV4l2Xv *v4l2xv = v4l2object->xv;
   if (v4l2xv && v4l2xv->dpy && v4l2object->xwindow_id) {
@@ -197,8 +197,8 @@ get_render_rect (GstV4l2Object * v4l2object, GstVideoRectangle *rect)
 }
 
 gboolean
-gst_v4l2_xoverlay_get_render_rect (GstV4l2Object *v4l2object,
-    GstVideoRectangle *rect)
+gst_v4l2_xoverlay_get_render_rect (GstV4l2Object * v4l2object,
+    GstVideoRectangle * rect)
 {
   GstV4l2Xv *v4l2xv = v4l2object->xv;
   gboolean ret = FALSE;
@@ -272,7 +272,7 @@ event_refresh (gpointer data)
        * interesting.
        */
       while (XCheckWindowEvent (v4l2xv->dpy, v4l2object->xwindow_id,
-          PointerMotionMask, &e)) {
+              PointerMotionMask, &e)) {
         switch (e.type) {
           case MotionNotify:
             pointer_x = e.xmotion.x;
@@ -307,18 +307,16 @@ event_refresh (gpointer data)
             GST_DEBUG_OBJECT (v4l2object->element,
                 "button %d pressed over window at %d,%d",
                 e.xbutton.button, e.xbutton.x, e.xbutton.y);
-            gst_navigation_send_mouse_event (
-                GST_NAVIGATION (v4l2object->element),
-                "mouse-button-press", e.xbutton.button,
+            gst_navigation_send_mouse_event (GST_NAVIGATION
+                (v4l2object->element), "mouse-button-press", e.xbutton.button,
                 e.xbutton.x, e.xbutton.y);
             break;
           case ButtonRelease:
             GST_DEBUG_OBJECT (v4l2object->element,
                 "button %d released over window at %d,%d",
                 e.xbutton.button, e.xbutton.x, e.xbutton.y);
-            gst_navigation_send_mouse_event (
-                GST_NAVIGATION (v4l2object->element),
-                "mouse-button-release", e.xbutton.button,
+            gst_navigation_send_mouse_event (GST_NAVIGATION
+                (v4l2object->element), "mouse-button-release", e.xbutton.button,
                 e.xbutton.x, e.xbutton.y);
             break;
           case KeyPress:
@@ -334,8 +332,7 @@ event_refresh (gpointer data)
             GST_DEBUG_OBJECT (v4l2object->element,
                 "key %d pressed over window at %d,%d (%s)",
                 e.xkey.keycode, e.xkey.x, e.xkey.y, key_str);
-            gst_navigation_send_key_event (
-                GST_NAVIGATION (v4l2object->element),
+            gst_navigation_send_key_event (GST_NAVIGATION (v4l2object->element),
                 e.type == KeyPress ? "key-press" : "key-release", key_str);
             break;
           default:
@@ -468,8 +465,7 @@ gst_v4l2_xoverlay_prepare_xwindow_id (GstV4l2Object * v4l2object,
     event_mask = ExposureMask | StructureNotifyMask;
     if (GST_IS_NAVIGATION (v4l2object->element)) {
       event_mask |= PointerMotionMask |
-          KeyPressMask | KeyReleaseMask |
-          ButtonPressMask | ButtonReleaseMask;
+          KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask;
     }
     XSelectInput (v4l2xv->dpy, win, event_mask);
     v4l2xv->event_id = g_timeout_add (45, event_refresh, v4l2object);
index fb6c374..a898503 100644 (file)
@@ -66,7 +66,7 @@ static gboolean
 gst_v4l2src_buffer_pool_activate (GstV4l2BufferPool * pool,
     GstV4l2Src * v4l2src)
 {
-  GstV4l2Buffer *buf;
+  GstBuffer *buf;
 
   while ((buf = gst_v4l2_buffer_pool_get (pool, FALSE)) != NULL)
     if (!gst_v4l2_buffer_pool_qbuf (pool, buf))
@@ -81,7 +81,8 @@ queue_failed:
         (_("Could not enqueue buffers in device '%s'."),
             v4l2src->v4l2object->videodev),
         ("enqueing buffer %d/%d failed: %s",
-            buf->vbuffer.index, v4l2src->num_buffers, g_strerror (errno)));
+            GST_META_V4L2_GET (buf)->vbuffer.index, v4l2src->num_buffers,
+            g_strerror (errno)));
     return FALSE;
   }
 }
index e705ccb..2c2106a 100644 (file)
@@ -80,16 +80,15 @@ static void gst_ximage_src_clear_bufpool (GstXImageSrc * ximagesrc);
 
 /* Called when a buffer is returned from the pipeline */
 static void
-gst_ximage_src_return_buf (GstXImageSrc * ximagesrc,
-    GstXImageSrcBuffer * ximage)
+gst_ximage_src_return_buf (GstXImageSrc * ximagesrc, GstBuffer * ximage)
 {
+  GstMetaXImage *meta = GST_META_XIMAGE_GET (ximage);
+
   /* If our geometry changed we can't reuse that image. */
-  if ((ximage->width != ximagesrc->width) ||
-      (ximage->height != ximagesrc->height)) {
+  if ((meta->width != ximagesrc->width) || (meta->height != ximagesrc->height)) {
     GST_DEBUG_OBJECT (ximagesrc,
         "destroy image %p as its size changed %dx%d vs current %dx%d",
-        ximage, ximage->width, ximage->height,
-        ximagesrc->width, ximagesrc->height);
+        ximage, meta->width, meta->height, ximagesrc->width, ximagesrc->height);
     g_mutex_lock (ximagesrc->x_lock);
     gst_ximageutil_ximage_destroy (ximagesrc->xcontext, ximage);
     g_mutex_unlock (ximagesrc->x_lock);
@@ -97,7 +96,7 @@ gst_ximage_src_return_buf (GstXImageSrc * ximagesrc,
     /* In that case we can reuse the image and add it to our image pool. */
     GST_LOG_OBJECT (ximagesrc, "recycling image %p in pool", ximage);
     /* need to increment the refcount again to recycle */
-    gst_buffer_ref (GST_BUFFER (ximage));
+    gst_buffer_ref (ximage);
     g_mutex_lock (ximagesrc->pool_lock);
     ximagesrc->buffer_pool = g_slist_prepend (ximagesrc->buffer_pool, ximage);
     g_mutex_unlock (ximagesrc->pool_lock);
@@ -358,17 +357,20 @@ composite_pixel (GstXContext * xcontext, guchar * dest, guchar * src)
 
 /* Retrieve an XImageSrcBuffer, preferably from our
  * pool of existing images and populate it from the window */
-static GstXImageSrcBuffer *
+static GstBuffer *
 gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
 {
-  GstXImageSrcBuffer *ximage = NULL;
+  GstBuffer *ximage = NULL;
+  GstMetaXImage *meta;
 
   g_mutex_lock (ximagesrc->pool_lock);
   while (ximagesrc->buffer_pool != NULL) {
     ximage = ximagesrc->buffer_pool->data;
 
-    if ((ximage->width != ximagesrc->width) ||
-        (ximage->height != ximagesrc->height)) {
+    meta = GST_META_XIMAGE_GET (ximage);
+
+    if ((meta->width != ximagesrc->width) ||
+        (meta->height != ximagesrc->height)) {
       gst_ximage_buffer_free (ximage);
     }
 
@@ -413,13 +415,16 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
         gst_value_get_fraction_numerator (xcontext->par),
         gst_value_get_fraction_denominator (xcontext->par), NULL);
 
-    gst_buffer_set_caps (GST_BUFFER (ximage), caps);
+    gst_buffer_set_caps (ximage, caps);
     g_mutex_unlock (ximagesrc->x_lock);
 
     gst_caps_unref (caps);
   }
 
   g_return_val_if_fail (GST_IS_XIMAGE_SRC (ximagesrc), NULL);
+
+  meta = GST_META_XIMAGE_GET (ximage);
+
 #ifdef HAVE_XDAMAGE
   if (ximagesrc->have_xdamage && ximagesrc->use_damage &&
       ximagesrc->last_ximage != NULL) {
@@ -492,7 +497,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
                     startx, starty, width, height);
                 XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
                     startx, starty, width, height, AllPlanes, ZPixmap,
-                    ximage->ximage, startx - ximagesrc->startx,
+                    meta->ximage, startx - ximagesrc->startx,
                     starty - ximagesrc->starty);
               }
             } else {
@@ -504,7 +509,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
               XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
                   rects[i].x, rects[i].y,
                   rects[i].width, rects[i].height,
-                  AllPlanes, ZPixmap, ximage->ximage, rects[i].x, rects[i].y);
+                  AllPlanes, ZPixmap, meta->ximage, rects[i].x, rects[i].y);
             }
           }
           free (rects);
@@ -566,14 +571,14 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
           GST_DEBUG_OBJECT (ximagesrc, "Removing cursor from %d,%d", x, y);
           XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
               startx, starty, iwidth, iheight, AllPlanes, ZPixmap,
-              ximage->ximage, startx - ximagesrc->startx,
+              meta->ximage, startx - ximagesrc->startx,
               starty - ximagesrc->starty);
         }
       } else {
 
         GST_DEBUG_OBJECT (ximagesrc, "Removing cursor from %d,%d", x, y);
         XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
-            x, y, width, height, AllPlanes, ZPixmap, ximage->ximage, x, y);
+            x, y, width, height, AllPlanes, ZPixmap, meta->ximage, x, y);
       }
     }
 #endif
@@ -586,7 +591,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
     if (ximagesrc->xcontext->use_xshm) {
       GST_DEBUG_OBJECT (ximagesrc, "Retrieving screen using XShm");
       XShmGetImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
-          ximage->ximage, ximagesrc->startx, ximagesrc->starty, AllPlanes);
+          meta->ximage, ximagesrc->startx, ximagesrc->starty, AllPlanes);
 
     } else
 #endif /* HAVE_XSHM */
@@ -595,9 +600,9 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
       if (ximagesrc->remote) {
         XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
             ximagesrc->startx, ximagesrc->starty, ximagesrc->width,
-            ximagesrc->height, AllPlanes, ZPixmap, ximage->ximage, 0, 0);
+            ximagesrc->height, AllPlanes, ZPixmap, meta->ximage, 0, 0);
       } else {
-        ximage->ximage =
+        meta->ximage =
             XGetImage (ximagesrc->xcontext->disp, ximagesrc->xwindow,
             ximagesrc->startx, ximagesrc->starty, ximagesrc->width,
             ximagesrc->height, AllPlanes, ZPixmap);
@@ -677,7 +682,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
                 (guint8 *) & (ximagesrc->cursor_image->pixels[((j -
                             cy) * ximagesrc->cursor_image->width + (i - cx))]);
             dest =
-                (guint8 *) & (ximage->ximage->data[((j -
+                (guint8 *) & (meta->ximage->data[((j -
                             ximagesrc->starty) * ximagesrc->width + (i -
                             ximagesrc->startx)) * (ximagesrc->xcontext->bpp /
                         8)]);
@@ -708,7 +713,7 @@ static GstFlowReturn
 gst_ximage_src_create (GstPushSrc * bs, GstBuffer ** buf)
 {
   GstXImageSrc *s = GST_XIMAGE_SRC (bs);
-  GstXImageSrcBuffer *image;
+  GstBuffer *image;
   GstClockTime base_time;
   GstClockTime next_capture_ts;
   GstClockTime dur;
@@ -889,7 +894,7 @@ gst_ximage_src_clear_bufpool (GstXImageSrc * ximagesrc)
 {
   g_mutex_lock (ximagesrc->pool_lock);
   while (ximagesrc->buffer_pool != NULL) {
-    GstXImageSrcBuffer *ximage = ximagesrc->buffer_pool->data;
+    GstBuffer *ximage = ximagesrc->buffer_pool->data;
 
     gst_ximage_buffer_free (ximage);
 
index f436df6..732e7af 100644 (file)
@@ -95,7 +95,7 @@ struct _GstXImageSrc
   int damage_event_base;
   XserverRegion damage_region;
   GC damage_copy_gc;
-  GstXImageSrcBuffer *last_ximage;
+  GstBuffer *last_ximage;
 #endif
 };
 
index 0ef4b06..c425162 100644 (file)
 
 #include "ximageutil.h"
 
+const GstMetaInfo *
+gst_meta_ximage_get_info (void)
+{
+  static const GstMetaInfo *meta_ximage_info = NULL;
+
+  if (meta_ximage_info == NULL) {
+    meta_ximage_info =
+        gst_meta_register ("GstMetaXImageSrc", "GstMetaXImageSrc",
+        sizeof (GstMetaXImage), (GstMetaInitFunction) NULL,
+        (GstMetaFreeFunction) NULL, (GstMetaCopyFunction) NULL,
+        (GstMetaSubFunction) NULL, (GstMetaSerializeFunction) NULL,
+        (GstMetaDeserializeFunction) NULL);
+  }
+  return meta_ximage_info;
+}
+
 #ifdef HAVE_XSHM
 static gboolean error_caught = FALSE;
 
@@ -296,154 +312,116 @@ ximageutil_calculate_pixel_aspect_ratio (GstXContext * xcontext)
       gst_value_get_fraction_denominator (xcontext->par));
 }
 
-static GstBufferClass *ximagesrc_buffer_parent_class = NULL;
-
 static void
-gst_ximagesrc_buffer_finalize (GstXImageSrcBuffer * ximage)
+gst_ximagesrc_buffer_dispose (GstBuffer * ximage)
 {
   GstElement *parent;
+  GstMetaXImage *meta;
 
   g_return_if_fail (ximage != NULL);
 
-  parent = ximage->parent;
+  meta = GST_META_XIMAGE_GET (ximage);
+
+  parent = meta->parent;
   if (parent == NULL) {
     g_warning ("XImageSrcBuffer->ximagesrc == NULL");
     goto beach;
   }
 
-  if (ximage->return_func)
-    ximage->return_func (parent, ximage);
+  if (meta->return_func)
+    meta->return_func (parent, ximage);
 
 beach:
-
-  GST_MINI_OBJECT_CLASS (ximagesrc_buffer_parent_class)->finalize
-      (GST_MINI_OBJECT (ximage));
-
   return;
 }
 
 void
-gst_ximage_buffer_free (GstXImageSrcBuffer * ximage)
+gst_ximage_buffer_free (GstBuffer * ximage)
 {
-  /* make sure it is not recycled */
-  ximage->width = -1;
-  ximage->height = -1;
-  gst_buffer_unref (GST_BUFFER (ximage));
-}
+  GstMetaXImage *meta;
 
-static void
-gst_ximagesrc_buffer_init (GstXImageSrcBuffer * ximage_buffer, gpointer g_class)
-{
-#ifdef HAVE_XSHM
-  ximage_buffer->SHMInfo.shmaddr = ((void *) -1);
-  ximage_buffer->SHMInfo.shmid = -1;
-#endif
-}
-
-static void
-gst_ximagesrc_buffer_class_init (gpointer g_class, gpointer class_data)
-{
-  GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
-
-  ximagesrc_buffer_parent_class = g_type_class_peek_parent (g_class);
-
-  mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
-      gst_ximagesrc_buffer_finalize;
-}
+  meta = GST_META_XIMAGE_GET (ximage);
 
-static GType
-gst_ximagesrc_buffer_get_type (void)
-{
-  static GType _gst_ximagesrc_buffer_type;
-
-  if (G_UNLIKELY (_gst_ximagesrc_buffer_type == 0)) {
-    static const GTypeInfo ximagesrc_buffer_info = {
-      sizeof (GstBufferClass),
-      NULL,
-      NULL,
-      gst_ximagesrc_buffer_class_init,
-      NULL,
-      NULL,
-      sizeof (GstXImageSrcBuffer),
-      0,
-      (GInstanceInitFunc) gst_ximagesrc_buffer_init,
-      NULL
-    };
-    _gst_ximagesrc_buffer_type = g_type_register_static (GST_TYPE_BUFFER,
-        "GstXImageSrcBuffer", &ximagesrc_buffer_info, 0);
-  }
-  return _gst_ximagesrc_buffer_type;
+  /* make sure it is not recycled */
+  meta->width = -1;
+  meta->height = -1;
+  gst_buffer_unref (ximage);
 }
 
 /* This function handles GstXImageSrcBuffer creation depending on XShm availability */
-GstXImageSrcBuffer *
+GstBuffer *
 gst_ximageutil_ximage_new (GstXContext * xcontext,
     GstElement * parent, int width, int height, BufferReturnFunc return_func)
 {
-  GstXImageSrcBuffer *ximage = NULL;
+  GstBuffer *ximage = NULL;
+  GstMetaXImage *meta;
   gboolean succeeded = FALSE;
 
-  ximage =
-      (GstXImageSrcBuffer *) gst_mini_object_new (GST_TYPE_XIMAGESRC_BUFFER);
+  ximage = gst_buffer_new ();
+  GST_MINI_OBJECT_CAST (ximage)->dispose =
+      (GstMiniObjectDisposeFunction) gst_ximagesrc_buffer_dispose;
 
-  ximage->width = width;
-  ximage->height = height;
+  meta = GST_META_XIMAGE_ADD (ximage);
+  meta->width = width;
+  meta->height = height;
 
 #ifdef HAVE_XSHM
+  meta->SHMInfo.shmaddr = ((void *) -1);
+  meta->SHMInfo.shmid = -1;
+
   if (xcontext->use_xshm) {
-    ximage->ximage = XShmCreateImage (xcontext->disp,
+    meta->ximage = XShmCreateImage (xcontext->disp,
         xcontext->visual, xcontext->depth,
-        ZPixmap, NULL, &ximage->SHMInfo, ximage->width, ximage->height);
-    if (!ximage->ximage) {
+        ZPixmap, NULL, &meta->SHMInfo, meta->width, meta->height);
+    if (!meta->ximage) {
       goto beach;
     }
 
     /* we have to use the returned bytes_per_line for our shm size */
-    ximage->size = ximage->ximage->bytes_per_line * ximage->ximage->height;
-    ximage->SHMInfo.shmid = shmget (IPC_PRIVATE, ximage->size,
-        IPC_CREAT | 0777);
-    if (ximage->SHMInfo.shmid == -1)
+    meta->size = meta->ximage->bytes_per_line * meta->ximage->height;
+    meta->SHMInfo.shmid = shmget (IPC_PRIVATE, meta->size, IPC_CREAT | 0777);
+    if (meta->SHMInfo.shmid == -1)
       goto beach;
 
-    ximage->SHMInfo.shmaddr = shmat (ximage->SHMInfo.shmid, 0, 0);
-    if (ximage->SHMInfo.shmaddr == ((void *) -1))
+    meta->SHMInfo.shmaddr = shmat (meta->SHMInfo.shmid, 0, 0);
+    if (meta->SHMInfo.shmaddr == ((void *) -1))
       goto beach;
 
     /* Delete the SHM segment. It will actually go away automatically
      * when we detach now */
-    shmctl (ximage->SHMInfo.shmid, IPC_RMID, 0);
+    shmctl (meta->SHMInfo.shmid, IPC_RMID, 0);
 
-    ximage->ximage->data = ximage->SHMInfo.shmaddr;
-    ximage->SHMInfo.readOnly = FALSE;
+    meta->ximage->data = meta->SHMInfo.shmaddr;
+    meta->SHMInfo.readOnly = FALSE;
 
-    if (XShmAttach (xcontext->disp, &ximage->SHMInfo) == 0)
+    if (XShmAttach (xcontext->disp, &meta->SHMInfo) == 0)
       goto beach;
 
     XSync (xcontext->disp, FALSE);
   } else
 #endif /* HAVE_XSHM */
   {
-    ximage->ximage = XCreateImage (xcontext->disp,
+    meta->ximage = XCreateImage (xcontext->disp,
         xcontext->visual,
         xcontext->depth,
-        ZPixmap, 0, NULL, ximage->width, ximage->height, xcontext->bpp, 0);
-    if (!ximage->ximage)
+        ZPixmap, 0, NULL, meta->width, meta->height, xcontext->bpp, 0);
+    if (!meta->ximage)
       goto beach;
 
     /* we have to use the returned bytes_per_line for our image size */
-    ximage->size = ximage->ximage->bytes_per_line * ximage->ximage->height;
-    ximage->ximage->data = g_malloc (ximage->size);
+    meta->size = meta->ximage->bytes_per_line * meta->ximage->height;
+    meta->ximage->data = g_malloc (meta->size);
 
     XSync (xcontext->disp, FALSE);
   }
   succeeded = TRUE;
 
-  GST_BUFFER_DATA (ximage) = (guchar *) ximage->ximage->data;
-  GST_BUFFER_SIZE (ximage) = ximage->size;
+  GST_BUFFER_DATA (ximage) = (guchar *) meta->ximage->data;
+  GST_BUFFER_SIZE (ximage) = meta->size;
 
   /* Keep a ref to our src */
-  ximage->parent = gst_object_ref (parent);
-  ximage->return_func = return_func;
+  meta->parent = gst_object_ref (parent);
+  meta->return_func = return_func;
 beach:
   if (!succeeded) {
     gst_ximage_buffer_free (ximage);
@@ -455,9 +433,12 @@ beach:
 
 /* This function destroys a GstXImageBuffer handling XShm availability */
 void
-gst_ximageutil_ximage_destroy (GstXContext * xcontext,
-    GstXImageSrcBuffer * ximage)
+gst_ximageutil_ximage_destroy (GstXContext * xcontext, GstBuffer * ximage)
 {
+  GstMetaXImage *meta;
+
+  meta = GST_META_XIMAGE_GET (ximage);
+
   /* We might have some buffers destroyed after changing state to NULL */
   if (!xcontext)
     goto beach;
@@ -466,28 +447,28 @@ gst_ximageutil_ximage_destroy (GstXContext * xcontext,
 
 #ifdef HAVE_XSHM
   if (xcontext->use_xshm) {
-    if (ximage->SHMInfo.shmaddr != ((void *) -1)) {
-      XShmDetach (xcontext->disp, &ximage->SHMInfo);
+    if (meta->SHMInfo.shmaddr != ((void *) -1)) {
+      XShmDetach (xcontext->disp, &meta->SHMInfo);
       XSync (xcontext->disp, 0);
-      shmdt (ximage->SHMInfo.shmaddr);
+      shmdt (meta->SHMInfo.shmaddr);
     }
-    if (ximage->ximage)
-      XDestroyImage (ximage->ximage);
+    if (meta->ximage)
+      XDestroyImage (meta->ximage);
 
   } else
 #endif /* HAVE_XSHM */
   {
-    if (ximage->ximage) {
-      XDestroyImage (ximage->ximage);
+    if (meta->ximage) {
+      XDestroyImage (meta->ximage);
     }
   }
 
   XSync (xcontext->disp, FALSE);
 beach:
-  if (ximage->parent) {
+  if (meta->parent) {
     /* Release the ref to our parent */
-    gst_object_unref (ximage->parent);
-    ximage->parent = NULL;
+    gst_object_unref (meta->parent);
+    meta->parent = NULL;
   }
 
   return;
index 517fc8e..aa674de 100644 (file)
@@ -43,7 +43,7 @@ G_BEGIN_DECLS
 typedef struct _GstXContext GstXContext;
 typedef struct _GstXWindow GstXWindow;
 typedef struct _GstXImage GstXImage;
-typedef struct _GstXImageSrcBuffer GstXImageSrcBuffer;
+typedef struct _GstMetaXImage GstMetaXImage;
 
 /* Global X Context stuff */
 /**
@@ -130,20 +130,20 @@ void ximageutil_calculate_pixel_aspect_ratio (GstXContext * xcontext);
 /* custom ximagesrc buffer, copied from ximagesink */
 
 /* BufferReturnFunc is called when a buffer is finalised */
-typedef void (*BufferReturnFunc) (GstElement *parent, GstXImageSrcBuffer *buf);
+typedef void (*BufferReturnFunc) (GstElement *parent, GstBuffer *buf);
 
 /**
- * GstXImageSrcBuffer:
+ * GstMetaXImage:
  * @parent: a reference to the element we belong to
  * @ximage: the XImage of this buffer
  * @width: the width in pixels of XImage @ximage
  * @height: the height in pixels of XImage @ximage
  * @size: the size in bytes of XImage @ximage
  *
- * Subclass of #GstBuffer containing additional information about an XImage.
+ * Extra data attached to buffers containing additional information about an XImage.
  */
-struct _GstXImageSrcBuffer {
-  GstBuffer buffer;
+struct _GstMetaXImage {
+  GstMeta meta;
 
   /* Reference to the ximagesrc we belong to */
   GstElement *parent;
@@ -156,26 +156,22 @@ struct _GstXImageSrcBuffer {
 
   gint width, height;
   size_t size;
-  
+
   BufferReturnFunc return_func;
 };
 
+const GstMetaInfo * gst_meta_ximage_get_info (void);
+#define GST_META_XIMAGE_GET(buf) ((GstMetaXImage *)gst_buffer_get_meta(buf,gst_meta_ximage_get_info()))
+#define GST_META_XIMAGE_ADD(buf) ((GstMetaXImage *)gst_buffer_add_meta(buf,gst_meta_ximage_get_info(),NULL))
 
-GstXImageSrcBuffer *gst_ximageutil_ximage_new (GstXContext *xcontext,
+GstBuffer *gst_ximageutil_ximage_new (GstXContext *xcontext,
   GstElement *parent, int width, int height, BufferReturnFunc return_func);
 
 void gst_ximageutil_ximage_destroy (GstXContext *xcontext, 
-  GstXImageSrcBuffer * ximage);
+  GstBuffer * ximage);
   
 /* Call to manually release a buffer */
-void gst_ximage_buffer_free (GstXImageSrcBuffer *ximage);
-
-#define GST_TYPE_XIMAGESRC_BUFFER            (gst_ximagesrc_buffer_get_type())
-#define GST_IS_XIMAGESRC_BUFFER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_XIMAGESRC_BUFFER))
-#define GST_IS_XIMAGESRC_BUFFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_XIMAGESRC_BUFFER))
-#define GST_XIMAGESRC_BUFFER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_XIMAGESRC_BUFFER, GstXImageSrcBuffer))
-#define GST_XIMAGESRC_BUFFER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_XIMAGESRC_BUFFER, GstXImageSrcBufferClass))
-#define GST_XIMAGESRC_BUFFER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_XIMAGESRC_BUFFER, GstXImageSrcBufferClass))
+void gst_ximage_buffer_free (GstBuffer *ximage);
 
 G_END_DECLS 
 
index 5d35e61..e9a2d96 100644 (file)
@@ -1,5 +1,5 @@
 noinst_PROGRAMS = pulse
 pulse_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
-pulse_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+pulse_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_LIBS)
 
 
index 4fdb7e3..7db85d4 100644 (file)
@@ -6,5 +6,5 @@ camctrl_LDADD = $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) $(GST_LIBS)
 
 probe_SOURCES = probe.c
 probe_CFLAGS  = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
-probe_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_BASE_LIBS) $(GST_LIBS)
+probe_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(GST_LIBS)
 
index 5b1eb22..8181846 100644 (file)
@@ -23,7 +23,7 @@ OSS4_TESTS=test-oss4
 
 test_oss4_SOURCES = test-oss4.c
 test_oss4_CFLAGS  = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
-test_oss4_LDADD   = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-0.10 $(GST_LIBS)
+test_oss4_LDADD   = $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-$(GST_MAJORMINOR) $(GST_LIBS)
 test_oss4_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 else
 OSS4_TESTS=