gnomemm r1789 - in gstreamermm/trunk: . gstreamer/src gstreamerbase/gstreamerbasemm tests tools/extra_defs_gen
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1789 - in gstreamermm/trunk: . gstreamer/src gstreamerbase/gstreamerbasemm tests tools/extra_defs_gen
- Date: Fri, 14 Nov 2008 00:09:26 +0000 (UTC)
Author: jaalburqu
Date: Fri Nov 14 00:09:25 2008
New Revision: 1789
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1789&view=rev
Log:
2008-11-13 Josà Alburquerque <jaalburqu svn gnome org>
* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc: Corrected
includes.
* tools/extra_defs_gen/generate_defs_gst.cc: Added code to generate
extra defs for plug-ins. Added `fakesrc' to list of generated types
as test.
* gstreamer/src/gst_signals.defs: Regenerated extra defs (now includes
`fakesrc' plug-in properties/signals).
* tests/test-plugin-gen.cc: Modified test to access created plug-in
gobjcect and get a known property.
* tools/extra_defs_gen/Makefile.am:
* gstreamerbase/gstreamerbasemm/Makefile.am: Typos.
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/gstreamer/src/gst_signals.defs
gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am
gstreamermm/trunk/tests/test-plugin-gen.cc
gstreamermm/trunk/tools/extra_defs_gen/Makefile.am
gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc
gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
Modified: gstreamermm/trunk/gstreamer/src/gst_signals.defs
==============================================================================
--- gstreamermm/trunk/gstreamer/src/gst_signals.defs (original)
+++ gstreamermm/trunk/gstreamer/src/gst_signals.defs Fri Nov 14 00:09:25 2008
@@ -665,7 +665,7 @@
(define-property blocksize
(of-object "GstBaseSrc")
(prop-type "GParamULong")
- (docs "Size in bytes to read per buffer (0 = default)")
+ (docs "Size in bytes to read per buffer (-1 = default)")
(readable #t)
(writable #t)
(construct-only #f)
@@ -674,7 +674,7 @@
(define-property num-buffers
(of-object "GstBaseSrc")
(prop-type "GParamInt")
- (docs "Number of buffers to output before sending EOS")
+ (docs "Number of buffers to output before sending EOS (-1 = unlimited)")
(readable #t)
(writable #t)
(construct-only #f)
@@ -815,7 +815,7 @@
(define-property blocksize
(of-object "GstPushSrc")
(prop-type "GParamULong")
- (docs "Size in bytes to read per buffer (0 = default)")
+ (docs "Size in bytes to read per buffer (-1 = default)")
(readable #t)
(writable #t)
(construct-only #f)
@@ -824,7 +824,7 @@
(define-property num-buffers
(of-object "GstPushSrc")
(prop-type "GParamInt")
- (docs "Number of buffers to output before sending EOS")
+ (docs "Number of buffers to output before sending EOS (-1 = unlimited)")
(readable #t)
(writable #t)
(construct-only #f)
@@ -902,3 +902,213 @@
(construct-only #f)
)
+;; From GstFakeSrc
+
+(define-signal handoff
+ (of-object "GstFakeSrc")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("GstBuffer" "p0")
+ '("GstPad*" "p1")
+ )
+)
+
+(define-property name
+ (of-object "GstFakeSrc")
+ (prop-type "GParamString")
+ (docs "The name of the object")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property blocksize
+ (of-object "GstFakeSrc")
+ (prop-type "GParamULong")
+ (docs "Size in bytes to read per buffer (-1 = default)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property num-buffers
+ (of-object "GstFakeSrc")
+ (prop-type "GParamInt")
+ (docs "Number of buffers to output before sending EOS (-1 = unlimited)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property typefind
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Run typefind before negotiating")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property do-timestamp
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Apply current stream time to buffers")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property data
+ (of-object "GstFakeSrc")
+ (prop-type "GParamEnum")
+ (docs "Data allocation method")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property sizetype
+ (of-object "GstFakeSrc")
+ (prop-type "GParamEnum")
+ (docs "How to determine buffer sizes")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property sizemin
+ (of-object "GstFakeSrc")
+ (prop-type "GParamInt")
+ (docs "Minimum buffer size")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property sizemax
+ (of-object "GstFakeSrc")
+ (prop-type "GParamInt")
+ (docs "Maximum buffer size")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property filltype
+ (of-object "GstFakeSrc")
+ (prop-type "GParamEnum")
+ (docs "How to fill the buffer, if at all")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property datarate
+ (of-object "GstFakeSrc")
+ (prop-type "GParamInt")
+ (docs "Timestamps buffers with number of bytes per second (0 = none)")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property sync
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Sync to the clock to the datarate")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property pattern
+ (of-object "GstFakeSrc")
+ (prop-type "GParamString")
+ (docs "pattern")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property signal-handoffs
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Send a signal before pushing the buffer")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property silent
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Don't produce last_message events")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property dump
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Dump buffer contents to stdout")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property parentsize
+ (of-object "GstFakeSrc")
+ (prop-type "GParamInt")
+ (docs "Size of parent buffer for sub-buffered allocation")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property last-message
+ (of-object "GstFakeSrc")
+ (prop-type "GParamString")
+ (docs "The last status message")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property can-activate-pull
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Can activate in pull mode")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property can-activate-push
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "Can activate in push mode")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property is-live
+ (of-object "GstFakeSrc")
+ (prop-type "GParamBoolean")
+ (docs "True if the element cannot produce data in PAUSED")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property format
+ (of-object "GstFakeSrc")
+ (prop-type "GParamEnum")
+ (docs "The format of the segment events")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
Modified: gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am
==============================================================================
--- gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am (original)
+++ gstreamermm/trunk/gstreamerbase/gstreamerbasemm/Makefile.am Fri Nov 14 00:09:25 2008
@@ -26,5 +26,5 @@
lib_LTLIBRARIES = libgstreamerbasemm-0.10.la
libgstreamerbasemm_0_10_la_SOURCES = $(files_built_cc) $(files_extra_cc)
libgstreamerbasemm_0_10_la_LDFLAGS = $(common_ldflags)
-libgstreamerbasemm_0_10_la_LIBADD = $(GSTREAMERBASEMM_LIBS) $(top_builddir)/gstreamer/gstreamermm/.libs/libgstreamermm-0.10.la
+libgstreamerbasemm_0_10_la_LIBADD = $(GSTREAMERBASEMM_LIBS) $(top_builddir)/gstreamer/gstreamermm/libgstreamermm-0.10.la
Modified: gstreamermm/trunk/tests/test-plugin-gen.cc
==============================================================================
--- gstreamermm/trunk/tests/test-plugin-gen.cc (original)
+++ gstreamermm/trunk/tests/test-plugin-gen.cc Fri Nov 14 00:09:25 2008
@@ -13,5 +13,11 @@
else
std::cout << "fakesrc is invalid." << std::endl;
+ int sizemax = 0;
+ GstFakeSrc* obj = fakesrc->gobj();
+ g_object_get(obj, "sizemax", &sizemax, NULL);
+
+ std::cout << "sizemax = " << sizemax << std::endl;
+
return 0;
}
Modified: gstreamermm/trunk/tools/extra_defs_gen/Makefile.am
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/Makefile.am (original)
+++ gstreamermm/trunk/tools/extra_defs_gen/Makefile.am Fri Nov 14 00:09:25 2008
@@ -10,4 +10,4 @@
generate_extra_defs_SOURCES = generate_defs_gst.cc
generate_defs_gstbase_SOURCES = generate_defs_gstbase.cc
-generate_plugin_hg_file_SOURCES = generate_plugin_gmmproc_file.cc
+generate_plugin_gmmproc_file_SOURCES = generate_plugin_gmmproc_file.cc
Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc (original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_defs_gst.cc Fri Nov 14 00:09:25 2008
@@ -28,6 +28,29 @@
#include <gst/base/gstcollectpads.h>
#include <gst/base/gstdataqueue.h>
+std::string get_plugin_defs(const std::string& pluginName)
+{
+ GType type = 0;
+ GstElementFactory* factory = 0;
+ std::string result;
+
+ factory = gst_element_factory_find(pluginName.c_str());
+
+ // Make sure that the feature is actually loaded:
+ if (factory)
+ {
+ GstPluginFeature* loaded_feature =
+ gst_plugin_feature_load(GST_PLUGIN_FEATURE(factory));
+
+ g_object_unref(factory);
+ factory = GST_ELEMENT_FACTORY(loaded_feature);
+ type = gst_element_factory_get_element_type(factory);
+ result = get_defs(type);
+ g_object_unref(factory);
+ }
+ return result;
+}
+
int main (int argc, char *argv[])
{
gst_init (&argc, &argv);
@@ -77,6 +100,9 @@
<< get_defs(GST_TYPE_ADAPTER)
<< get_defs(GST_TYPE_COLLECT_PADS)
<< get_defs(GST_TYPE_DATA_QUEUE)
+
+ // GStreamer core plugin types:
+ << get_plugin_defs("fakesrc")
;
return 0;
}
Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc (original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc Fri Nov 14 00:09:25 2008
@@ -20,10 +20,9 @@
*/
-#include "glibmm_generate_extra_defs/generate_extra_defs.h"
-
#include <gst/gst.h>
#include <glibmm.h>
+#include <iostream>
static gchar* nmspace;
static gchar* defsFile;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]