diff --git a/ChangeLog b/ChangeLog index 77432c4781..6144e2fc58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +2005-08-05 Thomas Vander Stichele + + * common/Makefile.am: + * common/gstdoc-scangobj: + * common/gtk-doc-plugins.mak: + * common/gtk-doc.mak: + add a custom scangobj that uses the registry + add a custom gtk-doc-plugins.mak that uses it + some doc build fixes + * configure.ac: + * docs/Makefile.am: + * docs/plugins/Makefile.am: + * docs/plugins/gst-plugins-base-plugins-docs.sgml: + * docs/plugins/gst-plugins-base-plugins-sections.txt: + * docs/plugins/gst-plugins-base-plugins.types: + * docs/plugins/tmpl/gstmultifdsink.sgml: + add docs for one element, multifdsink + * gst/adder/gstadder.h: + * gst/volume/gstvolume.h: + don't privatize enum + * gst/tcp/gstfdset.c: (gst_fdset_mode_get_type): + * gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type), + (gst_sync_method_get_type), (gst_client_status_get_type), + (gst_multifdsink_class_init), + (gst_multifdsink_client_queue_buffer), + (gst_multifdsink_handle_client_write): + * gst/tcp/gstmultifdsink.h: + * gst/tcp/gsttcp.h: + * gst/tcp/gsttcpclientsink.c: (gst_tcpclientsink_class_init), + (gst_tcpclientsink_init), (gst_tcpclientsink_setcaps), + (gst_tcpclientsink_render): + * gst/tcp/gsttcpclientsink.h: + * gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_class_init), + (gst_tcpclientsrc_init), (gst_tcpclientsrc_create), + (gst_tcpclientsrc_start): + * gst/tcp/gsttcpclientsrc.h: + * gst/tcp/gsttcpserversrc.c: (gst_tcpserversrc_class_init), + (gst_tcpserversrc_init), (gst_tcpserversrc_create): + * gst/tcp/gsttcpserversrc.h: + * gst/typefind/gsttypefindfunctions.c: + remove superfluous Type stuff + 2005-08-05 Ronald S. Bultje * gst/playback/gstplaybin.c: (gen_video_element): diff --git a/common b/common index 694de4dbf4..c99f9050f2 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 694de4dbf4827f372321f0634643a254d7edd986 +Subproject commit c99f9050f296219783c6717efe319dc741d2e2d3 diff --git a/configure.ac b/configure.ac index d1fe2782b0..eacaee216d 100644 --- a/configure.ac +++ b/configure.ac @@ -929,6 +929,7 @@ pkgconfig/gstreamer-plugins-base.pc pkgconfig/gstreamer-plugins-base-uninstalled.pc docs/Makefile docs/libs/Makefile +docs/plugins/Makefile docs/version.entities po/Makefile.in common/Makefile diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..e5a7abe44d --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +version.entities diff --git a/docs/Makefile.am b/docs/Makefile.am index e9077abae2..f28283ef26 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,11 +1,11 @@ if ENABLE_GTK_DOC -GTK_DOC_DIRS = libs +GTK_DOC_DIRS = libs # plugins else GTK_DOC_DIRS = endif SUBDIRS = $(GTK_DOC_DIRS) -DIST_SUBDIRS = libs +DIST_SUBDIRS = libs plugins EXTRA_DIST = \ upload.mak \ diff --git a/docs/libs/.gitignore b/docs/libs/.gitignore index 08d7c1e1d2..9430ba5eef 100644 --- a/docs/libs/.gitignore +++ b/docs/libs/.gitignore @@ -3,13 +3,13 @@ html xml Makefile Makefile.in -gst-plugins-base-libs-decl.txt -gst-plugins-base-libs-decl-list.txt -gst-plugins-base-libs-presed-scan.c -gst-plugins-base-libs-undocumented.txt -gst-plugins-base-libs-unused.txt -gst-plugins-base-libs.args -gst-plugins-base-libs.hierarchy -gst-plugins-base-libs.interfaces -gst-plugins-base-libs.prerequisites -gst-plugins-base-libs.signals +*-decl.txt +*-decl-list.txt +*-presed-scan.c +*-undocumented.txt +*-unused.txt +*.args +*.hierarchy +*.interfaces +*.prerequisites +*.signals diff --git a/docs/libs/gst-plugins-base-libs-overrides.txt b/docs/libs/gst-plugins-base-libs-overrides.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/libs/tmpl/.gitignore b/docs/libs/tmpl/.gitignore new file mode 100644 index 0000000000..d6a5500429 --- /dev/null +++ b/docs/libs/tmpl/.gitignore @@ -0,0 +1,2 @@ +*-unused.sgml +*.bak diff --git a/docs/plugins/.gitignore b/docs/plugins/.gitignore new file mode 100644 index 0000000000..2ef1402d13 --- /dev/null +++ b/docs/plugins/.gitignore @@ -0,0 +1,18 @@ +Makefile +Makefile.in + +*-decl.txt +*-decl-list.txt +*-undocumented.txt +*-unused.txt + +*.args +*.hierarchy +*.interfaces +*.prerequisites +*.signals + +html +sgml +xml +*.stamp diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am new file mode 100644 index 0000000000..967133fbb0 --- /dev/null +++ b/docs/plugins/Makefile.am @@ -0,0 +1,95 @@ +GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj + +## Process this file with automake to produce Makefile.in + +# The name of the module, e.g. 'glib'. +#DOC_MODULE=gst-plugins-libs-@GST_MAJORMINOR@ +DOC_MODULE=gst-plugins-base-plugins + +# for upload.mak +DOC=gst-plugins-base-plugins +FORMATS=html +html: html-build.stamp +include $(srcdir)/../upload.mak + +# generated basefiles +#basefiles = \ +## $(DOC_MODULE).types \ +# $(DOC_MODULE)-sections.txt \ +# $(DOC_MODULE)-docs.sgml + +# ugly hack to make -unused.sgml work +#unused-build.stamp: +# BUILDDIR=`pwd` && \ +# cd $(srcdir)/tmpl && \ +# ln -sf gstreamer-libs-unused.sgml \ +# $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml +# touch unused-build.stamp + +# these rules are added to create parallel docs using GST_MAJORMINOR +#$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs% +# cp $< $@ + +#CLEANFILES = $(basefiles) + +# The top-level SGML file. Change it if you want. +DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml + +# The directory containing the source code. Relative to $(top_srcdir). +# gtk-doc will search all .c & .h files beneath here for inline comments +# documenting functions and macros. +DOC_SOURCE_DIR = $(top_srcdir) + +# Extra options to supply to gtkdoc-scan. +SCAN_OPTIONS= + +# FIXME : +# there's something wrong with gstreamer-sections.txt not being in the dist +# maybe it doesn't resolve; we're adding it below for now +#EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE) + +# Extra options to supply to gtkdoc-mkdb. +MKDB_OPTIONS=--sgml-mode --ignore-files=trio + +# Extra options to supply to gtkdoc-fixref. +# FIXME get the location of the installed gstreamer docs +#FIXXREF_OPTIONS=--extra-dir=../gst/html + +# Used for dependencies. +HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.h +CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.c + +# this is a wingo addition +# thomasvs: another nice wingo addition would be an explanation on why +# this is useful ;) + +SCANOBJ_DEPS = + +# Header files to ignore when scanning. +IGNORE_HFILES = avcodec.h gstffmpegcodecmap.h + +EXTRA_HFILES = $(top_srcdir)/gst/tcp/gstmultifdsink.h + +# Images to copy into HTML directory. +HTML_IMAGES = + +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). +content_files = + +# Other files to distribute. +extra_files = + +# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib +# contains GtkObjects/GObjects and you want to document signals and properties. +GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir) -I$(top_builddir)/gst-libs +GTKDOC_LIBS = $(SCANOBJ_DEPS) $(GST_BASE_LIBS) + +GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC) +GTKDOC_LD=$(LIBTOOL) --mode=link $(CC) + +# If you need to override some of the declarations, place them in this file +# and uncomment this line. +#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt +DOC_OVERRIDES = + +include $(top_srcdir)/common/gtk-doc-plugins.mak diff --git a/docs/plugins/gst-plugins-base-plugins-docs.sgml b/docs/plugins/gst-plugins-base-plugins-docs.sgml new file mode 100644 index 0000000000..5e8f8d45e3 --- /dev/null +++ b/docs/plugins/gst-plugins-base-plugins-docs.sgml @@ -0,0 +1,13 @@ + + + + + gst-plugins-base Plugins Reference Manual + + + + gst-plugins-base Plugins + + + diff --git a/docs/plugins/gst-plugins-base-plugins-overrides.txt b/docs/plugins/gst-plugins-base-plugins-overrides.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/plugins/gst-plugins-base-plugins-sections.txt b/docs/plugins/gst-plugins-base-plugins-sections.txt new file mode 100644 index 0000000000..647f76e2a5 --- /dev/null +++ b/docs/plugins/gst-plugins-base-plugins-sections.txt @@ -0,0 +1,13 @@ +
+gstmultifdsink +GstMultiFdSink +GstMultiFdSinkFlags +GstRecoverPolicy +GstSyncMethod +GstUnitType +GstClientStatus +GstMultiFdSink + +GstMultiFdSinkClass +
+ diff --git a/docs/plugins/gst-plugins-base-plugins.types b/docs/plugins/gst-plugins-base-plugins.types new file mode 100644 index 0000000000..9f4950e70d --- /dev/null +++ b/docs/plugins/gst-plugins-base-plugins.types @@ -0,0 +1 @@ +#include diff --git a/docs/plugins/tmpl/.gitignore b/docs/plugins/tmpl/.gitignore new file mode 100644 index 0000000000..b4fa64253d --- /dev/null +++ b/docs/plugins/tmpl/.gitignore @@ -0,0 +1,2 @@ +*.bak +*-unused.sgml diff --git a/docs/plugins/tmpl/gstmultifdsink.sgml b/docs/plugins/tmpl/gstmultifdsink.sgml new file mode 100644 index 0000000000..2389fef595 --- /dev/null +++ b/docs/plugins/tmpl/gstmultifdsink.sgml @@ -0,0 +1,174 @@ + +GstMultiFdSink + + + + + + + + + + + + + + + + + + + + + + + + + +@gstmultifdsink: the object which received the signal. +@arg1: + + + + + + +@gstmultifdsink: the object which received the signal. + + + + + + +@gstmultifdsink: the object which received the signal. +@arg1: + + + + + + +@gstmultifdsink: the object which received the signal. +@arg1: +@arg2: + + + + + + +@gstmultifdsink: the object which received the signal. +@arg1: +@Returns: + + + + + + +@gstmultifdsink: the object which received the signal. +@arg1: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@GST_MULTIFDSINK_OPEN: +@GST_MULTIFDSINK_FLAG_LAST: + + + + + + +@GST_RECOVER_POLICY_NONE: +@GST_RECOVER_POLICY_RESYNC_START: +@GST_RECOVER_POLICY_RESYNC_SOFT: +@GST_RECOVER_POLICY_RESYNC_KEYFRAME: + + + + + + +@GST_SYNC_METHOD_NONE: +@GST_SYNC_METHOD_WAIT: +@GST_SYNC_METHOD_BURST: + + + + + + +@GST_UNIT_TYPE_BUFFERS: +@GST_UNIT_TYPE_TIME: +@GST_UNIT_TYPE_BYTES: + + + + + + +@GST_CLIENT_STATUS_OK: +@GST_CLIENT_STATUS_CLOSED: +@GST_CLIENT_STATUS_REMOVED: +@GST_CLIENT_STATUS_SLOW: +@GST_CLIENT_STATUS_ERROR: +@GST_CLIENT_STATUS_DUPLICATE: + diff --git a/gst/adder/gstadder.h b/gst/adder/gstadder.h index 63bd9ad927..c16bb94cbf 100644 --- a/gst/adder/gstadder.h +++ b/gst/adder/gstadder.h @@ -44,13 +44,12 @@ extern GstElementDetails gst_adder_details; typedef struct _GstAdder GstAdder; typedef struct _GstAdderClass GstAdderClass; typedef struct _GstAdderInputChannel GstAdderInputChannel; -typedef enum _GstAdderFormat GstAdderFormat; -enum _GstAdderFormat { +typedef enum { GST_ADDER_FORMAT_UNSET, GST_ADDER_FORMAT_INT, GST_ADDER_FORMAT_FLOAT -}; +} GstAdderFormat; typedef void (*GstAdderFunction) (gpointer out, gpointer in, guint size); diff --git a/gst/tcp/gstfdset.c b/gst/tcp/gstfdset.c index bd9be0826b..f46224194f 100644 --- a/gst/tcp/gstfdset.c +++ b/gst/tcp/gstfdset.c @@ -44,7 +44,7 @@ gst_fdset_mode_get_type (void) }; if (!fdset_mode_type) { - fdset_mode_type = g_enum_register_static ("GstFDSetModeType", fdset_mode); + fdset_mode_type = g_enum_register_static ("GstFDSetMode", fdset_mode); } return fdset_mode_type; } diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index a24ae16f09..21baf18f1a 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -91,7 +91,7 @@ enum }; /* this is really arbitrarily chosen */ -#define DEFAULT_PROTOCOL GST_TCP_PROTOCOL_TYPE_NONE +#define DEFAULT_PROTOCOL GST_TCP_PROTOCOL_NONE #define DEFAULT_MODE GST_FDSET_MODE_POLL #define DEFAULT_BUFFERS_MAX -1 #define DEFAULT_BUFFERS_SOFT_MAX -1 @@ -145,7 +145,7 @@ gst_recover_policy_get_type (void) if (!recover_policy_type) { recover_policy_type = - g_enum_register_static ("GstTCPRecoverPolicy", recover_policy); + g_enum_register_static ("GstRecoverPolicy", recover_policy); } return recover_policy_type; } @@ -166,7 +166,7 @@ gst_sync_method_get_type (void) }; if (!sync_method_type) { - sync_method_type = g_enum_register_static ("GstTCPSyncMethod", sync_method); + sync_method_type = g_enum_register_static ("GstSyncMethod", sync_method); } return sync_method_type; } @@ -208,7 +208,7 @@ gst_client_status_get_type (void) if (!client_status_type) { client_status_type = - g_enum_register_static ("GstTCPClientStatus", client_status); + g_enum_register_static ("GstClientStatus", client_status); } return client_status_type; } @@ -291,7 +291,7 @@ gst_multifdsink_class_init (GstMultiFdSinkClass * klass) g_object_class_install_property (gobject_class, ARG_PROTOCOL, g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in", - GST_TYPE_TCP_PROTOCOL_TYPE, DEFAULT_PROTOCOL, G_PARAM_READWRITE)); + GST_TYPE_TCP_PROTOCOL, DEFAULT_PROTOCOL, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_MODE, g_param_spec_enum ("mode", "Mode", "The mode for selecting activity on the fds", GST_TYPE_FDSET_MODE, @@ -361,14 +361,34 @@ gst_multifdsink_class_init (GstMultiFdSinkClass * klass) "Total number of bytes send to all clients", 0, G_MAXUINT64, 0, G_PARAM_READABLE)); + /** + * GstMultiFdSink::add: + * @gstmultifdsink: the multifdsink element to emit this signal on + * @arg1: the file descriptor to add to multifdsink + * + * Hand the given open file descriptor to multifdsink to write to. + */ gst_multifdsink_signals[SIGNAL_ADD] = g_signal_new ("add", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstMultiFdSinkClass, add), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); + /** + * GstMultiFdSink::remove: + * @gstmultifdsink: the multifdsink element to emit this signal on + * @arg1: the file descriptor to remove from multifdsink + * + * Remove the given open file descriptor from multifdsink. + */ gst_multifdsink_signals[SIGNAL_REMOVE] = g_signal_new ("remove", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstMultiFdSinkClass, remove), NULL, NULL, gst_tcp_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); + /** + * GstMultiFdSink::clear: + * @gstmultifdsink: the multifdsink element to emit this signal on + * + * Clear all file descriptors from multifdsink. + */ gst_multifdsink_signals[SIGNAL_CLEAR] = g_signal_new ("clear", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstMultiFdSinkClass, clear), @@ -379,10 +399,24 @@ gst_multifdsink_class_init (GstMultiFdSinkClass * klass) NULL, NULL, gst_tcp_marshal_BOXED__INT, G_TYPE_VALUE_ARRAY, 1, G_TYPE_INT); + /** + * GstMultiFdSink::client-added: + * @gstmultifdsink: the multifdsink element that emitted this signal + * @arg1: the file descriptor that was added to multifdsink + * + * The given file descriptor was added to multifdsink. + */ gst_multifdsink_signals[SIGNAL_CLIENT_ADDED] = g_signal_new ("client-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstMultiFdSinkClass, client_added), NULL, NULL, gst_tcp_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); + /** + * GstMultiFdSink::client-removed: + * @gstmultifdsink: the multifdsink element that emitted this signal + * @arg1: the file descriptor that was removed from multifdsink + * + * The given file descriptor was removed from multifdsink. + */ gst_multifdsink_signals[SIGNAL_CLIENT_REMOVED] = g_signal_new ("client-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstMultiFdSinkClass, @@ -802,7 +836,7 @@ static gboolean gst_multifdsink_client_queue_buffer (GstMultiFdSink * sink, GstTCPClient * client, GstBuffer * buffer) { - if (sink->protocol == GST_TCP_PROTOCOL_TYPE_GDP) { + if (sink->protocol == GST_TCP_PROTOCOL_GDP) { guint8 *header; guint len; @@ -945,7 +979,7 @@ gst_multifdsink_handle_client_write (GstMultiFdSink * sink, now = GST_TIMEVAL_TO_TIME (nowtv); /* when using GDP, first check if we have queued caps yet */ - if (sink->protocol == GST_TCP_PROTOCOL_TYPE_GDP) { + if (sink->protocol == GST_TCP_PROTOCOL_GDP) { if (!client->caps_sent) { const GstCaps *caps = GST_PAD_CAPS (GST_PAD_PEER (GST_BASE_SINK_PAD (sink))); diff --git a/gst/tcp/gstmultifdsink.h b/gst/tcp/gstmultifdsink.h index 680c182c3b..a672e3b126 100644 --- a/gst/tcp/gstmultifdsink.h +++ b/gst/tcp/gstmultifdsink.h @@ -100,7 +100,7 @@ typedef struct { gboolean discont; - GstTCPProtocolType protocol; + GstTCPProtocol protocol; gboolean caps_sent; gboolean streamheader_sent; @@ -139,7 +139,7 @@ struct _GstMultiFdSink { GSList *streamheader; /* GSList of GstBuffers to use as streamheader */ gboolean previous_buffer_in_caps; - GstTCPProtocolType protocol; + GstTCPProtocol protocol; guint mtu; GArray *bufqueue; /* global queue of buffers */ diff --git a/gst/tcp/gsttcp.h b/gst/tcp/gsttcp.h index 63ed5260f7..818def8a12 100644 --- a/gst/tcp/gsttcp.h +++ b/gst/tcp/gsttcp.h @@ -35,9 +35,9 @@ G_BEGIN_DECLS typedef enum { - GST_TCP_PROTOCOL_TYPE_NONE, - GST_TCP_PROTOCOL_TYPE_GDP -} GstTCPProtocolType; + GST_TCP_PROTOCOL_NONE, + GST_TCP_PROTOCOL_GDP +} GstTCPProtocol; gchar * gst_tcp_host_to_ip (GstElement *element, const gchar *host); diff --git a/gst/tcp/gsttcpclientsink.c b/gst/tcp/gsttcpclientsink.c index 4a15ff7324..89334467f7 100644 --- a/gst/tcp/gsttcpclientsink.c +++ b/gst/tcp/gsttcpclientsink.c @@ -134,8 +134,7 @@ gst_tcpclientsink_class_init (GstTCPClientSink * klass) 0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_PROTOCOL, g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in", - GST_TYPE_TCP_PROTOCOL_TYPE, GST_TCP_PROTOCOL_TYPE_NONE, - G_PARAM_READWRITE)); + GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE, G_PARAM_READWRITE)); gstelement_class->change_state = gst_tcpclientsink_change_state; @@ -152,7 +151,7 @@ gst_tcpclientsink_init (GstTCPClientSink * this) this->port = TCP_DEFAULT_PORT; this->sock_fd = -1; - this->protocol = GST_TCP_PROTOCOL_TYPE_NONE; + this->protocol = GST_TCP_PROTOCOL_NONE; GST_FLAG_UNSET (this, GST_TCPCLIENTSINK_OPEN); } @@ -173,10 +172,10 @@ gst_tcpclientsink_setcaps (GstBaseSink * bsink, GstCaps * caps) /* write the buffer header if we have one */ switch (sink->protocol) { - case GST_TCP_PROTOCOL_TYPE_NONE: + case GST_TCP_PROTOCOL_NONE: break; - case GST_TCP_PROTOCOL_TYPE_GDP: + case GST_TCP_PROTOCOL_GDP: /* if we haven't send caps yet, send them first */ if (!sink->caps_sent) { const GstCaps *caps; @@ -226,9 +225,9 @@ gst_tcpclientsink_render (GstBaseSink * bsink, GstBuffer * buf) /* write the buffer header if we have one */ switch (sink->protocol) { - case GST_TCP_PROTOCOL_TYPE_NONE: + case GST_TCP_PROTOCOL_NONE: break; - case GST_TCP_PROTOCOL_TYPE_GDP: + case GST_TCP_PROTOCOL_GDP: GST_LOG_OBJECT (sink, "Sending buffer header through GDP"); if (!gst_tcp_gdp_write_buffer (GST_ELEMENT (sink), sink->sock_fd, buf, TRUE, sink->host, sink->port)) diff --git a/gst/tcp/gsttcpclientsink.h b/gst/tcp/gsttcpclientsink.h index f7254e2f5f..0b3991ec70 100644 --- a/gst/tcp/gsttcpclientsink.h +++ b/gst/tcp/gsttcpclientsink.h @@ -76,7 +76,7 @@ struct _GstTCPClientSink { int sock_fd; size_t data_written; /* how much bytes have we written ? */ - GstTCPProtocolType protocol; /* used with the protocol enum */ + GstTCPProtocol protocol; /* used with the protocol enum */ gboolean caps_sent; /* whether or not we sent caps already */ }; diff --git a/gst/tcp/gsttcpclientsrc.c b/gst/tcp/gsttcpclientsrc.c index e3a73b2c8d..7f950ad7c6 100644 --- a/gst/tcp/gsttcpclientsrc.c +++ b/gst/tcp/gsttcpclientsrc.c @@ -153,8 +153,7 @@ gst_tcpclientsrc_class_init (GstTCPClientSrc * klass) TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_PROTOCOL, g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in", - GST_TYPE_TCP_PROTOCOL_TYPE, GST_TCP_PROTOCOL_TYPE_NONE, - G_PARAM_READWRITE)); + GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE, G_PARAM_READWRITE)); gstbasesrc_class->get_caps = gst_tcpclientsrc_getcaps; gstbasesrc_class->start = gst_tcpclientsrc_start; @@ -173,7 +172,7 @@ gst_tcpclientsrc_init (GstTCPClientSrc * this) this->port = TCP_DEFAULT_PORT; this->host = g_strdup (TCP_DEFAULT_HOST); this->sock_fd = -1; - this->protocol = GST_TCP_PROTOCOL_TYPE_NONE; + this->protocol = GST_TCP_PROTOCOL_NONE; this->caps = NULL; this->curoffset = 0; @@ -228,7 +227,7 @@ gst_tcpclientsrc_create (GstPushSrc * psrc, GstBuffer ** outbuf) switch (src->protocol) { fd_set testfds; - case GST_TCP_PROTOCOL_TYPE_NONE: + case GST_TCP_PROTOCOL_NONE: /* do a blocking select on the socket */ FD_ZERO (&testfds); FD_SET (src->sock_fd, &testfds); @@ -246,7 +245,7 @@ gst_tcpclientsrc_create (GstPushSrc * psrc, GstBuffer ** outbuf) buf = gst_buffer_new_and_alloc (readsize); break; - case GST_TCP_PROTOCOL_TYPE_GDP: + case GST_TCP_PROTOCOL_GDP: if (!(buf = gst_tcp_gdp_read_buffer (GST_ELEMENT (src), src->sock_fd))) goto hit_eos; @@ -438,7 +437,7 @@ gst_tcpclientsrc_start (GstBaseSrc * bsrc) } /* get the caps if we're using GDP */ - if (src->protocol == GST_TCP_PROTOCOL_TYPE_GDP) { + if (src->protocol == GST_TCP_PROTOCOL_GDP) { /* if we haven't received caps yet, we should get them first */ if (!src->caps_received) { GstCaps *caps; diff --git a/gst/tcp/gsttcpclientsrc.h b/gst/tcp/gsttcpclientsrc.h index 2ccaa392fd..3c16ec47b6 100644 --- a/gst/tcp/gsttcpclientsrc.h +++ b/gst/tcp/gsttcpclientsrc.h @@ -69,7 +69,7 @@ struct _GstTCPClientSrc { /* number of bytes we've gotten */ off_t curoffset; - GstTCPProtocolType protocol; /* protocol used for reading data */ + GstTCPProtocol protocol; /* protocol used for reading data */ gboolean caps_received; /* if we have received caps yet */ GstCaps *caps; }; diff --git a/gst/tcp/gsttcpserversrc.c b/gst/tcp/gsttcpserversrc.c index b185b3c289..1d5aeed2a3 100644 --- a/gst/tcp/gsttcpserversrc.c +++ b/gst/tcp/gsttcpserversrc.c @@ -150,8 +150,7 @@ gst_tcpserversrc_class_init (GstTCPServerSrc * klass) 0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE)); g_object_class_install_property (gobject_class, ARG_PROTOCOL, g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in", - GST_TYPE_TCP_PROTOCOL_TYPE, GST_TCP_PROTOCOL_TYPE_NONE, - G_PARAM_READWRITE)); + GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE, G_PARAM_READWRITE)); gstbasesrc_class->start = gst_tcpserversrc_start; gstbasesrc_class->stop = gst_tcpserversrc_stop; @@ -170,7 +169,7 @@ gst_tcpserversrc_init (GstTCPServerSrc * src) src->server_sock_fd = -1; src->client_sock_fd = -1; src->curoffset = 0; - src->protocol = GST_TCP_PROTOCOL_TYPE_NONE; + src->protocol = GST_TCP_PROTOCOL_NONE; GST_FLAG_UNSET (src, GST_TCPSERVERSRC_OPEN); } @@ -199,7 +198,7 @@ gst_tcpserversrc_create (GstPushSrc * psrc, GstBuffer ** outbuf) /* read the buffer header if we're using a protocol */ switch (src->protocol) { - case GST_TCP_PROTOCOL_TYPE_NONE: + case GST_TCP_PROTOCOL_NONE: { fd_set testfds; @@ -220,7 +219,7 @@ gst_tcpserversrc_create (GstPushSrc * psrc, GstBuffer ** outbuf) buf = gst_buffer_new_and_alloc (readsize); break; } - case GST_TCP_PROTOCOL_TYPE_GDP: + case GST_TCP_PROTOCOL_GDP: /* if we haven't received caps yet, we should get them first */ if (!src->caps_received) { gchar *string; diff --git a/gst/tcp/gsttcpserversrc.h b/gst/tcp/gsttcpserversrc.h index a0f50be49d..0e98647c45 100644 --- a/gst/tcp/gsttcpserversrc.h +++ b/gst/tcp/gsttcpserversrc.h @@ -75,7 +75,7 @@ struct _GstTCPServerSrc { /* number of bytes we've gotten */ off_t curoffset; - GstTCPProtocolType protocol; /* protocol used for reading data */ + GstTCPProtocol protocol; /* protocol used for reading data */ gboolean caps_received; /* if we have received caps yet */ }; diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 107d6262c9..48805aa24f 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -263,7 +263,7 @@ aac_type_find (GstTypeFind * tf, gpointer unused) /*** audio/mpeg version 1 ****************************************************/ -/** +/* * The chance that random data is identified as a valid mp3 header is 63 / 2^18 * (0.024%) per try. This makes the function for calculating false positives * 1 - (1 - ((63 / 2 ^18) ^ GST_MP3_TYPEFIND_MIN_HEADERS)) ^ buffersize) diff --git a/gst/volume/gstvolume.h b/gst/volume/gstvolume.h index 240ddaceb9..0fed0c0b7a 100644 --- a/gst/volume/gstvolume.h +++ b/gst/volume/gstvolume.h @@ -42,12 +42,11 @@ G_BEGIN_DECLS typedef struct _GstVolume GstVolume; typedef struct _GstVolumeClass GstVolumeClass; -typedef enum _GstVolumeFormat GstVolumeFormat; -enum _GstVolumeFormat { +typedef enum { GST_VOLUME_FORMAT_INT=1, GST_VOLUME_FORMAT_FLOAT -}; +} GstVolumeFormat; struct _GstVolume { GstBaseTransform element;