Merge remote-tracking branch 'origin/master' into 0.11
This commit is contained in:
commit
d06ad8e95e
@ -419,7 +419,7 @@ gst_subtitle_overlay_create_factory_caps (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_filter_factories_for_caps (GstElementFactory * factory, const GstCaps * caps)
|
check_factory_for_caps (GstElementFactory * factory, const GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstCaps *fcaps = _get_sub_caps (factory);
|
GstCaps *fcaps = _get_sub_caps (factory);
|
||||||
gboolean ret = (fcaps) ? gst_caps_can_intersect (fcaps, caps) : FALSE;
|
gboolean ret = (fcaps) ? gst_caps_can_intersect (fcaps, caps) : FALSE;
|
||||||
@ -432,6 +432,26 @@ _filter_factories_for_caps (GstElementFactory * factory, const GstCaps * caps)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GList *
|
||||||
|
gst_subtitle_overlay_get_factories_for_caps (const GList * list,
|
||||||
|
const GstCaps * caps)
|
||||||
|
{
|
||||||
|
const GList *walk = list;
|
||||||
|
GList *result = NULL;
|
||||||
|
|
||||||
|
while (walk) {
|
||||||
|
GstElementFactory *factory = walk->data;
|
||||||
|
|
||||||
|
walk = g_list_next (walk);
|
||||||
|
|
||||||
|
if (check_factory_for_caps (factory, caps)) {
|
||||||
|
result = g_list_prepend (result, factory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
_sort_by_ranks (GstPluginFeature * f1, GstPluginFeature * f2)
|
_sort_by_ranks (GstPluginFeature * f1, GstPluginFeature * f2)
|
||||||
{
|
{
|
||||||
@ -821,8 +841,8 @@ _pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
|
|||||||
g_mutex_lock (self->factories_lock);
|
g_mutex_lock (self->factories_lock);
|
||||||
gst_subtitle_overlay_update_factory_list (self);
|
gst_subtitle_overlay_update_factory_list (self);
|
||||||
if (subcaps) {
|
if (subcaps) {
|
||||||
factories = gst_filter_run (self->factories,
|
factories =
|
||||||
(GstFilterFunc) _filter_factories_for_caps, FALSE, subcaps);
|
gst_subtitle_overlay_get_factories_for_caps (self->factories, subcaps);
|
||||||
if (!factories) {
|
if (!factories) {
|
||||||
GstMessage *msg;
|
GstMessage *msg;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user