• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) 2013 FIXME <fixme@example.com>
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., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef _GST_IVTC_H_
21 #define _GST_IVTC_H_
22 
23 #include <gst/base/gstbasetransform.h>
24 #include <gst/video/video.h>
25 
26 G_BEGIN_DECLS
27 
28 GST_ELEMENT_REGISTER_DECLARE (ivtc);
29 
30 #define GST_TYPE_IVTC   (gst_ivtc_get_type())
31 #define GST_IVTC(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IVTC,GstIvtc))
32 #define GST_IVTC_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IVTC,GstIvtcClass))
33 #define GST_IS_IVTC(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IVTC))
34 #define GST_IS_IVTC_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IVTC))
35 
36 typedef struct _GstIvtc GstIvtc;
37 typedef struct _GstIvtcClass GstIvtcClass;
38 typedef struct _GstIvtcField GstIvtcField;
39 
40 struct _GstIvtcField
41 {
42   GstBuffer *buffer;
43   int parity;
44   GstVideoFrame frame;
45   GstClockTime ts;
46 };
47 
48 #define GST_IVTC_MAX_FIELDS 10
49 
50 struct _GstIvtc
51 {
52   GstBaseTransform base_ivtc;
53 
54   GstSegment segment;
55 
56   GstVideoInfo sink_video_info;
57   GstVideoInfo src_video_info;
58   GstClockTime current_ts;
59   GstClockTime field_duration;
60 
61   int n_fields;
62   GstIvtcField fields[GST_IVTC_MAX_FIELDS];
63 };
64 
65 struct _GstIvtcClass
66 {
67   GstBaseTransformClass base_ivtc_class;
68 };
69 
70 GType gst_ivtc_get_type (void);
71 
72 G_END_DECLS
73 
74 #endif
75