enum
{
PROP_0,
- PROP_INDEXED
+ PROP_STREAMABLE
};
-#define DEFAULT_INDEXED TRUE
+#define DEFAULT_STREAMABLE FALSE
#define MAX_INDEX_ENTRIES 128
static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
/* FIXME: ideally the right mode of operation should be detected
* automatically using queries when parameter not specified. */
- g_object_class_install_property (gobject_class, PROP_INDEXED,
- g_param_spec_boolean ("indexed", "indexed",
- "If set to false, the output should be as if it is to be streamed "
- "and hence no indexes written or duration written.", DEFAULT_INDEXED,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (gobject_class, PROP_STREAMABLE,
+ g_param_spec_boolean ("streamable", "streamable",
+ "If set to true, the output should be as if it is to be streamed "
+ "and hence no indexes written or duration written.",
+ DEFAULT_STREAMABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_flv_mux_change_state);
gstelement_class->request_new_pad =
gst_element_add_pad (GST_ELEMENT (mux), mux->srcpad);
/* property */
- mux->indexed = DEFAULT_INDEXED;
+ mux->streamable = DEFAULT_STREAMABLE;
mux->collect = gst_collect_pads_new ();
gst_collect_pads_set_function (mux->collect,
/* Sometimes the information about the total file size is useful for the
player. It will be filled later, after getting EOS */
- if (mux->indexed) {
+ if (!mux->streamable) {
tmp = gst_flv_mux_create_number_script_value ("filesize", 0);
script_tag = gst_buffer_join (script_tag, tmp);
tags_written++;
}
- if (mux->indexed) {
+ if (!mux->streamable) {
tmp = gst_flv_mux_preallocate_index (mux);
script_tag = gst_buffer_join (script_tag, tmp);
} else {
- GST_DEBUG_OBJECT (mux, "not preallocating index, stream is live");
+ GST_DEBUG_OBJECT (mux, "not preallocating index, streamable mode");
}
for (i = 0; tags && i < n_tags; i++) {
gst_collect_pads_pop (mux->collect, (GstCollectData *) cpad);
GstFlowReturn ret;
- if (mux->indexed)
+ if (!mux->streamable)
gst_flv_mux_update_index (mux, buffer, cpad);
tag = gst_flv_mux_buffer_to_tag (mux, buffer, cpad);
guint32 index_len, allocate_size;
guint32 i, index_skip;
- if (!mux->indexed)
+ if (mux->streamable)
return GST_FLOW_OK;
/* seek back to the preallocated index space */
/* The FLV timestamp is an int32 field. For non-live streams error out if a
bigger timestamp is seen, for live the timestamp will get wrapped in
gst_flv_mux_buffer_to_tag */
- if (mux->indexed && GST_CLOCK_TIME_IS_VALID (best_time)
+ if (!mux->streamable && GST_CLOCK_TIME_IS_VALID (best_time)
&& best_time / GST_MSECOND > G_MAXINT32) {
GST_WARNING_OBJECT (mux, "Timestamp larger than FLV supports - EOS");
eos = TRUE;
GstFlvMux *mux = GST_FLV_MUX (object);
switch (prop_id) {
- case PROP_INDEXED:
- g_value_set_boolean (value, mux->indexed);
+ case PROP_STREAMABLE:
+ g_value_set_boolean (value, mux->streamable);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
GstFlvMux *mux = GST_FLV_MUX (object);
switch (prop_id) {
- case PROP_INDEXED:
- mux->indexed = g_value_get_boolean (value);
+ case PROP_STREAMABLE:
+ mux->streamable = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);