int __ms_factory_rank_compare(GstPluginFeature *first_feature, GstPluginFeature *second_feature)
{
ms_debug_fenter();
+ guint first_rank = 0, second_rank = 0;
- ms_retvm_if(!first_feature, MEDIA_STREAMER_ERROR_INVALID_PARAMETER, "first_feature is NULL");
- ms_retvm_if(!second_feature, MEDIA_STREAMER_ERROR_INVALID_PARAMETER, "second_feature is NULL");
+ first_rank = gst_plugin_feature_get_rank(first_feature);
+ second_rank = gst_plugin_feature_get_rank(second_feature);
+ ms_debug ("second[%s]_rank(%d) - first[%s]_rank(%d) = (%d)",
+ GST_OBJECT_NAME(GST_ELEMENT_FACTORY(second_feature)), second_rank,
+ GST_OBJECT_NAME(GST_ELEMENT_FACTORY(first_feature)), first_rank, second_rank - first_rank);
ms_debug_fleave();
- return (gst_plugin_feature_get_rank(second_feature) - gst_plugin_feature_get_rank(first_feature));
+ return second_rank - first_rank;
}
GstElement *__ms_combine_next_element(GstElement *previous_element, GstPad *prev_elem_src_pad, GstElement *bin_to_find_in, media_streamer_node_type_e node_type)
if (factories) {
factory = GST_ELEMENT_FACTORY(factories->data);
+ ms_info("Sorted result element is [%s]", GST_OBJECT_NAME(factory));
gst_element = __ms_element_create(GST_OBJECT_NAME(factory), NULL);
} else {
ms_debug("Could not find any compatible element for node [%d]: in[%s] - out[%s]",