gint pending;
gboolean async_pending; /* async-start has been emited */
+
+ gboolean expose_allstreams; /* Whether to expose unknow type streams or not */
};
struct _GstURIDecodeBinClass
#define DEFAULT_BUFFER_SIZE -1
#define DEFAULT_DOWNLOAD FALSE
#define DEFAULT_USE_BUFFERING FALSE
+#define DEFAULT_EXPOSE_ALL_STREAMS TRUE
enum
{
PROP_BUFFER_DURATION,
PROP_DOWNLOAD,
PROP_USE_BUFFERING,
+ PROP_EXPOSE_ALL_STREAMS,
PROP_LAST
};
DEFAULT_USE_BUFFERING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
+ * GstURIDecodeBin::expose-all-streams
+ *
+ * Expose streams of unknown type.
+ *
+ * If set to %FALSE, then only the streams that can be decoded to the final
+ * caps (see 'caps' property) will have a pad exposed. Streams that do not
+ * match those caps but could have been decoded will not have decoder plugged
+ * in internally and will not have a pad exposed.
+ *
+ * Since: 0.10.30
+ */
+ g_object_class_install_property (gobject_class, PROP_EXPOSE_ALL_STREAMS,
+ g_param_spec_boolean ("expose-all-streams", "Expose All Streams",
+ "Expose all streams, including those of unknown type or that don't match the 'caps' property",
+ DEFAULT_EXPOSE_ALL_STREAMS,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
* GstURIDecodeBin::unknown-type:
* @bin: The uridecodebin
* @pad: the new pad containing caps that cannot be resolved to a 'final'
dec->buffer_size = DEFAULT_BUFFER_SIZE;
dec->download = DEFAULT_DOWNLOAD;
dec->use_buffering = DEFAULT_USE_BUFFERING;
+ dec->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS;
}
static void
case PROP_USE_BUFFERING:
dec->use_buffering = g_value_get_boolean (value);
break;
+ case PROP_EXPOSE_ALL_STREAMS:
+ dec->expose_allstreams = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_USE_BUFFERING:
g_value_set_boolean (value, dec->use_buffering);
break;
+ case PROP_EXPOSE_ALL_STREAMS:
+ g_value_set_boolean (value, dec->expose_allstreams);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
if (decoder->caps)
g_object_set (decodebin, "caps", decoder->caps, NULL);
+ /* Propagate expose-all-streams property */
+ g_object_set (decodebin, "expose-all-streams", decoder->expose_allstreams,
+ NULL);
+
if (!decoder->is_stream) {
/* propagate the use-buffering property but only when we are not already
* doing stream buffering with queue2. FIXME, we might want to do stream