gboolean is_stream;
gboolean need_queue;
- guint64 buffer_duration; /* When streaming, buffer duration (ns) */
- guint buffer_size; /* When streaming, buffer size (bytes) */
+ guint64 buffer_duration; /* When buffering, buffer duration (ns) */
+ guint buffer_size; /* When buffering, buffer size (bytes) */
gboolean download;
+ gboolean use_buffering;
GstElement *source;
GstElement *typefind;
#define DEFAULT_BUFFER_DURATION -1
#define DEFAULT_BUFFER_SIZE -1
#define DEFAULT_DOWNLOAD FALSE
+#define DEFAULT_USE_BUFFERING FALSE
enum
{
PROP_BUFFER_SIZE,
PROP_BUFFER_DURATION,
PROP_DOWNLOAD,
+ PROP_USE_BUFFERING,
PROP_LAST
};
g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE,
g_param_spec_int ("buffer-size", "Buffer size (bytes)",
- "Buffer size when buffering network streams (-1 queue2 default value)",
+ "Buffer size when buffering streams (-1 default value)",
-1, G_MAXINT, DEFAULT_BUFFER_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_BUFFER_DURATION,
g_param_spec_int64 ("buffer-duration", "Buffer duration (ns)",
- "Buffer duration when buffering network streams (-1 queue2 default value)",
+ "Buffer duration when buffering streams (-1 default value)",
-1, G_MAXINT64, DEFAULT_BUFFER_DURATION,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * GstURIDecodeBin::download:
+ *
+ * For certain media type, enable download buffering.
+ */
g_object_class_install_property (gobject_class, PROP_DOWNLOAD,
g_param_spec_boolean ("download", "Download",
"Attempt download buffering when buffering network streams",
DEFAULT_DOWNLOAD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * GstURIDecodeBin::use-buffering:
+ *
+ * Emit BUFFERING messages based on low-/high-percent thresholds of the
+ * demuxed or parsed data.
+ * When download buffering is activated and used for the current media
+ * type, this property does nothing. Otherwise perform buffering on the
+ * demuxed or parsed media.
+ *
+ * Since: 0.10.26
+ */
+ g_object_class_install_property (gobject_class, PROP_USE_BUFFERING,
+ g_param_spec_boolean ("use-buffering", "Use Buffering",
+ "Perform buffering on demuxed/parsed media (not implemented)",
+ DEFAULT_USE_BUFFERING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstURIDecodeBin::unknown-type:
dec->buffer_duration = DEFAULT_BUFFER_DURATION;
dec->buffer_size = DEFAULT_BUFFER_SIZE;
dec->download = DEFAULT_DOWNLOAD;
+ dec->use_buffering = DEFAULT_USE_BUFFERING;
}
static void
case PROP_DOWNLOAD:
dec->download = g_value_get_boolean (value);
break;
+ case PROP_USE_BUFFERING:
+ dec->use_buffering = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_DOWNLOAD:
g_value_set_boolean (value, dec->download);
break;
+ case PROP_USE_BUFFERING:
+ g_value_set_boolean (value, dec->use_buffering);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;