[gstreamermm: 61/167] minor changes in urihandler, removed some functions from value
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gstreamermm: 61/167] minor changes in urihandler, removed some functions from value
- Date: Tue, 3 Sep 2013 19:24:12 +0000 (UTC)
commit aee4a0f917ccf042a69bead5e6a477557f8c7db0
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date: Fri Jul 26 15:32:13 2013 +0200
minor changes in urihandler, removed some functions from value
gstreamer/src/gst_vfuncs.defs | 3 +-
gstreamer/src/urihandler.hg | 4 +-
gstreamer/src/value.ccg | 51 +++---------------------------------
gstreamer/src/value.hg | 13 +--------
gstreamer/src/videoorientation.hg | 2 +-
5 files changed, 11 insertions(+), 62 deletions(-)
---
diff --git a/gstreamer/src/gst_vfuncs.defs b/gstreamer/src/gst_vfuncs.defs
index bd22e31..53cda99 100644
--- a/gstreamer/src/gst_vfuncs.defs
+++ b/gstreamer/src/gst_vfuncs.defs
@@ -1154,7 +1154,7 @@
(define-vfunc get_uri
(of-object "GstURIHandler")
- (return-type "const-gchar*")
+ (return-type "gchar*")
)
(define-vfunc set_uri
@@ -1162,6 +1162,7 @@
(return-type "gboolean")
(parameters
'("const-gchar*" "uri")
+ '("GError**" "error")
)
)
diff --git a/gstreamer/src/urihandler.hg b/gstreamer/src/urihandler.hg
index df5ffa6..a6e58a2 100644
--- a/gstreamer/src/urihandler.hg
+++ b/gstreamer/src/urihandler.hg
@@ -73,11 +73,11 @@ public:
/** Virtual method which should be implemented to return the URI currently
* handled by the element.
*/
- _WRAP_VFUNC(Glib::ustring get_uri() const, "get_uri")
+ _WRAP_VFUNC(gchar* get_uri() const, "get_uri")
/** Virtual method which should be implemented to set a new URI.
*/
- _WRAP_VFUNC(bool set_uri(const Glib::ustring& uri), "set_uri)
+ _WRAP_VFUNC(bool set_uri(const Glib::ustring& uri, GError** error), "set_uri)
//TODO: The GstURIHandler vfuncs get_type(), get_protocols(), get_type_full()
//and get_protocols_full() don't have a GstURIHandler as an argument declared
diff --git a/gstreamer/src/value.ccg b/gstreamer/src/value.ccg
index 1fbf5e3..6ded900 100644
--- a/gstreamer/src/value.ccg
+++ b/gstreamer/src/value.ccg
@@ -56,31 +56,6 @@ Fourcc::Fourcc(const Fourcc& f)
: first(f.first), second(f.second), third(f.third), fourth(f.fourth)
{}
-Fourcc::Fourcc(const Glib::ValueBase& value)
-: first(0), second(0), third(0), fourth(0)
-{
- if(GST_VALUE_HOLDS_FOURCC(value.gobj()))
- {
- int fourcc = gst_value_get_fourcc(value.gobj());
- set_ccs(fourcc);
- }
-}
-
-Fourcc::Fourcc(const GValue& value)
-: first(0), second(0), third(0), fourth(0)
-{
- if(GST_VALUE_HOLDS_FOURCC(&value))
- {
- int fourcc = gst_value_get_fourcc(&value);
- set_ccs(fourcc);
- }
-}
-
-guint32 Fourcc::get_fourcc() const
-{
- return GST_MAKE_FOURCC(first, second, third, fourth);
-}
-
void Fourcc::set_ccs(guint32 fourcc)
{
first = fourcc & 0xff;
@@ -115,7 +90,7 @@ Fraction::Fraction(const Glib::ValueBase& value)
Fraction::Fraction(const GValue& value)
: num(0), denom(1)
{
- if(GST_VALUE_HOLDS_FRACTION(&value))
+ //if(GST_VALUE_HOLDS_FRACTION(&value))
{
num = gst_value_get_fraction_numerator(&value);
denom = gst_value_get_fraction_denominator(&value);
@@ -146,7 +121,7 @@ IntRange::IntRange(const IntRange& src)
IntRange::IntRange(const Glib::ValueBase& value)
: min(0), max(0)
{
- if(GST_VALUE_HOLDS_INT_RANGE(value.gobj()))
+// if(GST_VALUE_HOLDS_INT_RANGE(value.gobj()))
{
min = gst_value_get_int_range_min(value.gobj());
max = gst_value_get_int_range_max(value.gobj());
@@ -156,7 +131,7 @@ IntRange::IntRange(const Glib::ValueBase& value)
IntRange::IntRange(const GValue& value)
: min(0), max(0)
{
- if(GST_VALUE_HOLDS_INT_RANGE(&value))
+// if(GST_VALUE_HOLDS_INT_RANGE(&value))
{
min = gst_value_get_int_range_min(&value);
max = gst_value_get_int_range_max(&value);
@@ -235,7 +210,7 @@ FractionRange& FractionRange::operator=(const FractionRange& src)
FractionRange::FractionRange(const Glib::ValueBase& value)
: min(), max()
{
- if(GST_VALUE_HOLDS_FRACTION_RANGE(value.gobj()))
+ // if(GST_VALUE_HOLDS_FRACTION_RANGE(value.gobj()))
{
const GValue* min = gst_value_get_fraction_range_min(value.gobj());
const GValue* max = gst_value_get_fraction_range_max(value.gobj());
@@ -251,7 +226,7 @@ FractionRange::FractionRange(const Glib::ValueBase& value)
FractionRange::FractionRange(const GValue& value)
: min(), max()
{
- if(GST_VALUE_HOLDS_FRACTION_RANGE(&value))
+// if(GST_VALUE_HOLDS_FRACTION_RANGE(&value))
{
const GValue* min = gst_value_get_fraction_range_min(&value);
const GValue* max = gst_value_get_fraction_range_max(&value);
@@ -270,22 +245,6 @@ namespace Glib
{
// static
-GType Value<Gst::Fourcc>::value_type()
-{
- return GST_TYPE_FOURCC;
-}
-
-void Value<Gst::Fourcc>::set(const Gst::Fourcc& data)
-{
- gst_value_set_fourcc(&gobject_, data.get_fourcc());
-}
-
-Gst::Fourcc Value<Gst::Fourcc>::get() const
-{
- return Gst::Fourcc(gobject_);
-}
-
-// static
GType Value<Gst::IntRange>::value_type()
{
return GST_TYPE_INT_RANGE;
diff --git a/gstreamer/src/value.hg b/gstreamer/src/value.hg
index 06f0265..0d4db08 100644
--- a/gstreamer/src/value.hg
+++ b/gstreamer/src/value.hg
@@ -18,6 +18,7 @@
*/
#include <gst/gst.h>
+#include <gst/gstvalue.h>
#include <glibmm/value_custom.h>
_DEFS(gstreamermm,gst)
@@ -78,22 +79,10 @@ public:
*/
explicit Fourcc(guint32 fourcc);
- /** Construct a Gst::Fourcc from a GST_TYPE_FOURCC.
- */
- explicit Fourcc(const Glib::ValueBase& gst_fourcc_value);
-
- /** Construct a Gst::Fourcc from a GST_TYPE_FOURCC.
- */
- explicit Fourcc(const GValue& gst_fourcc_value);
-
Fourcc& operator=(const Fourcc& src);
public:
- /** Gets the four characters converted into a guint32 fourcc value with host
- * endianness.
- */
- guint32 get_fourcc() const;
public:
char first;
diff --git a/gstreamer/src/videoorientation.hg b/gstreamer/src/videoorientation.hg
index 6e1337e..8a3c5b4 100644
--- a/gstreamer/src/videoorientation.hg
+++ b/gstreamer/src/videoorientation.hg
@@ -17,7 +17,7 @@
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <gst/interfaces/videoorientation.h>
+#include <gst/video/videoorientation.h>
#include <glibmm/interface.h>
_DEFS(gstreamermm,gst)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]