summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-26 18:47:35 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-26 18:47:35 +0200
commit5aaf63892553d6188eafafe314468c50ba3cca75 (patch)
tree6496ba0624f8c02b1b4150246cee5e95142c4d02
parenteff0ac209cf4003d696cd8b32d8d0a575db95f7f (diff)
Remove Message::create() and Event::create().
These methods are barely needed for applications and they just confuse users that thing they could create a message or event without using one of the subclasses. In the future these methods can be re-added (perhaps with a better name) if required.
-rw-r--r--src/QGst/event.cpp6
-rw-r--r--src/QGst/event.h3
-rw-r--r--src/QGst/message.cpp6
-rw-r--r--src/QGst/message.h3
-rw-r--r--tests/auto/eventtest.cpp8
5 files changed, 4 insertions, 22 deletions
diff --git a/src/QGst/event.cpp b/src/QGst/event.cpp
index 14cab2e..bdc9298 100644
--- a/src/QGst/event.cpp
+++ b/src/QGst/event.cpp
@@ -23,12 +23,6 @@
namespace QGst {
-EventPtr Event::create(EventType type, const Structure & structure)
-{
- GstStructure *s = structure.isValid() ? gst_structure_copy(structure) : NULL;
- return EventPtr::wrap(gst_event_new_custom(static_cast<GstEventType>(type), s), false);
-}
-
ObjectPtr Event::source() const
{
return ObjectPtr::wrap(GST_EVENT_SRC(object<GstEvent>()));
diff --git a/src/QGst/event.h b/src/QGst/event.h
index b8c37a2..69e93f3 100644
--- a/src/QGst/event.h
+++ b/src/QGst/event.h
@@ -54,9 +54,6 @@ class Event : public MiniObject
{
QGST_WRAPPER(Event)
public:
- static EventPtr create(EventType type,
- const Structure & structure = Structure());
-
ObjectPtr source() const;
quint64 timestamp() const;
EventType type() const;
diff --git a/src/QGst/message.cpp b/src/QGst/message.cpp
index 8011eae..45d0775 100644
--- a/src/QGst/message.cpp
+++ b/src/QGst/message.cpp
@@ -23,12 +23,6 @@
namespace QGst {
-MessagePtr Message::create(MessageType type, const ObjectPtr & source, const Structure & structure)
-{
- GstStructure *s = structure.isValid() ? gst_structure_copy(structure) : NULL;
- return MessagePtr::wrap(gst_message_new_custom(static_cast<GstMessageType>(type), source, s), false);
-}
-
ObjectPtr Message::source() const
{
return ObjectPtr::wrap(GST_MESSAGE_SRC(object<GstMessage>()));
diff --git a/src/QGst/message.h b/src/QGst/message.h
index 062e83b..790f9c7 100644
--- a/src/QGst/message.h
+++ b/src/QGst/message.h
@@ -47,9 +47,6 @@ class Message : public MiniObject
{
QGST_WRAPPER(Message)
public:
- static MessagePtr create(MessageType type, const ObjectPtr & source,
- const Structure & structure = Structure());
-
ObjectPtr source() const;
quint64 timestamp() const;
QString typeName() const;
diff --git a/tests/auto/eventtest.cpp b/tests/auto/eventtest.cpp
index ac5b2ad..5509eee 100644
--- a/tests/auto/eventtest.cpp
+++ b/tests/auto/eventtest.cpp
@@ -41,10 +41,10 @@ private Q_SLOTS:
void EventTest::baseTest()
{
QGst::Structure s("mystructure");
- QGst::EventPtr evt = QGst::Event::create(QGst::EventCustomDownstream, s);
+ QGst::EventPtr evt = QGst::NavigationEvent::create(s);
- QVERIFY(evt->type()==QGst::EventCustomDownstream);
- QCOMPARE(evt->typeName(), QString("custom-downstream"));
+ QVERIFY(evt->type()==QGst::EventNavigation);
+ QCOMPARE(evt->typeName(), QString("navigation"));
QGst::StructurePtr ss = evt->internalStructure();
QVERIFY(ss->isValid());
@@ -63,7 +63,7 @@ void EventTest::copyTest()
{
QGst::Structure s("mystructure");
s.setValue("myfield", 365);
- QGst::EventPtr evt = QGst::Event::create(QGst::EventCustomUpstream, s);
+ QGst::EventPtr evt = QGst::NavigationEvent::create(s);
QGst::EventPtr evt2 = evt->copy();