if (dbin->collection)
gst_object_unref (dbin->collection);
dbin->collection = collection;
-
+#ifdef TIZEN_FEATURE_UPSTREAM
+ dbin->select_streams_seqnum = GST_SEQNUM_INVALID;
+#endif
msg =
gst_message_new_stream_collection ((GstObject *) dbin,
dbin->collection);
GList *tmp = NULL;
GstStreamType used_types = 0;
GstStreamCollection *collection;
+#ifdef TIZEN_FEATURE_UPSTREAM
+ gboolean all_user_selected = TRUE;
+#endif
/* 1. Is there a pending SELECT_STREAMS we can return straight away since
* the switch handler will take care of the pending selection */
gst_decodebin3_signals[SIGNAL_SELECT_STREAM], 0, collection, stream,
&request);
GST_DEBUG_OBJECT (dbin, "stream %s , request:%d", sid, request);
+
+#ifdef TIZEN_FEATURE_UPSTREAM
+ if (request == -1)
+ all_user_selected = FALSE;
+#endif
+
if (request == 1 || (request == -1
&& (stream_in_list (dbin->requested_selection, sid)
|| stream_in_list (dbin->active_selection, sid)))) {
}
/* 4. If not, match one stream of each type */
- for (i = 0; i < nb; i++) {
- GstStream *stream = gst_stream_collection_get_stream (collection, i);
- GstStreamType curtype = gst_stream_get_stream_type (stream);
- if (!(used_types & curtype)) {
- const gchar *sid = gst_stream_get_stream_id (stream);
- GST_DEBUG_OBJECT (dbin, "Selecting stream '%s' of type %s",
- sid, gst_stream_type_get_name (curtype));
- tmp = g_list_append (tmp, (gchar *) sid);
- used_types |= curtype;
+#ifdef TIZEN_FEATURE_UPSTREAM
+ if (!all_user_selected && dbin->select_streams_seqnum == GST_SEQNUM_INVALID)
+#endif
+ {
+ for (i = 0; i < nb; i++) {
+ GstStream *stream = gst_stream_collection_get_stream (collection, i);
+ GstStreamType curtype = gst_stream_get_stream_type (stream);
+ if (!(used_types & curtype)) {
+ const gchar *sid = gst_stream_get_stream_id (stream);
+ GST_DEBUG_OBJECT (dbin, "Selecting stream '%s' of type %s",
+ sid, gst_stream_type_get_name (curtype));
+ tmp = g_list_append (tmp, (gchar *) sid);
+ used_types |= curtype;
+ }
}
}
/* dbin->pending_collection = */
/* g_list_append (dbin->pending_collection, collection); */
}
+
+#ifdef TIZEN_FEATURE_UPSTREAM
+ dbin->select_streams_seqnum = GST_SEQNUM_INVALID;
+#endif
SELECTION_UNLOCK (dbin);
}
/* We are completely active */
msg = gst_message_new_streams_selected ((GstObject *) dbin, dbin->collection);
- GST_MESSAGE_SEQNUM (msg) = dbin->select_streams_seqnum;
+#ifdef TIZEN_FEATURE_UPSTREAM
+ if (dbin->select_streams_seqnum != GST_SEQNUM_INVALID)
+#endif
+ {
+ gst_message_set_seqnum (msg, dbin->select_streams_seqnum);
+ }
for (tmp = dbin->output_streams; tmp; tmp = tmp->next) {
DecodebinOutputStream *output = (DecodebinOutputStream *) tmp->data;
if (output->slot) {