Tizen 2.1 base
[profile/ivi/gst-plugins-ugly0.10.git] / gst / iec958 / ac3iec.h
1 /* GStreamer
2  * Copyright (C) 2004 Martin Soto <martinsoto@users.sourceforge.net>
3  *
4  * ac3iec.h: Pad AC3 frames into IEC958 frames for the SP/DIF interface.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __AC3IEC_H__
23 #define __AC3IEC_H__
24
25 #include <gst/gst.h>
26
27 #include "ac3_padder.h"
28
29 G_BEGIN_DECLS
30
31
32 #define GST_TYPE_AC3IEC \
33   (ac3iec_get_type())
34 #define AC3IEC(obj) \
35   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AC3IEC,AC3IEC))
36 #define AC3IEC_CLASS(klass) \
37   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AC3IEC,AC3IECClass))
38 #define GST_IS_AC3IEC(obj) \
39   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AC3IEC))
40 #define GST_IS_AC3IEC_CLASS(klass) \
41   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AC3IEC))
42
43
44 typedef struct _AC3IEC AC3IEC;
45 typedef struct _AC3IECClass AC3IECClass;
46
47
48 typedef enum {
49   AC3IEC_OPEN           = (GST_ELEMENT_FLAG_LAST << 0),
50   AC3IEC_FLAG_LAST      = (GST_ELEMENT_FLAG_LAST << 2)
51 } Ac3iecFlags;
52
53
54 struct _AC3IEC {
55   GstElement element;
56
57   GstPad *sink;
58   GstPad *src;
59
60   GstCaps *caps;                /* source pad caps, once known */
61
62   GstClockTime cur_ts;          /* Time stamp for the current
63                                    frame. */
64   GstClockTime next_ts;         /* Time stamp for the next frame. */
65
66   ac3_padder *padder;           /* AC3 to SPDIF padder object. */
67
68   gboolean dvdmode;             /* TRUE if DVD mode (input is
69                                    demultiplexed from a DVD) is
70                                    active. */
71
72   gboolean raw_audio;           /* TRUE if output pad should use raw
73                                    audio capabilities. */
74 };
75
76
77 struct _AC3IECClass {
78   GstElementClass parent_class;
79
80   /* Signals */
81 };
82
83
84 extern GType    ac3iec_get_type         (void);
85
86 G_END_DECLS
87
88 #endif /* __AC3IEC_H__ */