Commit 73ce8c5b authored by Michael Smith's avatar Michael Smith

Add Annodex elements from Alessendro Decina: skeleton and CMML.

Original commit message from CVS:
* configure.ac:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* ext/Makefile.am:
* ext/annodex/Makefile.am:
* ext/annodex/gstannodex.c:
* ext/annodex/gstannodex.h:
* ext/annodex/gstcmmldec.c:
* ext/annodex/gstcmmldec.h:
* ext/annodex/gstcmmlenc.c:
* ext/annodex/gstcmmlenc.h:
* ext/annodex/gstcmmlparser.c:
* ext/annodex/gstcmmlparser.h:
* ext/annodex/gstcmmltag.c:
* ext/annodex/gstcmmltag.h:
* ext/annodex/gstcmmlutils.c:
* ext/annodex/gstcmmlutils.h:
* ext/annodex/gstskeldec.c:
* ext/annodex/gstskeldec.h:
* ext/annodex/gstskeltag.c:
* ext/annodex/gstskeltag.h:
* tests/check/Makefile.am:
* tests/check/elements/cmmldec.c:
* tests/check/elements/cmmlenc.c:
* tests/check/elements/skeldec.c:
Add Annodex elements from Alessendro Decina: skeleton and CMML.
Includes tests & docs, oh my! Passes Thomas's -good checklist
entirely. Wow.
parent dd8f37fa
2006-02-24 Michael Smith <msmith@fluendo.com>
* configure.ac:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* ext/Makefile.am:
* ext/annodex/Makefile.am:
* ext/annodex/gstannodex.c:
* ext/annodex/gstannodex.h:
* ext/annodex/gstcmmldec.c:
* ext/annodex/gstcmmldec.h:
* ext/annodex/gstcmmlenc.c:
* ext/annodex/gstcmmlenc.h:
* ext/annodex/gstcmmlparser.c:
* ext/annodex/gstcmmlparser.h:
* ext/annodex/gstcmmltag.c:
* ext/annodex/gstcmmltag.h:
* ext/annodex/gstcmmlutils.c:
* ext/annodex/gstcmmlutils.h:
* ext/annodex/gstskeldec.c:
* ext/annodex/gstskeldec.h:
* ext/annodex/gstskeltag.c:
* ext/annodex/gstskeltag.h:
* tests/check/Makefile.am:
* tests/check/elements/cmmldec.c:
* tests/check/elements/cmmlenc.c:
* tests/check/elements/skeldec.c:
Add Annodex elements from Alessendro Decina: skeleton and CMML.
Includes tests & docs, oh my! Passes Thomas's -good checklist
entirely. Wow.
2006-02-24 Michael Smith <msmith@fluendo.com>
* autogen.sh:
......
......@@ -133,6 +133,8 @@ dnl common/m4/gst-arch.m4
dnl check CPU type
GST_ARCH
AC_SUBST(GST_CTRL_LIBS)
dnl Determine endianness
AC_C_BIGENDIAN
......@@ -326,6 +328,18 @@ GST_CHECK_FEATURE(AALIB, [aasink plug-in], aasink, [
AS_SCRUB_INCLUDE(AALIB_CFLAGS)
])
dnl *** annodex ***
translit(dnm, m, l) AM_CONDITIONAL(USE_ANNODEX, true)
GST_CHECK_FEATURE(ANNODEX, [annodex plug-in], skeldec cmmlenc cmmldec, [
PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.4.9, [
HAVE_ANNODEX=yes
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)
], [
HAVE_ANNODEX=no
])
])
dnl *** cairo ***
translit(dnm, m, l) AM_CONDITIONAL(USE_CAIRO, true)
GST_CHECK_FEATURE(CAIRO, [cairo plug-in], cairo, [
......@@ -618,6 +632,7 @@ gst/flx/Makefile
ext/jpeg/Makefile
ext/Makefile
ext/aalib/Makefile
ext/annodex/Makefile
ext/cairo/Makefile
ext/cdio/Makefile
ext/dv/Makefile
......
......@@ -30,6 +30,14 @@ GstCairoTimeOverlay
GstCairoTimeOverlayClass
</SECTION>
<SECTION>
<FILE>element-cmmldec</FILE>
GstCmmlDec
<TITLE>cmmldec</TITLE>
<SUBSECTION Standard>
GstCmmlDecClass
</SECTION>
<SECTION>
<FILE>element-cdiocddasrc</FILE>
GstCdioCddaSrc
......
......@@ -4,6 +4,12 @@ else
AALIB_DIR =
endif
if USE_ANNODEX
ANNODEX_DIR = annodex
else
ANNODEX_DIR =
endif
if USE_CAIRO
CAIRO_DIR = cairo
else
......@@ -108,6 +114,7 @@ endif
SUBDIRS = \
$(AALIB_DIR) \
$(ANNODEX_DIR) \
$(CAIRO_DIR) \
$(CDIO_DIR) \
$(DV1394_DIR) \
......
# plugindir is set in configure
# change libgstplugin.la to something more suitable
plugin_LTLIBRARIES = libgstannodex.la
# for the next set of variables, rename the prefix if you renamed the .la
# sources used to compile this plug-in
libgstannodex_la_SOURCES = \
gstannodex.c \
gstcmmlutils.c \
gstcmmldec.c \
gstcmmlenc.c \
gstcmmltag.c \
gstcmmlparser.c \
gstskeldec.c \
gstskeltag.c
# flags used to compile this plugin
# we use the GST_LIBS flags because we might be using plug-in libs
libgstannodex_la_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
libgstannodex_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(XML_LIBS)
libgstannodex_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
# headers we need but don't want installed
noinst_HEADERS = gstannodex.h gstcmmlutils.h gstcmmltag.h gstcmmlparser.h \
gstcmmldec.h gstskeldec.h gstcmmlenc.h
/*
* gstannodex.c - GStreamer annodex plugin
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstcmmlenc.h"
#include "gstcmmldec.h"
#include "gstskeldec.h"
GstClockTime
gst_annodex_granule_to_time (gint64 granulepos, gint64 granulerate_n,
gint64 granulerate_d, guint8 granuleshift)
{
gint64 keyindex, keyoffset;
gint64 granulerate;
GstClockTime res;
if (granulepos == -1)
return GST_CLOCK_TIME_NONE;
if (granulepos == 0 || granulerate_n == 0 || granulerate_d == 0)
return 0;
if (granuleshift != 0) {
keyindex = granulepos >> granuleshift;
keyoffset = granulepos - (keyindex << granuleshift);
granulepos = keyindex + keyoffset;
}
/* GST_SECOND / granulerate_n / granulerate_d */
granulerate = gst_util_uint64_scale (GST_SECOND,
granulerate_n, granulerate_d);
/* granulepos * granulerate */
res = gst_util_uint64_scale (granulepos, granulerate, 1);
return res;
}
GValueArray *
gst_annodex_parse_headers (const gchar * headers)
{
GValueArray *array;
GValue val = { 0 };
gchar *header_name = NULL;
gchar *header_value = NULL;
gchar *line, *column, *space, *tmp;
gchar **lines;
gint i = 0;
array = g_value_array_new (0);
g_value_init (&val, G_TYPE_STRING);
lines = g_strsplit (headers, "\r\n", 0);
line = lines[i];
while (line != NULL && *line != '\0') {
if (line[0] == '\t' || line[0] == ' ') {
/* WSP: continuation line */
if (header_value == NULL)
/* continuation line without a previous value */
goto fail;
tmp = g_strjoin (" ", header_value, g_strstrip (line), NULL);
g_free (header_value);
header_value = tmp;
} else {
if (header_name) {
g_value_take_string (&val, header_name);
g_value_array_append (array, &val);
g_value_take_string (&val, header_value);
g_value_array_append (array, &val);
}
/* search the column starting from line[1] as an header name can't be
* empty */
column = g_strstr_len (line + 1, strlen (line) - 1, ":");
if (column == NULL)
/* bad syntax */
goto fail;
if (*(space = column + 1) != ' ')
/* bad syntax */
goto fail;
header_name = g_strndup (line, column - line);
header_value = g_strdup (space + 1);
}
line = lines[++i];
}
if (header_name) {
g_value_take_string (&val, header_name);
g_value_array_append (array, &val);
g_value_take_string (&val, header_value);
g_value_array_append (array, &val);
}
g_value_unset (&val);
g_strfreev (lines);
return array;
fail:
GST_WARNING ("could not parse annodex headers");
g_free (header_name);
g_free (header_value);
g_strfreev (lines);
g_value_array_free (array);
g_value_unset (&val);
return NULL;
}
static gboolean
plugin_init (GstPlugin * plugin)
{
gst_tag_register (GST_TAG_CMML_STREAM, GST_TAG_FLAG_META,
GST_TYPE_CMML_TAG_STREAM, "cmml-stream", "annodex CMML stream tag", NULL);
gst_tag_register (GST_TAG_CMML_HEAD, GST_TAG_FLAG_META,
GST_TYPE_CMML_TAG_HEAD, "cmml-head", "annodex CMML head tag", NULL);
gst_tag_register (GST_TAG_CMML_CLIP, GST_TAG_FLAG_META,
GST_TYPE_CMML_TAG_CLIP, "cmml-clip", "annodex CMML clip tag", NULL);
if (!gst_cmml_enc_plugin_init (plugin))
return FALSE;
if (!gst_cmml_dec_plugin_init (plugin))
return FALSE;
if (!gst_skel_dec_plugin_init (plugin))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"annodex",
"annodex stream manipulation (info about annodex: http://www.annodex.net)",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
/*
* gstannodex.h - GStreamer annodex utility functions
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_ANNODEX_H__
#define __GST_ANNODEX_H__
#include <gst/gst.h>
GstClockTime gst_annodex_granule_to_time (gint64 granulepos,
gint64 granulerate_n, gint64 granulerate_d, guint8 granuleshift);
gchar *gst_annodex_time_to_npt (GstClockTime time);
GValueArray *gst_annodex_parse_headers (const gchar * headers);
#endif /* __GST_ANNODEX_H__ */
This diff is collapsed.
/*
* gstcmmldec.h - GStreamer annodex CMML decoder
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CMML_DEC_H__
#define __GST_CMML_DEC_H__
#include <gst/gst.h>
#include <gst/gstformat.h>
#include <gst/controller/gstcontroller.h>
#include "gstcmmlparser.h"
/* GstCmmlDec */
#define GST_TYPE_CMML_DEC (gst_cmml_dec_get_type())
#define GST_CMML_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_DEC, GstCmmlDec))
#define GST_CMML_DEC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_DEC, GstCmmlDec))
#define GST_IS_CMML_DEC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_CMML_DEC))
#define GST_IS_CMML_DEC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_CMML_DEC))
#define GST_CMML_DEC_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_CMML_DEC, GstCmmlDecClass))
typedef struct _GstCmmlDec GstCmmlDec;
typedef struct _GstCmmlDecClass GstCmmlDecClass;
typedef enum _GstCmmlPacketType GstCmmlPacketType;
enum _GstCmmlPacketType
{
GST_CMML_PACKET_UNKNOWN,
GST_CMML_PACKET_IDENT_HEADER,
GST_CMML_PACKET_FIRST_HEADER,
GST_CMML_PACKET_SECOND_HEADER,
GST_CMML_PACKET_CLIP
};
struct _GstCmmlDec
{
GstElement element;
/* element part */
GstPad *sinkpad;
GstPad *srcpad;
/* bitstream part */
gint16 major; /* bitstream version major */
gint16 minor; /* bitstream version minor */
gint64 granulerate_n; /* bitrstream granulerate numerator */
gint64 granulerate_d; /* bitstream granulerate denominator */
gint8 granuleshift; /* bitstreamgranuleshift */
gint64 granulepos; /* bitstream granule position */
GstClockTime timestamp; /* timestamp of the last buffer */
/* decoder part */
GstCmmlParser *parser; /* cmml parser */
gboolean sent_root;
GstFlowReturn flow_return; /* _chain return value */
gboolean wait_clip_end; /* when TRUE, the GST_TAG_MESSAGE for a
* clip is sent when the next clip (or EOS)
* is found, so that the clip end-time is
* known. This is useful for pre-extracting
* the clips.
*/
GHashTable *tracks;
};
struct _GstCmmlDecClass
{
GstElementClass parent_class;
};
gboolean gst_cmml_dec_plugin_init (GstPlugin * plugin);
#endif /* __GST_CMML_DEC_H__ */
This diff is collapsed.
/*
* gstcmmlenc.h - GStreamer CMML encoder
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Encina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CMML_ENC_H__
#define __GST_CMML_ENC_H__
#define GST_TYPE_CMML_ENC (gst_cmml_enc_get_type())
#define GST_CMML_ENC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_ENC, GstCmmlEnc))
#define GST_CMML_ENC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_ENC, GstCmmlEnc))
#define GST_IS_CMML_ENC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_CMML_ENC))
#define GST_IS_CMML_ENC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_CMML_ENC))
#define GST_CMML_ENC_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_CMML_ENC, GstCmmlEncClass))
#include <glib.h>
#include <gst/gst.h>
#include "gstcmmlparser.h"
#include "gstcmmlutils.h"
typedef struct _GstCmmlEnc GstCmmlEnc;
typedef struct _GstCmmlEncClass GstCmmlEncClass;
struct _GstCmmlEnc
{
GstElement element;
GstPad *sinkpad;
GstPad *srcpad;
gint16 major;
gint16 minor;
gint64 granulerate_n;
gint64 granulerate_d;
gint8 granuleshift;
GstCmmlParser *parser;
gboolean streaming;
GHashTable *tracks;
GstFlowReturn flow_return;
guchar *preamble;
gboolean sent_headers;
gboolean sent_eos;
};
struct _GstCmmlEncClass
{
GstElementClass parent_class;
};
gboolean gst_cmml_enc_plugin_init (GstPlugin * plugin);
#endif /* __GST_CMML_ENC_H__ */
This diff is collapsed.
/*
* gstcmmlparser.h - GStreamer CMML document parser
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CMML_PARSER_H__
#define __GST_CMML_PARSER_H__
#include <libxml/parser.h>
#include <glib.h>
#include "gstcmmltag.h"
typedef struct _GstCmmlParser GstCmmlParser;
typedef enum _GstCmmlParserMode GstCmmlParserMode;
typedef void (*GstCmmlParserPreambleCallback) (void *user_data,
const guchar * xml_preamble, const guchar * cmml_attrs);
typedef void (*GstCmmlParserCmmlEndCallback) (void *user_data);
typedef void (*GstCmmlParserStreamCallback) (void *user_data,
GstCmmlTagStream * stream);
typedef void (*GstCmmlParserHeadCallback) (void *user_data,
GstCmmlTagHead * head);
typedef void (*GstCmmlParserClipCallback) (void *user_data,
GstCmmlTagClip * clip);
enum _GstCmmlParserMode
{
GST_CMML_PARSER_ENCODE,
GST_CMML_PARSER_DECODE
};
struct _GstCmmlParser
{
GstCmmlParserMode mode;
xmlParserCtxtPtr context;
const gchar *preamble;
guint preamble_size;
void *user_data;
GstCmmlParserPreambleCallback preamble_callback;
GstCmmlParserStreamCallback stream_callback;
GstCmmlParserCmmlEndCallback cmml_end_callback;
GstCmmlParserHeadCallback head_callback;
GstCmmlParserClipCallback clip_callback;
};
GstCmmlParser *gst_cmml_parser_new (GstCmmlParserMode mode);
void gst_cmml_parser_free (GstCmmlParser * parser);
gboolean gst_cmml_parser_parse_chunk (GstCmmlParser * parser,
const gchar * data, guint size, GError ** error);
guchar *gst_cmml_parser_tag_stream_to_string (GstCmmlParser * parser,
GstCmmlTagStream * stream);
guchar *gst_cmml_parser_tag_head_to_string (GstCmmlParser * parser,
GstCmmlTagHead * head);
guchar *gst_cmml_parser_tag_clip_to_string (GstCmmlParser * parser,
GstCmmlTagClip * clip);
guchar *gst_cmml_parser_tag_object_to_string (GstCmmlParser * parser,
GObject * tag);
#endif /* __GST_CMML_PARSER_H__ */
This diff is collapsed.
/*
* gstcmmltag.h - GStreamer annodex CMML tag support
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_CMML_TAG_H__
#define __GST_CMML_TAG_H__
#include <gst/gst.h>
/* GstCmmlTagStream */
#define GST_TYPE_CMML_TAG_STREAM (gst_cmml_tag_stream_get_type ())
#define GST_CMML_TAG_STREAM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GST_TYPE_CMML_TAG_STREAM, GstCmmlTagStream))
#define GST_CMML_TAG_STREAM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_TAG_STREAM, GstCmmlTagStream))
#define GST_CMML_TAG_STREAM_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GST_TYPE_CMML_TAG_STREAM, GstCmmlTagStreamClass))
/* GstCmmlTagHead */
#define GST_TYPE_CMML_TAG_HEAD (gst_cmml_tag_head_get_type ())
#define GST_CMML_TAG_HEAD(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_TAG_HEAD, GstCmmlTagHead))
#define GST_CMML_TAG_HEAD_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_TAG_HEAD, GstCmmlTagHead))
#define GST_CMML_TAG_HEAD_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GST_TYPE_CMML_TAG_HEAD, GstCmmlTagHeadClass))
/* GstCmmlTagClip */
#define GST_TYPE_CMML_TAG_CLIP (gst_cmml_tag_clip_get_type ())
#define GST_CMML_TAG_CLIP(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CMML_TAG_CLIP, GstCmmlTagClip))
#define GST_CMML_TAG_CLIP_CLASS(obj) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CMML_TAG_CLIP, GstCmmlTagClip))
#define GST_CMML_TAG_CLIP_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_CMML_TAG_CLIP, GstCmmlTagClipClass))
typedef struct _GstCmmlTagStream GstCmmlTagStream;
typedef struct _GstCmmlTagStreamClass GstCmmlTagStreamClass;
typedef struct _GstCmmlTagHead GstCmmlTagHead;
typedef struct _GstCmmlTagHeadClass GstCmmlTagHeadClass;
typedef struct _GstCmmlTagClip GstCmmlTagClip;
typedef struct _GstCmmlTagClipClass GstCmmlTagClipClass;
struct _GstCmmlTagStream {
GObject object;
guchar *timebase;
guchar *utc;
GValueArray *imports;
};
struct _GstCmmlTagStreamClass {
GObjectClass parent_class;
};
struct _GstCmmlTagHead {
GObject object;
guchar *title; /* title of the media */
guchar *base;
GValueArray *meta; /* metadata attached to the media.
* The elements are positioned in key-value
* pairs ie (key, content, key2, content2,
* ...)
*/
};
struct _GstCmmlTagHeadClass {
GObjectClass parent_class;
};
struct _GstCmmlTagClip {
GObject object;
gboolean empty; /* empty flag. An empty clip marks the
* end of the previous clip.
*/
guchar *id; /* clip id */
guchar *track; /* clip track */
GstClockTime start_time; /* clip start time */
GstClockTime end_time; /* clip end time */
guchar *anchor_href; /* anchor href URI */
guchar *anchor_text; /* anchor text */
guchar *img_src; /* image URI */
guchar *img_alt; /* image alternative text */
guchar *desc_text; /* clip description */
GValueArray *meta; /* metadata attached to the clip
* The elements are positioned in key-value
* pairs ie (key, content, key2, content2,
* ...)
*/
};
struct _GstCmmlTagClipClass {
GObjectClass parent_class;
};
GType gst_cmml_tag_stream_get_type (void);
GType gst_cmml_tag_head_get_type (void);
GType gst_cmml_tag_clip_get_type (void);
#endif /* __GST_CMML_TAG_H__ */
/*
* gstcmmlutils.c - GStreamer CMML utility functions
* Copyright (C) 2005 Alessandro Decina
*
* Authors:
* Alessandro Decina <alessandro@nnva.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU