Macro qtTrIdx() replaced by tr() and QT_TRANSLATE_NOOP()
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst / videorate / gstvideorate.h
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  *
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.
8  *
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.
13  *
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., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __GST_VIDEO_RATE_H__
21 #define __GST_VIDEO_RATE_H__
22
23 #include <gst/gst.h>
24
25 G_BEGIN_DECLS
26
27 #define GST_TYPE_VIDEO_RATE \
28   (gst_video_rate_get_type())
29 #define GST_VIDEO_RATE(obj) \
30   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_RATE,GstVideoRate))
31 #define GST_VIDEO_RATE_CLASS(klass) \
32   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_RATE,GstVideoRateClass))
33 #define GST_IS_VIDEO_RATE(obj) \
34   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_RATE))
35 #define GST_IS_VIDEO_RATE_CLASS(klass) \
36   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_RATE))
37
38 typedef struct _GstVideoRate GstVideoRate;
39 typedef struct _GstVideoRateClass GstVideoRateClass;
40
41 /**
42  * GstVideoRate:
43  *
44  * Opaque data structure.
45  */
46 struct _GstVideoRate
47 {
48   GstElement element;
49
50   GstPad *sinkpad, *srcpad;
51
52   /* video state */
53   gint from_rate_numerator, from_rate_denominator;
54   gint to_rate_numerator, to_rate_denominator;
55   guint64 next_ts;              /* Timestamp of next buffer to output */
56   GstBuffer *prevbuf;
57   guint64 prev_ts;              /* Previous buffer timestamp */
58   guint64 out_frame_count;      /* number of frames output since the beginning
59                                  * of the segment or the last frame rate caps
60                                  * change, whichever was later */
61   guint64 base_ts;              /* used in next_ts calculation after a
62                                  * frame rate caps change */
63   gboolean discont;
64   guint64 last_ts;              /* Timestamp of last input buffer */
65
66   /* segment handling */
67   GstSegment segment;
68
69   /* properties */
70   guint64 in, out, dup, drop;
71   gboolean silent;
72   gdouble new_pref;
73   gboolean skip_to_first;
74 };
75
76 struct _GstVideoRateClass
77 {
78   GstElementClass parent_class;
79 };
80
81 GType gst_video_rate_get_type (void);
82
83 G_END_DECLS
84
85 #endif /* __GST_VIDEO_RATE_H__ */