summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2015-07-28 16:50:55 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2015-07-28 16:57:36 -0400
commit25fa87a9e4c9428b8250734477eac1904d55b998 (patch)
treec08bcc26bf6a8553558bde249696ba3a3020a639
parentd47b567f2f07f30448180025443861d01eaae1c4 (diff)
doc/filesink: Add BufferMode enumeration
This is purely for documentation purpose. This way the values will show up in the HTML documentation.
-rw-r--r--docs/plugins/gstreamer-plugins-sections.txt1
-rw-r--r--plugins/elements/gstfilesink.c17
-rw-r--r--plugins/elements/gstfilesink.h16
3 files changed, 26 insertions, 8 deletions
diff --git a/docs/plugins/gstreamer-plugins-sections.txt b/docs/plugins/gstreamer-plugins-sections.txt
index b21e05371..c088cf317 100644
--- a/docs/plugins/gstreamer-plugins-sections.txt
+++ b/docs/plugins/gstreamer-plugins-sections.txt
@@ -128,6 +128,7 @@ GST_IS_FILE_SINK
GST_FILE_SINK_CLASS
GST_IS_FILE_SINK_CLASS
GST_TYPE_FILE_SINK
+GST_TYPE_FILE_SINK_BUFFER_MODE
<SUBSECTION Private>
gst_file_sink_get_type
</SECTION>
diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c
index 0803fc149..82b930deb 100644
--- a/plugins/elements/gstfilesink.c
+++ b/plugins/elements/gstfilesink.c
@@ -71,22 +71,23 @@
#endif
#include "gstelements_private.h"
+#include "gstfilesink.h"
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-#define GST_TYPE_BUFFER_MODE (buffer_mode_get_type ())
+#define GST_TYPE_FILE_SINK_BUFFER_MODE (gst_file_sink_buffer_mode_get_type ())
static GType
-buffer_mode_get_type (void)
+gst_file_sink_buffer_mode_get_type (void)
{
static GType buffer_mode_type = 0;
static const GEnumValue buffer_mode[] = {
- {-1, "Default buffering", "default"},
- {_IOFBF, "Fully buffered", "full"},
- {_IOLBF, "Line buffered", "line"},
- {_IONBF, "Unbuffered", "unbuffered"},
+ {GST_FILE_SINK_BUFFER_MODE_DEFAULT, "Default buffering", "default"},
+ {GST_FILE_SINK_BUFFER_MODE_FULL, "Fully buffered", "full"},
+ {GST_FILE_SINK_BUFFER_MODE_LINE, "Line buffered", "line"},
+ {GST_FILE_SINK_BUFFER_MODE_UNBUFFERED, "Unbuffered", "unbuffered"},
{0, NULL, NULL},
};
@@ -101,7 +102,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_file_sink_debug);
#define GST_CAT_DEFAULT gst_file_sink_debug
#define DEFAULT_LOCATION NULL
-#define DEFAULT_BUFFER_MODE -1
+#define DEFAULT_BUFFER_MODE GST_FILE_SINK_BUFFER_MODE_DEFAULT
#define DEFAULT_BUFFER_SIZE 64 * 1024
#define DEFAULT_APPEND FALSE
@@ -207,7 +208,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
g_object_class_install_property (gobject_class, PROP_BUFFER_MODE,
g_param_spec_enum ("buffer-mode", "Buffering mode",
- "The buffering mode to use", GST_TYPE_BUFFER_MODE,
+ "The buffering mode to use", GST_TYPE_FILE_SINK_BUFFER_MODE,
DEFAULT_BUFFER_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
diff --git a/plugins/elements/gstfilesink.h b/plugins/elements/gstfilesink.h
index 33517ab26..bd0e0ba61 100644
--- a/plugins/elements/gstfilesink.h
+++ b/plugins/elements/gstfilesink.h
@@ -47,6 +47,22 @@ typedef struct _GstFileSink GstFileSink;
typedef struct _GstFileSinkClass GstFileSinkClass;
/**
+ * GstFileSinkBufferMode:
+ * @GST_FILE_SINK_BUFFER_MODE_DEFAULT: Default buffering
+ * @GST_FILE_SINK_BUFFER_MODE_FULL: Fully buffered
+ * @GST_FILE_SINK_BUFFER_MODE_LINE: Line buffered
+ * @GST_FILE_SINK_BUFFER_MODE_UNBUFFERED: Unbuffered
+ *
+ * File read buffering mode.
+ */
+typedef enum {
+ GST_FILE_SINK_BUFFER_MODE_DEFAULT = -1,
+ GST_FILE_SINK_BUFFER_MODE_FULL = _IOFBF,
+ GST_FILE_SINK_BUFFER_MODE_LINE = _IOLBF,
+ GST_FILE_SINK_BUFFER_MODE_UNBUFFERED = _IONBF
+} GstFileSinkBufferMode;
+
+/**
* GstFileSink:
*
* Opaque #GstFileSink structure.