gnomemm r1591 - in gstreamermm/trunk: . gstreamer gstreamer/src tests
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1591 - in gstreamermm/trunk: . gstreamer gstreamer/src tests
- Date: Sun, 29 Jun 2008 03:26:48 +0000 (UTC)
Author: jaalburqu
Date: Sun Jun 29 03:26:48 2008
New Revision: 1591
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1591&view=rev
Log:
2008-06-28 Josà Alburquerque <jaalburqu svn gnome org>
* gstreamer/src/pad.ccg:
* gstreamer/src/pad.hg: Handwrote Pad constructor to supply correct
construction properties with _CONSTRUCT.
* gstreamer/src/ghostpad.ccg:
* gstreamer/src/ghostpad.hg: Handwrote constructors to supply correct
construction properties with _CONSTRUCT. Made constructors produce
warnings if construction of ghost pad is unsuccessful (this relies on
patch in bug #539108).
* tests/test-pad.cc: Modified test slightly to test all pad,
padtemplate, and ghostpad constructors.
* tests/test-ghost-pad.cc: Removed superfluous test.
* gstreamer/gstreamermm.h:
* gstreamer/src/Makefile_list_of_hg.am_fragment: Exclude ghostpad.hg
from build until patch in bug #539108 is fixed (and patch is
accepted).
* tests/Makefile.am: Also exclude pad test.
* configure.ac: Use gtkmm-list in AC_INIT([gstreamermm], ...) line.
Removed:
gstreamermm/trunk/tests/test-ghost-pad.cc
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/configure.ac
gstreamermm/trunk/gstreamer/gstreamermm.h
gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
gstreamermm/trunk/gstreamer/src/ghostpad.ccg
gstreamermm/trunk/gstreamer/src/ghostpad.hg
gstreamermm/trunk/gstreamer/src/pad.ccg
gstreamermm/trunk/gstreamer/src/pad.hg
gstreamermm/trunk/tests/Makefile.am
gstreamermm/trunk/tests/test-pad.cc
Modified: gstreamermm/trunk/configure.ac
==============================================================================
--- gstreamermm/trunk/configure.ac (original)
+++ gstreamermm/trunk/configure.ac Sun Jun 29 03:26:48 2008
@@ -18,7 +18,7 @@
pushdef([GSTREAMERMM_MICRO_VERSION], [5])
pushdef([GSTREAMERMM_EXTRA_VERSION], [])
pushdef([GSTREAMERMM_VERSION], GSTREAMERMM_MAJOR_VERSION.GSTREAMERMM_MINOR_VERSION.GSTREAMERMM_MICRO_VERSION[]GSTREAMERMM_EXTRA_VERSION)
-AC_INIT([gstreamermm], GSTREAMERMM_VERSION, [Milosz Derezynski <internalerror gmail com>, Rob Page <page rob gmail com>, Dodji Seketeli <dodji gnome org>])
+AC_INIT([gstreamermm], GSTREAMERMM_VERSION, [gtkmm-list gnome org])
AC_CONFIG_SRCDIR([gstreamer/gstreamermmconfig.h.in])
AC_PREREQ(2.59)
Modified: gstreamermm/trunk/gstreamer/gstreamermm.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm.h (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm.h Sun Jun 29 03:26:48 2008
@@ -15,7 +15,7 @@
#include <gstreamermm/event.h>
#include <gstreamermm/filter.h>
#include <gstreamermm/format.h>
-#include <gstreamermm/ghostpad.h>
+//TODO: #include <gstreamermm/ghostpad.h> (when bug #539108 is fixed)
#include <gstreamermm/index.h>
#include <gstreamermm/indexfactory.h>
#include <gstreamermm/interface.h>
@@ -29,6 +29,7 @@
#include <gstreamermm/plugin.h>
#include <gstreamermm/pluginfeature.h>
#include <gstreamermm/query.h>
+#include <gstreamermm/segment.h>
#include <gstreamermm/structure.h>
#include <gstreamermm/systemclock.h>
#include <gstreamermm/taglist.h>
Modified: gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment (original)
+++ gstreamermm/trunk/gstreamer/src/Makefile_list_of_hg.am_fragment Sun Jun 29 03:26:48 2008
@@ -6,12 +6,14 @@
files_win32_hg =
files_general_hg = bin.hg buffer.hg bus.hg caps.hg childproxy.hg clock.hg \
element.hg elementfactory.hg enums.hg error.hg event.hg filter.hg \
- format.hg ghostpad.hg index.hg indexfactory.hg interface.hg \
+ format.hg index.hg indexfactory.hg interface.hg \
iterator.hg message.hg pad.hg padtemplate.hg parse.hg pipeline.hg \
plugin.hg pluginfeature.hg query.hg registry.hg segment.hg \
structure.hg systemclock.hg tagsetter.hg task.hg urihandler.hg \
value.hg xml.hg basesrc.hg
+#TODO: Add ghostpad.hg when bug #539108 is fixed (and patch in bug is applied)
+
files_general_deprecated_hg =
include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment
Modified: gstreamermm/trunk/gstreamer/src/ghostpad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/ghostpad.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/ghostpad.ccg Sun Jun 29 03:26:48 2008
@@ -23,3 +23,52 @@
#include <gstreamermm/padtemplate.h>
_PINCLUDE(gstreamermm/private/pad_p.h)
+
+namespace Gst
+{
+
+GhostPad::GhostPad(const Glib::ustring& name, const Glib::RefPtr<Pad>& target)
+ : _CONSTRUCT("name", name.c_str(),
+ "direction", (GstPadDirection) target->get_direction())
+{
+ if (!gst_ghost_pad_construct(gobj(), name.c_str(), target->gobj()))
+ g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&,"
+ " const Glib::RefPtr<Pad>&): Unsuccessful construction of ghost pad.");
+}
+
+GhostPad::GhostPad(const Glib::ustring& name, PadDirection direction)
+ : _CONSTRUCT("name", name.c_str(), "direction", (GstPadDirection) direction)
+{
+ if (!gst_ghost_pad_construct_no_target(gobj(), name.c_str(), (GstPadDirection) direction))
+ {
+ g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&, PadDirection):"
+ " Unsuccessful construction of ghost pad.");
+ }
+}
+
+GhostPad::GhostPad(const Glib::ustring& name, const Glib::RefPtr<Pad>& target,
+ const Glib::RefPtr<PadTemplate>& templ)
+ : _CONSTRUCT("name", name.c_str(), "direction",
+ (GstPadDirection) target->get_direction(), "template", templ->gobj())
+{
+ if (!gst_ghost_pad_construct_from_template(gobj(), name.c_str(), target->gobj(), templ->gobj()))
+ {
+ g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&,"
+ " const Glib::RefPtr<Pad>&, const Glib::RefPtr<PadTemplate>&):"
+ " Unsuccessful construction of ghost pad.");
+ }
+}
+
+GhostPad::GhostPad(const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ)
+ : _CONSTRUCT("name", name.c_str(), "direction",
+ (GstPadDirection) templ->get_direction(), "template", templ->gobj())
+{
+ if (!gst_ghost_pad_construct_no_target_from_template(gobj(), name.c_str(), templ->gobj()))
+ {
+ g_warning("Gst::GhostPad::GhostPad(const Glib::ustring&,"
+ " const Glib::RefPtr<PadTemplate>&): Unsuccessful construction of ghost"
+ " pad.");
+ }
+}
+
+} //namespace Gst
Modified: gstreamermm/trunk/gstreamer/src/ghostpad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/ghostpad.hg (original)
+++ gstreamermm/trunk/gstreamer/src/ghostpad.hg Sun Jun 29 03:26:48 2008
@@ -49,10 +49,10 @@
_CLASS_GOBJECT(GhostPad, GstGhostPad, GST_GHOST_PAD, Pad, GstPad)
protected:
- _WRAP_CTOR(GhostPad(const Glib::ustring& name, const Glib::RefPtr<Pad>& target), gst_ghost_pad_new)
- _WRAP_CTOR(GhostPad(const Glib::ustring& name, PadDirection direction), gst_ghost_pad_new_no_target)
- _WRAP_CTOR(GhostPad(const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ), gst_ghost_pad_new_from_template)
- _WRAP_CTOR(GhostPad(const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ), gst_ghost_pad_new_no_target_from_template)
+ GhostPad(const Glib::ustring& name, const Glib::RefPtr<Pad>& target);
+ GhostPad(const Glib::ustring& name, PadDirection direction);
+ GhostPad(const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ);
+ GhostPad(const Glib::ustring& name, const Glib::RefPtr<PadTemplate>& templ);
public:
/** Create a new ghostpad with @a target as the target. The direction will be
Modified: gstreamermm/trunk/gstreamer/src/pad.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/pad.ccg Sun Jun 29 03:26:48 2008
@@ -84,6 +84,10 @@
namespace Gst
{
+Pad::Pad(const Glib::RefPtr<PadTemplate>& templ, const Glib::ustring& name)
+ : _CONSTRUCT("template", templ->gobj(), "name", name.c_str())
+{}
+
// This is handcoded because the documentation tells us that we need to copy
// the Caps
Glib::RefPtr<const Caps> Pad::get_pad_template_caps() const
Modified: gstreamermm/trunk/gstreamer/src/pad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.hg (original)
+++ gstreamermm/trunk/gstreamer/src/pad.hg Sun Jun 29 03:26:48 2008
@@ -79,7 +79,7 @@
protected:
_WRAP_CTOR(Pad(const Glib::ustring& name, PadDirection direction), gst_pad_new)
- _WRAP_CTOR(Pad(const Glib::RefPtr<PadTemplate>& pad_template, const Glib::ustring& name), gst_pad_new_from_template)
+ Pad(const Glib::RefPtr<PadTemplate>& templ, const Glib::ustring& name);
public:
/** For example,
Modified: gstreamermm/trunk/tests/Makefile.am
==============================================================================
--- gstreamermm/trunk/tests/Makefile.am (original)
+++ gstreamermm/trunk/tests/Makefile.am Sun Jun 29 03:26:48 2008
@@ -7,8 +7,10 @@
test-link-elements test-create-bin test-miniobject-wrap \
test-message-wrap test-event-wrap test-query-wrap \
test-structure test-caps-structures test-interface \
- test-create-bus test-taglist test-tagsetter test-pad \
- test-ghost-pad test-init-check
+ test-create-bus test-taglist test-tagsetter \
+ test-init-check
+
+#TODO: Add test-pad to tests when bug #539108 is fixed.
test_caps_SOURCES=test-caps.cc
test_caps_LDFLAGS= GSTREAMERMM_LIBS@
@@ -55,11 +57,8 @@
test_tagsetter_SOURCES=test-tagsetter.cc
test_tagsetter_LDFLAGS= GSTREAMERMM_LIBS@
-test_pad_SOURCES=test-pad.cc
-test_pad_LDFLAGS= GSTREAMERMM_LIBS@
-
-test_ghost_pad_SOURCES=test-ghost-pad.cc
-test_ghost_pad_LDFLAGS= GSTREAMERMM_LIBS@
+#TODO: test_pad_SOURCES=test-pad.cc
+#TODO: test_pad_LDFLAGS= GSTREAMERMM_LIBS@
test_init_check_SOURCES=test-init-check.cc
test_init_check_LDFLAGS= GSTREAMERMM_LIBS@
Modified: gstreamermm/trunk/tests/test-pad.cc
==============================================================================
--- gstreamermm/trunk/tests/test-pad.cc (original)
+++ gstreamermm/trunk/tests/test-pad.cc Sun Jun 29 03:26:48 2008
@@ -31,7 +31,7 @@
caps->set_simple("framerate", Gst::Fraction(25, 1));
Glib::RefPtr<Gst::PadTemplate> templ =
- Gst::PadTemplate::create("source-template", Gst::PAD_SRC, Gst::PAD_ALWAYS,
+ Gst::PadTemplate::create("source-template", Gst::PAD_SINK, Gst::PAD_ALWAYS,
caps);
if (templ)
@@ -39,11 +39,45 @@
templ->get_name_template() << "'; direction = " <<
templ->get_direction() << "." << std::endl;
- Glib::RefPtr<Gst::Pad> pad1 = Gst::Pad::create("pad1", Gst::PAD_SINK);
-
+ Glib::RefPtr<Gst::Pad> pad1 =
+ Gst::Pad::create("pad1", Gst::PAD_SINK);
if (pad1)
std::cout << "Successfully created pad '" << pad1->get_name() <<
"'; direction = " << pad1->get_direction() << "." << std::endl;
+ Glib::RefPtr<Gst::Pad> pad2 = Gst::Pad::create(templ, "pad2");
+
+ if (pad2)
+ std::cout << "Successfully created pad '" << pad2->get_name() <<
+ "'; direction = " << pad2->get_direction() << "." << std::endl;
+
+/*
+ Glib::RefPtr<Gst::GhostPad> gpad1 =
+ Gst::GhostPad::create("gpad1", pad1);
+ if (gpad1)
+ std::cout << "Successfully created pad '" << gpad1->get_name() <<
+ "'; direction = " << gpad1->get_direction() << "." << std::endl;
+*/
+
+ Glib::RefPtr<Gst::GhostPad> gpad2 =
+ Gst::GhostPad::create("gpad2", Gst::PAD_SRC);
+ if (gpad2)
+ std::cout << "Successfully created pad '" << gpad2->get_name() <<
+ "'; direction = " << gpad2->get_direction() << "." << std::endl;
+
+/*
+ Glib::RefPtr<Gst::GhostPad> gpad3 =
+ Gst::GhostPad::create("gpad3", pad1, templ);
+ if (gpad3)
+ std::cout << "Successfully created pad '" << gpad3->get_name() <<
+ "'; direction = " << gpad3->get_direction() << "." << std::endl;
+*/
+
+ Glib::RefPtr<Gst::GhostPad> gpad4 =
+ Gst::GhostPad::create("gpad4", templ);
+ if (gpad4)
+ std::cout << "Successfully created pad '" << gpad4->get_name() <<
+ "'; direction = " << gpad4->get_direction() << "." << std::endl;
+
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]