mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
Revert "videorate: Implement allocation query"
This reverts commit 3c04db4a30
.
This commit is contained in:
parent
3c04db4a30
commit
2e264103e1
2 changed files with 7 additions and 39 deletions
|
@ -5,8 +5,7 @@ plugin_LTLIBRARIES = libgstvideorate.la
|
||||||
libgstvideorate_la_SOURCES = gstvideorate.c
|
libgstvideorate_la_SOURCES = gstvideorate.c
|
||||||
libgstvideorate_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
|
libgstvideorate_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
|
||||||
libgstvideorate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstvideorate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstvideorate_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
|
libgstvideorate_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
|
||||||
$(top_builddir)/gst-libs/gst/video/libgstvideo-$(GST_API_VERSION).la
|
|
||||||
libgstvideorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
libgstvideorate_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
||||||
|
|
||||||
Android.mk: Makefile.am $(BUILT_SOURCES)
|
Android.mk: Makefile.am $(BUILT_SOURCES)
|
||||||
|
|
|
@ -70,7 +70,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstvideorate.h"
|
#include "gstvideorate.h"
|
||||||
#include <gst/video/video.h>
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (video_rate_debug);
|
GST_DEBUG_CATEGORY_STATIC (video_rate_debug);
|
||||||
#define GST_CAT_DEFAULT video_rate_debug
|
#define GST_CAT_DEFAULT video_rate_debug
|
||||||
|
@ -849,48 +848,18 @@ gst_video_rate_query (GstBaseTransform * trans, GstPadDirection direction,
|
||||||
gst_query_set_latency (query, live, min, max);
|
gst_query_set_latency (query, live, min, max);
|
||||||
}
|
}
|
||||||
gst_object_unref (peer);
|
gst_object_unref (peer);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
/* Simple fallthrough if we don't have a latency or not a peer that we
|
||||||
}
|
* can't ask about its latency yet.. */
|
||||||
case GST_QUERY_ALLOCATION:
|
|
||||||
{
|
|
||||||
guint i, n_allocation;
|
|
||||||
|
|
||||||
n_allocation = gst_query_get_n_allocation_pools (query);
|
|
||||||
|
|
||||||
for (i = 0; i < n_allocation; i++) {
|
|
||||||
GstBufferPool *pool;
|
|
||||||
guint size, min, max;
|
|
||||||
|
|
||||||
gst_query_parse_nth_allocation_pool (query, i, &pool, &size, &min,
|
|
||||||
&max);
|
|
||||||
|
|
||||||
min += 1;
|
|
||||||
|
|
||||||
if (max != 0)
|
|
||||||
max = MAX (min, max);
|
|
||||||
|
|
||||||
gst_query_set_nth_allocation_pool (query, i, pool, size, min, max);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (n_allocation == 0) {
|
|
||||||
GstCaps *caps;
|
|
||||||
GstVideoInfo info;
|
|
||||||
|
|
||||||
gst_query_parse_allocation (query, &caps, NULL);
|
|
||||||
gst_video_info_from_caps (&info, caps);
|
|
||||||
|
|
||||||
gst_query_add_allocation_pool (query, NULL, info.size, 1, 0);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
res =
|
||||||
|
GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction,
|
||||||
|
query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
res =
|
|
||||||
GST_BASE_TRANSFORM_CLASS (parent_class)->query (trans, direction, query);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue