* biggest incoming video stream and the framerate of the fastest incoming one.
*
* VideoAggregator will do colorspace conversion.
- *
+ *
* Zorder for each input stream can be configured on the
* #GstVideoAggregatorPad.
*
GstCaps *caps, *peercaps, *info_caps;
GstStructure *s;
GstVideoInfo info;
+ int i;
if (GST_VIDEO_INFO_FPS_N (&vagg->info) != best_fps_n ||
GST_VIDEO_INFO_FPS_D (&vagg->info) != best_fps_d) {
caps = info_caps;
}
- peercaps = gst_pad_peer_query_caps (agg->srcpad, NULL);
- if (peercaps) {
- GstCaps *tmp;
- int i;
-
+ /* If the sub-class allows it, allow size/framerate changes */
+ if (!vagg_klass->preserve_update_caps_result) {
s = gst_caps_get_structure (caps, 0);
gst_structure_get (s, "width", G_TYPE_INT, &best_width, "height",
G_TYPE_INT, &best_height, NULL);
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT, "framerate",
GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
}
+ }
+
+ peercaps = gst_pad_peer_query_caps (agg->srcpad, caps);
+ if (peercaps) {
+ GstCaps *tmp;
+
tmp = gst_caps_intersect (caps, peercaps);
GST_DEBUG_OBJECT (vagg, "intersecting %" GST_PTR_FORMAT
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-
+
#ifndef __GST_VIDEO_AGGREGATOR_H__
#define __GST_VIDEO_AGGREGATOR_H__
* Notifies subclasses what caps format has been negotiated
* @find_best_format: Optional.
* Lets subclasses decide of the best common format to use.
+ * @preserve_update_caps_result: Sub-classes should set this to true if the return result
+ * of the update_caps() method should not be further modified
+ * by GstVideoAggregator by removing fields.
**/
struct _GstVideoAggregatorClass
{
GstCaps * downstream_caps,
GstVideoInfo * best_info,
gboolean * at_least_one_alpha);
+
+ gboolean preserve_update_caps_result;
+
/* < private > */
gpointer _gst_reserved[GST_PADDING_LARGE];
};