GList *factories;
/* Only DECODER factories */
GList *decoder_factories;
+#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
+ GList *skipped_decoder_factories;
+#endif
/* DECODABLE but not DECODER factories */
GList *decodable_factories;
static GstStreamCollection *get_merged_collection (GstDecodebin3 * dbin);
static void update_requested_selection (GstDecodebin3 * dbin);
+#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
+static GList *create_decoder_factory_list (GstDecodebin3 * dbin, GstCaps * caps);
+#endif
/* FIXME: Really make all the parser stuff a self-contained helper object */
#include "gstdecodebin3-parse.c"
g_list_free (dbin->decoder_factories);
dbin->decoder_factories = NULL;
}
+#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
+ if (dbin->skipped_decoder_factories)
+ g_clear_pointer(&dbin->skipped_decoder_factories, g_list_free);
+#endif
if (dbin->decodable_factories) {
g_list_free (dbin->decodable_factories);
dbin->decodable_factories = NULL;
GList *decoder_list;
/* If the incoming caps are compatible with a decoder, we don't need to
* process it before */
+#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
+ decoder_list = create_decoder_factory_list (dbin, newcaps);
+#else
g_mutex_lock (&dbin->factories_lock);
gst_decode_bin_update_factories_list (dbin);
decoder_list =
gst_element_factory_list_filter (dbin->decoder_factories, newcaps,
GST_PAD_SINK, TRUE);
g_mutex_unlock (&dbin->factories_lock);
+#endif
if (decoder_list) {
GST_FIXME_OBJECT (sinkpad, "parsebin not needed (available decoders) !");
gst_plugin_feature_list_free (decoder_list);
/* Filter decoder and other decodables */
dbin->decoder_factories = NULL;
dbin->decodable_factories = NULL;
+#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
+ if (dbin->skipped_decoder_factories)
+ g_clear_pointer(&dbin->skipped_decoder_factories, g_list_free);
+#endif
for (tmp = dbin->factories; tmp; tmp = tmp->next) {
GstElementFactory *fact = (GstElementFactory *) tmp->data;
if (gst_element_factory_list_is_type (fact,
dbin->decoder_factories =
g_list_append (dbin->decoder_factories, fact);
} else {
- GST_WARNING("%s is skipped", GST_OBJECT_NAME(fact));
+ GST_DEBUG ("%s is added into skipped list", GST_OBJECT_NAME(fact));
+ dbin->skipped_decoder_factories =
+ g_list_append (dbin->skipped_decoder_factories, fact);
}
#endif
} else {
gst_decode_bin_update_factories_list (dbin);
res = gst_element_factory_list_filter (dbin->decoder_factories,
caps, GST_PAD_SINK, TRUE);
+#ifdef TIZEN_FEATURE_FORCE_SW_DECODER
+ if (!res && dbin->skipped_decoder_factories) {
+ GST_DEBUG ("try with skipped decoders");
+ res = gst_element_factory_list_filter (dbin->skipped_decoder_factories,
+ caps, GST_PAD_SINK, TRUE);
+ }
+#endif
g_mutex_unlock (&dbin->factories_lock);
return res;
}