Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / ext / annodex / gstcmmltag.h
1 /*
2  * gstcmmltag.h - GStreamer annodex CMML tag support
3  * Copyright (C) 2005 Alessandro Decina
4  * 
5  * Authors:
6  *   Alessandro Decina <alessandro@nnva.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef __GST_CMML_TAG_H__
25 #define __GST_CMML_TAG_H__
26
27 #include <gst/gst.h>
28
29 /* GstCmmlTagStream */
30 #define GST_TYPE_CMML_TAG_STREAM (gst_cmml_tag_stream_get_type ())
31 #define GST_CMML_TAG_STREAM(obj) \
32   (G_TYPE_CHECK_INSTANCE_CAST((obj), \
33                               GST_TYPE_CMML_TAG_STREAM, GstCmmlTagStream))
34 #define GST_CMML_TAG_STREAM_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_CAST((klass), \
36                               GST_TYPE_CMML_TAG_STREAM, GstCmmlTagStreamClass))
37 #define GST_CMML_TAG_STREAM_GET_CLASS(obj) \
38   (G_TYPE_INSTANCE_GET_CLASS((obj), \
39                              GST_TYPE_CMML_TAG_STREAM, GstCmmlTagStreamClass))
40
41 /* GstCmmlTagHead */
42 #define GST_TYPE_CMML_TAG_HEAD (gst_cmml_tag_head_get_type ())
43 #define GST_CMML_TAG_HEAD(obj) \
44   (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_TAG_HEAD, GstCmmlTagHead))
45 #define GST_CMML_TAG_HEAD_CLASS(klass) \
46   (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_TAG_HEAD, GstCmmlTagHeadClass))
47 #define GST_CMML_TAG_HEAD_GET_CLASS(obj) \
48   (G_TYPE_INSTANCE_GET_CLASS((obj), \
49                              GST_TYPE_CMML_TAG_HEAD, GstCmmlTagHeadClass))
50
51 /* GstCmmlTagClip */
52 #define GST_TYPE_CMML_TAG_CLIP (gst_cmml_tag_clip_get_type ())
53 #define GST_CMML_TAG_CLIP(obj) \
54   (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_TAG_CLIP, GstCmmlTagClip))
55 #define GST_CMML_TAG_CLIP_CLASS(klass) \
56   (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_TAG_CLIP, GstCmmlTagClipClass))
57 #define GST_CMML_TAG_CLIP_GET_CLASS(obj) \
58   (G_TYPE_INSTANCE_GET_CLASS((obj), \
59                              GST_TYPE_CMML_TAG_CLIP, GstCmmlTagClipClass))
60
61 typedef struct _GstCmmlTagStream GstCmmlTagStream;
62 typedef struct _GstCmmlTagStreamClass GstCmmlTagStreamClass;
63 typedef struct _GstCmmlTagHead GstCmmlTagHead;
64 typedef struct _GstCmmlTagHeadClass GstCmmlTagHeadClass;
65 typedef struct _GstCmmlTagClip GstCmmlTagClip;
66 typedef struct _GstCmmlTagClipClass GstCmmlTagClipClass;
67
68 struct _GstCmmlTagStream {
69   GObject object;
70
71   guchar *timebase;
72   guchar *utc;
73
74   GValueArray *imports;
75 };
76
77 struct _GstCmmlTagStreamClass {
78   GObjectClass parent_class;
79 };
80
81 struct _GstCmmlTagHead {
82   GObject object;
83   
84   guchar *title;                  /* title of the media */
85   guchar *base;
86   GValueArray *meta;              /* metadata attached to the media.
87                                  * The elements are positioned in key-value
88                                  * pairs ie (key, content, key2, content2,
89                                  * ...)
90                                  */
91 };
92
93 struct _GstCmmlTagHeadClass {
94   GObjectClass parent_class;
95 };
96
97 struct _GstCmmlTagClip {
98   GObject object;
99
100   gboolean empty;                 /* empty flag. An empty clip marks the
101                                    * end of the previous clip.
102                                    */
103   
104   guchar *id;                     /* clip id */
105   guchar *track;                  /* clip track */
106
107   GstClockTime start_time;        /* clip start time */
108   GstClockTime end_time;          /* clip end time */
109   
110   guchar *anchor_href;            /* anchor href URI */
111   guchar *anchor_text;            /* anchor text */
112   
113   guchar *img_src;                /* image URI */
114   guchar *img_alt;                /* image alternative text */
115   
116   guchar *desc_text;              /* clip description */
117   
118   GValueArray *meta;              /* metadata attached to the clip
119                                    * The elements are positioned in key-value
120                                    * pairs ie (key, content, key2, content2,
121                                    * ...)
122                                    */
123 };
124
125 struct _GstCmmlTagClipClass {
126   GObjectClass parent_class;
127 };
128
129 GType gst_cmml_tag_stream_get_type (void);
130 GType gst_cmml_tag_head_get_type (void);
131 GType gst_cmml_tag_clip_get_type (void);
132
133 #endif /* __GST_CMML_TAG_H__ */