Commit 5f042edd authored by Wim Taymans's avatar Wim Taymans

gst/qtdemux/: Add X-QT depayloader that will eventually share code with the demuxer.

Original commit message from CVS:
* gst/qtdemux/Makefile.am:
* gst/qtdemux/gstrtpxqtdepay.c: (gst_rtp_xqt_depay_base_init),
(gst_rtp_xqt_depay_class_init), (gst_rtp_xqt_depay_init),
(gst_rtp_xqt_depay_finalize), (gst_rtp_quicktime_parse_sd),
(gst_rtp_xqt_depay_setcaps), (gst_rtp_xqt_depay_process),
(gst_rtp_xqt_depay_set_property), (gst_rtp_xqt_depay_get_property),
(gst_rtp_xqt_depay_change_state), (gst_rtp_xqt_depay_plugin_init):
* gst/qtdemux/gstrtpxqtdepay.h:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_base_init),
(gst_qtdemux_loop_state_header), (gst_qtdemux_loop),
(qtdemux_parse_moov), (qtdemux_parse_container),
(qtdemux_parse_node), (gst_qtdemux_add_stream),
(qtdemux_parse_trak), (qtdemux_audio_caps):
* gst/qtdemux/qtdemux.h:
* gst/qtdemux/quicktime.c: (plugin_init):
Add X-QT depayloader that will eventually share code with the demuxer.
Make new plugin entry point with quicktime releated stuff.
parent 120d45fd
2007-01-12 Wim Taymans <wim@fluendo.com>
* gst/qtdemux/Makefile.am:
* gst/qtdemux/gstrtpxqtdepay.c: (gst_rtp_xqt_depay_base_init),
(gst_rtp_xqt_depay_class_init), (gst_rtp_xqt_depay_init),
(gst_rtp_xqt_depay_finalize), (gst_rtp_quicktime_parse_sd),
(gst_rtp_xqt_depay_setcaps), (gst_rtp_xqt_depay_process),
(gst_rtp_xqt_depay_set_property), (gst_rtp_xqt_depay_get_property),
(gst_rtp_xqt_depay_change_state), (gst_rtp_xqt_depay_plugin_init):
* gst/qtdemux/gstrtpxqtdepay.h:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_base_init),
(gst_qtdemux_loop_state_header), (gst_qtdemux_loop),
(qtdemux_parse_moov), (qtdemux_parse_container),
(qtdemux_parse_node), (gst_qtdemux_add_stream),
(qtdemux_parse_trak), (qtdemux_audio_caps):
* gst/qtdemux/qtdemux.h:
* gst/qtdemux/quicktime.c: (plugin_init):
Add X-QT depayloader that will eventually share code with the demuxer.
Make new plugin entry point with quicktime releated stuff.
2007-01-12 Tim-Philipp Müller <tim at centricular dot net> 2007-01-12 Tim-Philipp Müller <tim at centricular dot net>
* gst/qtdemux/Makefile.am: * gst/qtdemux/Makefile.am:
......
plugin_LTLIBRARIES = libgstqtdemux.la plugin_LTLIBRARIES = libgstqtdemux.la
libgstqtdemux_la_CFLAGS = ${GST_CFLAGS} libgstqtdemux_la_CFLAGS = ${GST_CFLAGS} $(GST_PLUGINS_BASE_CFLAGS)
libgstqtdemux_la_LIBADD = $(GST_BASE_LIBS) $(ZLIB_LIBS) libgstqtdemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(ZLIB_LIBS) \
-lgstrtp-@GST_MAJORMINOR@
libgstqtdemux_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} libgstqtdemux_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS}
libgstqtdemux_la_SOURCES = qtdemux.c qtdemux_types.c qtdemux_dump.c libgstqtdemux_la_SOURCES = quicktime.c gstrtpxqtdepay.c qtdemux.c qtdemux_types.c qtdemux_dump.c
noinst_HEADERS = \ noinst_HEADERS = \
qtdemux.h \ qtdemux.h \
qtdemux_types.h \ qtdemux_types.h \
qtdemux_dump.h \ qtdemux_dump.h \
qtdemux_fourcc.h \ qtdemux_fourcc.h \
qtpalette.h qtpalette.h \
gstrtpxqtdepay.h
This diff is collapsed.
/* GStreamer
* Copyright (C) <2005> Wim Taymans <wim@fluendo.com>
*
* 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_RTP_XQT_DEPAY_H__
#define __GST_RTP_XQT_DEPAY_H__
#include <gst/gst.h>
#include <gst/base/gstadapter.h>
#include <gst/rtp/gstbasertpdepayload.h>
G_BEGIN_DECLS
#define GST_TYPE_RTP_XQT_DEPAY \
(gst_rtp_xqt_depay_get_type())
#define GST_RTP_XQT_DEPAY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_XQT_DEPAY,GstRtpXQTDepay))
#define GST_RTP_XQT_DEPAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_XQT_DEPAY,GstRtpXQTDepayClass))
#define GST_IS_RTP_XQT_DEPAY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_XQT_DEPAY))
#define GST_IS_RTP_XQT_DEPAY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_XQT_DEPAY))
typedef struct _GstRtpXQTDepay GstRtpXQTDepay;
typedef struct _GstRtpXQTDepayClass GstRtpXQTDepayClass;
struct _GstRtpXQTDepay
{
GstBaseRTPDepayload depayload;
GstAdapter *adapter;
guint16 previous_id;
guint16 current_id;
};
struct _GstRtpXQTDepayClass
{
GstBaseRTPDepayloadClass parent_class;
};
GType gst_rtp_xqt_depay_get_type (void);
G_END_DECLS
#endif /* __GST_RTP_XQT_DEPAY_H__ */
...@@ -233,7 +233,7 @@ static GstCaps *qtdemux_audio_caps (GstQTDemux * qtdemux, ...@@ -233,7 +233,7 @@ static GstCaps *qtdemux_audio_caps (GstQTDemux * qtdemux,
QtDemuxStream * stream, guint32 fourcc, const guint8 * data, int len, QtDemuxStream * stream, guint32 fourcc, const guint8 * data, int len,
const gchar ** codec_name); const gchar ** codec_name);
static GType GType
gst_qtdemux_get_type (void) gst_qtdemux_get_type (void)
{ {
static GType qtdemux_type = 0; static GType qtdemux_type = 0;
...@@ -267,6 +267,7 @@ gst_qtdemux_base_init (GstQTDemuxClass * klass) ...@@ -267,6 +267,7 @@ gst_qtdemux_base_init (GstQTDemuxClass * klass)
gst_static_pad_template_get (&gst_qtdemux_audiosrc_template)); gst_static_pad_template_get (&gst_qtdemux_audiosrc_template));
gst_element_class_set_details (element_class, &gst_qtdemux_details); gst_element_class_set_details (element_class, &gst_qtdemux_details);
GST_DEBUG_CATEGORY_INIT (qtdemux_debug, "qtdemux", 0, "qtdemux plugin");
} }
static void static void
...@@ -3954,23 +3955,3 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, ...@@ -3954,23 +3955,3 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
} }
} }
} }
static gboolean
plugin_init (GstPlugin * plugin)
{
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#endif /* ENABLE_NLS */
GST_DEBUG_CATEGORY_INIT (qtdemux_debug, "qtdemux", 0, "qtdemux plugin");
return gst_element_register (plugin, "qtdemux",
GST_RANK_PRIMARY, GST_TYPE_QTDEMUX);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"qtdemux",
"Quicktime stream demuxer",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
...@@ -91,6 +91,8 @@ struct _GstQTDemuxClass { ...@@ -91,6 +91,8 @@ struct _GstQTDemuxClass {
GstElementClass parent_class; GstElementClass parent_class;
}; };
GType gst_qtdemux_get_type (void);
G_END_DECLS G_END_DECLS
#endif /* __GST_QTDEMUX_H__ */ #endif /* __GST_QTDEMUX_H__ */
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
* Copyright (C) <2006> Wim Taymans <wim@fluendo.com>
*
* 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 "gst/gst-i18n-plugin.h"
#include "qtdemux.h"
#include "gstrtpxqtdepay.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#endif /* ENABLE_NLS */
if (!gst_element_register (plugin, "qtdemux",
GST_RANK_PRIMARY, GST_TYPE_QTDEMUX))
return FALSE;
if (!gst_element_register (plugin, "rtpxqtdepay",
GST_RANK_MARGINAL, GST_TYPE_RTP_XQT_DEPAY))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"quicktime",
"Quicktime support",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment