gst_object_unref(ptr);
}
+template<> GRefPtr<GstBuffer> adoptGRef(GstBuffer* ptr)
+{
+ return GRefPtr<GstBuffer>(ptr, GRefPtrAdopt);
+}
+
+template<> GstBuffer* refGPtr<GstBuffer>(GstBuffer* ptr)
+{
+ if (ptr)
+ gst_buffer_ref(ptr);
+
+ return ptr;
+}
+
+template<> void derefGPtr<GstBuffer>(GstBuffer* ptr)
+{
+ if (ptr)
+ gst_buffer_unref(ptr);
+}
}
#endif // USE(GSTREAMER)
typedef struct _GstTask GstTask;
typedef struct _GstBus GstBus;
typedef struct _GstElementFactory GstElementFactory;
+typedef struct _GstBuffer GstBuffer;
namespace WTF {
template<> GstElementFactory* refGPtr<GstElementFactory>(GstElementFactory* ptr);
template<> void derefGPtr<GstElementFactory>(GstElementFactory* ptr);
+template<> GRefPtr<GstBuffer> adoptGRef(GstBuffer* ptr);
+template<> GstBuffer* refGPtr<GstBuffer>(GstBuffer* ptr);
+template<> void derefGPtr<GstBuffer>(GstBuffer* ptr);
}
#endif // USE(GSTREAMER)