2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __GST_VIDEO_RATE_H__
21 #define __GST_VIDEO_RATE_H__
24 #include <gst/base/gstbasetransform.h>
28 #define GST_TYPE_VIDEO_RATE (gst_video_rate_get_type())
29 G_DECLARE_FINAL_TYPE (GstVideoRate, gst_video_rate, GST, VIDEO_RATE,
35 * Opaque data structure.
39 GstBaseTransform parent;
42 gint from_rate_numerator, from_rate_denominator;
43 gint to_rate_numerator, to_rate_denominator;
44 guint64 next_ts; /* Timestamp of next buffer to output */
46 guint64 prev_ts; /* Previous buffer timestamp */
47 guint64 out_frame_count; /* number of frames output since the beginning
48 * of the segment or the last frame rate caps
49 * change, whichever was later */
50 guint64 base_ts; /* used in next_ts calculation after a
51 * frame rate caps change */
53 guint64 last_ts; /* Timestamp of last input buffer */
55 guint64 average_period;
56 GstClockTimeDiff wanted_diff; /* target average diff */
57 GstClockTimeDiff average; /* moving average period */
58 gboolean force_variable_rate;
59 gboolean updating_caps;
60 guint64 max_duplication_time;
61 guint64 max_closing_segment_duplication_duration;
63 /* segment handling */
67 guint64 in, out, dup, drop;
70 gboolean skip_to_first;
72 guint64 average_period_set;
79 GST_ELEMENT_REGISTER_DECLARE (videorate);
82 #endif /* __GST_VIDEO_RATE_H__ */