mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
Move qtdemux to -good.
Original commit message from CVS: * configure.ac: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-bad-plugins-docs.sgml: * docs/plugins/gst-plugins-bad-plugins-sections.txt: * gst/qtdemux/Makefile.am: * gst/qtdemux/gstrtpxqtdepay.c: * gst/qtdemux/gstrtpxqtdepay.h: * gst/qtdemux/qtdemux.c: * gst/qtdemux/qtdemux.h: * gst/qtdemux/qtdemux.vcproj: * gst/qtdemux/qtdemux_dump.c: * gst/qtdemux/qtdemux_dump.h: * gst/qtdemux/qtdemux_fourcc.h: * gst/qtdemux/qtdemux_types.c: * gst/qtdemux/qtdemux_types.h: * gst/qtdemux/qtpalette.h: * gst/qtdemux/quicktime.c: * win32/MANIFEST: * win32/vs6/libgstqtdemux.dsp: Move qtdemux to -good. * gst-plugins-bad.spec.in: Update spec file to reflect wavpack & qtdemux moving to -good.
This commit is contained in:
parent
87d6f6575a
commit
823e63b705
21 changed files with 30 additions and 6208 deletions
26
ChangeLog
26
ChangeLog
|
@ -1,3 +1,29 @@
|
|||
2007-06-12 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* configure.ac:
|
||||
* docs/plugins/Makefile.am:
|
||||
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
|
||||
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
|
||||
* gst/qtdemux/Makefile.am:
|
||||
* gst/qtdemux/gstrtpxqtdepay.c:
|
||||
* gst/qtdemux/gstrtpxqtdepay.h:
|
||||
* gst/qtdemux/qtdemux.c:
|
||||
* gst/qtdemux/qtdemux.h:
|
||||
* gst/qtdemux/qtdemux.vcproj:
|
||||
* gst/qtdemux/qtdemux_dump.c:
|
||||
* gst/qtdemux/qtdemux_dump.h:
|
||||
* gst/qtdemux/qtdemux_fourcc.h:
|
||||
* gst/qtdemux/qtdemux_types.c:
|
||||
* gst/qtdemux/qtdemux_types.h:
|
||||
* gst/qtdemux/qtpalette.h:
|
||||
* gst/qtdemux/quicktime.c:
|
||||
* win32/MANIFEST:
|
||||
* win32/vs6/libgstqtdemux.dsp:
|
||||
Move qtdemux to -good.
|
||||
|
||||
* gst-plugins-bad.spec.in:
|
||||
Update spec file to reflect wavpack & qtdemux moving to -good.
|
||||
|
||||
2007-06-12 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* docs/plugins/Makefile.am:
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -19,7 +19,7 @@ dnl check if this is a release version
|
|||
AS_NANO(GST_CVS="no", GST_CVS="yes")
|
||||
|
||||
dnl can autoconf find the source ?
|
||||
AC_CONFIG_SRCDIR([gst/qtdemux/qtdemux.c])
|
||||
AC_CONFIG_SRCDIR([docs/plugins/gst-plugins-bad-plugins-docs.sgml])
|
||||
|
||||
dnl define the output header for config
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
|
@ -101,7 +101,6 @@ GST_PLUGINS_ALL="\
|
|||
spectrum \
|
||||
speed \
|
||||
switch \
|
||||
qtdemux \
|
||||
tta \
|
||||
videocrop \
|
||||
videoparse \
|
||||
|
@ -885,17 +884,6 @@ AG_GST_CHECK_FEATURE(DVB, [DVB Source], dvb, [
|
|||
AC_CHECK_HEADER(linux/dvb/frontend.h, [HAVE_DVB="yes"], [HAVE_DVB="no"])
|
||||
])
|
||||
|
||||
dnl *** qtdemux prefers to have zlib ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_ZLIB, true)
|
||||
AG_GST_CHECK_FEATURE(ZLIB, [zlib support for qtdemux],, [
|
||||
AG_GST_CHECK_LIBHEADER(ZLIB,
|
||||
z, uncompress,, zlib.h, [
|
||||
HAVE_ZLIB="yes"
|
||||
ZLIB_LIBS="-lz"
|
||||
AC_SUBST(ZLIB_LIBS)
|
||||
])
|
||||
])
|
||||
|
||||
else
|
||||
|
||||
dnl not building plugins with external dependencies,
|
||||
|
@ -935,7 +923,6 @@ AM_CONDITIONAL(USE_X264, false)
|
|||
AM_CONDITIONAL(USE_XVID, false)
|
||||
AM_CONDITIONAL(USE_WILDMIDI, false)
|
||||
AM_CONDITIONAL(USE_DVB, false)
|
||||
AM_CONDITIONAL(USE_ZLIB, false)
|
||||
|
||||
fi dnl of EXT plugins
|
||||
|
||||
|
@ -1011,7 +998,6 @@ gst/rtpmanager/Makefile
|
|||
gst/spectrum/Makefile
|
||||
gst/speed/Makefile
|
||||
gst/switch/Makefile
|
||||
gst/qtdemux/Makefile
|
||||
gst/tta/Makefile
|
||||
gst/videocrop/Makefile
|
||||
gst/videoparse/Makefile
|
||||
|
|
|
@ -95,7 +95,6 @@ EXTRA_HFILES = \
|
|||
$(top_srcdir)/ext/musicbrainz/gsttrm.h \
|
||||
$(top_srcdir)/ext/sdl/sdlaudiosink.h \
|
||||
$(top_srcdir)/ext/sdl/sdlvideosink.h \
|
||||
$(top_srcdir)/gst/qtdemux/qtdemux.h \
|
||||
$(top_srcdir)/gst/replaygain/gstrganalysis.h \
|
||||
$(top_srcdir)/gst/replaygain/gstrglimiter.h \
|
||||
$(top_srcdir)/gst/replaygain/gstrgvolume.h \
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<title>gst-plugins-bad Elements</title>
|
||||
<xi:include href="xml/element-dfbvideosink.xml" />
|
||||
<xi:include href="xml/element-jackaudiosink.xml" />
|
||||
<xi:include href="xml/element-qtdemux.xml" />
|
||||
<xi:include href="xml/element-osxvideosink.xml" />
|
||||
<xi:include href="xml/element-rganalysis.xml" />
|
||||
<xi:include href="xml/element-rglimiter.xml" />
|
||||
|
@ -50,7 +49,6 @@
|
|||
<xi:include href="xml/plugin-musicbrainz.xml" />
|
||||
<xi:include href="xml/plugin-neon.xml" />
|
||||
<xi:include href="xml/plugin-osxvideo.xml" />
|
||||
<xi:include href="xml/plugin-qtdemux.xml" />
|
||||
<xi:include href="xml/plugin-replaygain.xml" />
|
||||
<xi:include href="xml/plugin-gstrtpmanager.xml" />
|
||||
<xi:include href="xml/plugin-sdl.xml" />
|
||||
|
|
|
@ -15,14 +15,6 @@ GstJackConnect
|
|||
GstJackAudioSinkClass
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>element-qtdemux</FILE>
|
||||
GstQTDemux
|
||||
<TITLE>qtdemux</TITLE>
|
||||
<SUBSECTION Standard>
|
||||
GstQTDemuxClass
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>element-osxvideosink</FILE>
|
||||
GstOSXVideoSink
|
||||
|
|
|
@ -81,7 +81,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%doc AUTHORS COPYING README REQUIREMENTS gst-plugins-bad.doap
|
||||
|
||||
# non-core plugins without external dependencies
|
||||
%{_libdir}/gstreamer-%{majorminor}/libgstqtdemux.so
|
||||
%{_libdir}/gstreamer-%{majorminor}/libgsttta.so
|
||||
%{_libdir}/gstreamer-%{majorminor}/libgstspeed.so
|
||||
%{_libdir}/gstreamer-%{majorminor}/libgstcdxaparse.so
|
||||
|
@ -130,7 +129,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||
@USE_LIBMMS_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmms.so
|
||||
@USE_XVID_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstxvid.so
|
||||
@USE_BZ2_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstbz2.so
|
||||
@USE_WAVPACK_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstwavpack.so
|
||||
@USE_IVORBIS_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstivorbis.so
|
||||
@USE_NEON_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstneonhttpsrc.so
|
||||
@USE_ALSA_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstalsaspdif.so
|
||||
|
@ -142,6 +140,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||
@USE_X264_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstx264.so
|
||||
|
||||
%changelog
|
||||
* Tue Jun 12 2007 Jan Schmidt <jan at fluendo dot com>
|
||||
- wavpack and qtdemux have moved to good.
|
||||
|
||||
* Thu Mar 22 2007 Christian Schaller <christian at fluendo dot com>
|
||||
- Add x264 and mpegvideoparse plugins
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
plugin_LTLIBRARIES = libgstqtdemux.la
|
||||
|
||||
libgstqtdemux_la_CFLAGS = ${GST_CFLAGS} $(GST_PLUGINS_BASE_CFLAGS)
|
||||
libgstqtdemux_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(ZLIB_LIBS) \
|
||||
-lgstrtp-@GST_MAJORMINOR@
|
||||
libgstqtdemux_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS}
|
||||
libgstqtdemux_la_SOURCES = quicktime.c gstrtpxqtdepay.c qtdemux.c qtdemux_types.c qtdemux_dump.c
|
||||
|
||||
noinst_HEADERS = \
|
||||
qtdemux.h \
|
||||
qtdemux_types.h \
|
||||
qtdemux_dump.h \
|
||||
qtdemux_fourcc.h \
|
||||
qtpalette.h \
|
||||
gstrtpxqtdepay.h
|
|
@ -1,735 +0,0 @@
|
|||
/* GStreamer
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* based on http://developer.apple.com/quicktime/icefloe/dispatch026.html
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <gst/rtp/gstrtpbuffer.h>
|
||||
|
||||
#include <string.h>
|
||||
#include "gstrtpxqtdepay.h"
|
||||
|
||||
#define MAKE_TLV(a,b) (((a)<<8)|(b))
|
||||
|
||||
#define TLV_sd MAKE_TLV ('s','d')
|
||||
#define TLV_qt MAKE_TLV ('q','t')
|
||||
#define TLV_ti MAKE_TLV ('t','i')
|
||||
#define TLV_ly MAKE_TLV ('l','y')
|
||||
#define TLV_vo MAKE_TLV ('v','o')
|
||||
#define TLV_mx MAKE_TLV ('m','x')
|
||||
#define TLV_tr MAKE_TLV ('t','r')
|
||||
#define TLV_tw MAKE_TLV ('t','w')
|
||||
#define TLV_th MAKE_TLV ('t','h')
|
||||
#define TLV_la MAKE_TLV ('l','a')
|
||||
#define TLV_rt MAKE_TLV ('r','t')
|
||||
#define TLV_gm MAKE_TLV ('g','m')
|
||||
#define TLV_oc MAKE_TLV ('o','c')
|
||||
#define TLV_cr MAKE_TLV ('c','r')
|
||||
#define TLV_du MAKE_TLV ('d','u')
|
||||
#define TLV_po MAKE_TLV ('p','o')
|
||||
|
||||
#define QT_UINT32(a) (GST_READ_UINT32_BE(a))
|
||||
#define QT_UINT24(a) (GST_READ_UINT32_BE(a) >> 8)
|
||||
#define QT_UINT16(a) (GST_READ_UINT16_BE(a))
|
||||
#define QT_UINT8(a) (GST_READ_UINT8(a))
|
||||
#define QT_FP32(a) ((GST_READ_UINT32_BE(a))/65536.0)
|
||||
#define QT_FP16(a) ((GST_READ_UINT16_BE(a))/256.0)
|
||||
#define QT_FOURCC(a) (GST_READ_UINT32_LE(a))
|
||||
#define QT_UINT64(a) ((((guint64)QT_UINT32(a))<<32)|QT_UINT32(((guint8 *)a)+4))
|
||||
|
||||
#define FOURCC_avc1 GST_MAKE_FOURCC('a','v','c','1')
|
||||
#define FOURCC_avcC GST_MAKE_FOURCC('a','v','c','C')
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (rtpxqtdepay_debug);
|
||||
#define GST_CAT_DEFAULT (rtpxqtdepay_debug)
|
||||
|
||||
/* elementfactory information */
|
||||
static const GstElementDetails gst_rtp_xqtdepay_details =
|
||||
GST_ELEMENT_DETAILS ("RTP packet depayloader",
|
||||
"Codec/Depayloader/Network",
|
||||
"Extracts Quicktime audio/video from RTP packets",
|
||||
"Wim Taymans <wim@fluendo.com>");
|
||||
|
||||
/* RtpXQTDepay signals and args */
|
||||
enum
|
||||
{
|
||||
/* FILL ME */
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ARG_0,
|
||||
};
|
||||
|
||||
static GstStaticPadTemplate gst_rtp_xqt_depay_src_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate gst_rtp_xqt_depay_sink_template =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("application/x-rtp, "
|
||||
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
|
||||
"media = (string) { \"audio\", \"video\" }, clock-rate = (int) [1, MAX], "
|
||||
"encoding-name = (string) { \"X-QT\", \"X-QUICKTIME\" }")
|
||||
);
|
||||
|
||||
GST_BOILERPLATE (GstRtpXQTDepay, gst_rtp_xqt_depay, GstBaseRTPDepayload,
|
||||
GST_TYPE_BASE_RTP_DEPAYLOAD);
|
||||
|
||||
static void gst_rtp_xqt_depay_finalize (GObject * object);
|
||||
|
||||
static gboolean gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload,
|
||||
GstCaps * caps);
|
||||
static GstBuffer *gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload,
|
||||
GstBuffer * buf);
|
||||
|
||||
static void gst_rtp_xqt_depay_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
static void gst_rtp_xqt_depay_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstStateChangeReturn gst_rtp_xqt_depay_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
|
||||
static void
|
||||
gst_rtp_xqt_depay_base_init (gpointer klass)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_rtp_xqt_depay_src_template));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&gst_rtp_xqt_depay_sink_template));
|
||||
|
||||
gst_element_class_set_details (element_class, &gst_rtp_xqtdepay_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_xqt_depay_class_init (GstRtpXQTDepayClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
GstBaseRTPDepayloadClass *gstbasertpdepayload_class;
|
||||
|
||||
gobject_class = (GObjectClass *) klass;
|
||||
gstelement_class = (GstElementClass *) klass;
|
||||
gstbasertpdepayload_class = (GstBaseRTPDepayloadClass *) klass;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gobject_class->finalize = gst_rtp_xqt_depay_finalize;
|
||||
|
||||
gobject_class->set_property = gst_rtp_xqt_depay_set_property;
|
||||
gobject_class->get_property = gst_rtp_xqt_depay_get_property;
|
||||
|
||||
gstelement_class->change_state = gst_rtp_xqt_depay_change_state;
|
||||
|
||||
gstbasertpdepayload_class->set_caps = gst_rtp_xqt_depay_setcaps;
|
||||
gstbasertpdepayload_class->process = gst_rtp_xqt_depay_process;
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (rtpxqtdepay_debug, "rtpxqtdepay", 0,
|
||||
"QT Media RTP Depayloader");
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_xqt_depay_init (GstRtpXQTDepay * rtpxqtdepay,
|
||||
GstRtpXQTDepayClass * klass)
|
||||
{
|
||||
rtpxqtdepay->adapter = gst_adapter_new ();
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_xqt_depay_finalize (GObject * object)
|
||||
{
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (object);
|
||||
|
||||
g_object_unref (rtpxqtdepay->adapter);
|
||||
rtpxqtdepay->adapter = NULL;
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_quicktime_parse_sd (GstRtpXQTDepay * rtpxqtdepay, guint8 * data,
|
||||
guint data_len)
|
||||
{
|
||||
gint len;
|
||||
guint32 fourcc;
|
||||
|
||||
if (data_len < 8)
|
||||
goto too_short;
|
||||
|
||||
len = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
|
||||
if (len > data_len)
|
||||
goto too_short;
|
||||
|
||||
fourcc = QT_FOURCC (data + 4);
|
||||
|
||||
GST_DEBUG_OBJECT (rtpxqtdepay, "parsing %" GST_FOURCC_FORMAT,
|
||||
GST_FOURCC_ARGS (fourcc));
|
||||
|
||||
switch (fourcc) {
|
||||
case FOURCC_avc1:
|
||||
{
|
||||
guint32 chlen;
|
||||
|
||||
if (len < 0x56)
|
||||
goto too_short;
|
||||
len -= 0x56;
|
||||
data += 0x56;
|
||||
|
||||
/* find avcC */
|
||||
while (len >= 8) {
|
||||
chlen = QT_UINT32 (data);
|
||||
fourcc = QT_FOURCC (data + 4);
|
||||
if (fourcc == FOURCC_avcC) {
|
||||
GstBuffer *buf;
|
||||
gint size;
|
||||
GstCaps *caps;
|
||||
|
||||
GST_DEBUG_OBJECT (rtpxqtdepay, "found avcC codec_data in sd, %u",
|
||||
chlen);
|
||||
|
||||
/* parse, if found */
|
||||
if (chlen < len)
|
||||
size = chlen - 8;
|
||||
else
|
||||
size = len - 8;
|
||||
|
||||
buf = gst_buffer_new_and_alloc (size);
|
||||
memcpy (GST_BUFFER_DATA (buf), data + 8, size);
|
||||
caps = gst_caps_new_simple ("video/x-h264",
|
||||
"codec_data", GST_TYPE_BUFFER, buf, NULL);
|
||||
gst_buffer_unref (buf);
|
||||
gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD (rtpxqtdepay)->srcpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
break;
|
||||
}
|
||||
len -= chlen;
|
||||
data += chlen;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
/* ERRORS */
|
||||
too_short:
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
gint clock_rate = 90000; /* default */
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
gst_structure_get_int (structure, "clock-rate", &clock_rate);
|
||||
depayload->clock_rate = clock_rate;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GstBuffer *
|
||||
gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
GstBuffer *outbuf;
|
||||
gboolean m;
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (depayload);
|
||||
|
||||
if (!gst_rtp_buffer_validate (buf))
|
||||
goto bad_packet;
|
||||
|
||||
if (GST_BUFFER_IS_DISCONT (buf)) {
|
||||
/* discont, clear adapter and try to find a new packet start */
|
||||
gst_adapter_clear (rtpxqtdepay->adapter);
|
||||
rtpxqtdepay->need_resync = TRUE;
|
||||
}
|
||||
|
||||
m = gst_rtp_buffer_get_marker (buf);
|
||||
GST_LOG_OBJECT (rtpxqtdepay, "marker: %d", m);
|
||||
|
||||
{
|
||||
gint payload_len;
|
||||
guint avail;
|
||||
guint8 *payload;
|
||||
guint32 timestamp;
|
||||
guint8 ver, pck;
|
||||
gboolean s, q, l, d;
|
||||
|
||||
payload_len = gst_rtp_buffer_get_payload_len (buf);
|
||||
payload = gst_rtp_buffer_get_payload (buf);
|
||||
|
||||
/* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | VER |PCK|S|Q|L| RES |D| QuickTime Payload ID |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
if (payload_len <= 4)
|
||||
goto wrong_length;
|
||||
|
||||
ver = (payload[0] & 0xf0) >> 4;
|
||||
if (ver > 1)
|
||||
goto wrong_version;
|
||||
|
||||
pck = (payload[0] & 0x0c) >> 2;
|
||||
if (pck == 0)
|
||||
goto pck_reserved;
|
||||
|
||||
s = (payload[0] & 0x02) != 0; /* contains sync sample */
|
||||
q = (payload[0] & 0x01) != 0; /* has payload description */
|
||||
l = (payload[1] & 0x80) != 0; /* has packet specific information description */
|
||||
d = (payload[2] & 0x80) != 0; /* don't cache info for payload id */
|
||||
/* id used for caching info */
|
||||
rtpxqtdepay->current_id = ((payload[2] & 0x7f) << 8) | payload[3];
|
||||
|
||||
GST_LOG_OBJECT (rtpxqtdepay,
|
||||
"VER: %d, PCK: %d, S: %d, Q: %d, L: %d, D: %d, ID: %d", ver, pck, s, q,
|
||||
l, d, rtpxqtdepay->current_id);
|
||||
|
||||
if (rtpxqtdepay->need_resync) {
|
||||
/* we need to find the boundary of a new packet after a DISCONT */
|
||||
if (pck != 3 || q) {
|
||||
/* non-fragmented packet or payload description present, packet starts
|
||||
* here. */
|
||||
rtpxqtdepay->need_resync = FALSE;
|
||||
} else {
|
||||
/* fragmented packet without description */
|
||||
if (m) {
|
||||
/* marker bit set, next packet is start of new one */
|
||||
rtpxqtdepay->need_resync = FALSE;
|
||||
}
|
||||
goto need_resync;
|
||||
}
|
||||
}
|
||||
|
||||
payload += 4;
|
||||
payload_len -= 4;
|
||||
|
||||
if (q) {
|
||||
gboolean k, f, a, z;
|
||||
guint pdlen, pdpadded;
|
||||
gint padding;
|
||||
guint32 media_type, timescale;
|
||||
|
||||
/* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* |K|F|A|Z| RES | QuickTime Payload Desc Length |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . QuickTime Payload Desc Data ... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
if (payload_len <= 4)
|
||||
goto wrong_length;
|
||||
|
||||
k = (payload[0] & 0x80) != 0; /* keyframe */
|
||||
f = (payload[0] & 0x40) != 0; /* sparse */
|
||||
a = (payload[0] & 0x20) != 0; /* start of payload */
|
||||
z = (payload[0] & 0x10) != 0; /* end of payload */
|
||||
pdlen = (payload[2] << 8) | payload[3];
|
||||
|
||||
if (pdlen < 12)
|
||||
goto wrong_length;
|
||||
|
||||
/* calc padding */
|
||||
pdpadded = pdlen + 3;
|
||||
pdpadded -= pdpadded % 4;
|
||||
if (payload_len < pdpadded)
|
||||
goto wrong_length;
|
||||
|
||||
padding = pdpadded - pdlen;
|
||||
GST_LOG_OBJECT (rtpxqtdepay,
|
||||
"K: %d, F: %d, A: %d, Z: %d, len: %d, padding %d", k, f, a, z, pdlen,
|
||||
padding);
|
||||
|
||||
payload += 4;
|
||||
payload_len -= 4;
|
||||
/* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | QuickTime Media Type |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Timescale |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . QuickTime TLVs ... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
media_type =
|
||||
(payload[0] << 24) | (payload[1] << 16) | (payload[2] << 8) |
|
||||
payload[3];
|
||||
timescale =
|
||||
(payload[4] << 24) | (payload[5] << 16) | (payload[6] << 8) |
|
||||
payload[7];
|
||||
|
||||
GST_LOG_OBJECT (rtpxqtdepay, "media_type: %c%c%c%c, timescale %u",
|
||||
payload[0], payload[1], payload[2], payload[3], timescale);
|
||||
|
||||
payload += 8;
|
||||
payload_len -= 8;
|
||||
pdlen -= 12;
|
||||
|
||||
/* parse TLV (type-length-value triplets */
|
||||
while (pdlen > 3) {
|
||||
guint16 tlv_len, tlv_type;
|
||||
|
||||
/* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | QuickTime TLV Length | QuickTime TLV Type |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . QuickTime TLV Value ... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
tlv_len = (payload[0] << 8) | payload[1];
|
||||
tlv_type = (payload[2] << 8) | payload[3];
|
||||
pdlen -= 4;
|
||||
if (tlv_len > pdlen)
|
||||
goto wrong_length;
|
||||
|
||||
GST_LOG_OBJECT (rtpxqtdepay, "TLV '%c%c', len %d", payload[2],
|
||||
payload[3], tlv_len);
|
||||
|
||||
payload += 4;
|
||||
payload_len -= 4;
|
||||
|
||||
switch (tlv_type) {
|
||||
case TLV_sd:
|
||||
/* Session description */
|
||||
gst_rtp_quicktime_parse_sd (rtpxqtdepay, payload, tlv_len);
|
||||
break;
|
||||
case TLV_qt:
|
||||
case TLV_ti:
|
||||
case TLV_ly:
|
||||
case TLV_vo:
|
||||
case TLV_mx:
|
||||
case TLV_tr:
|
||||
case TLV_tw:
|
||||
case TLV_th:
|
||||
case TLV_la:
|
||||
case TLV_rt:
|
||||
case TLV_gm:
|
||||
case TLV_oc:
|
||||
case TLV_cr:
|
||||
case TLV_du:
|
||||
case TLV_po:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
pdlen -= tlv_len;
|
||||
payload += tlv_len;
|
||||
payload_len -= tlv_len;
|
||||
}
|
||||
payload += padding;
|
||||
payload_len -= padding;
|
||||
}
|
||||
|
||||
if (l) {
|
||||
guint ssilen, ssipadded;
|
||||
gint padding;
|
||||
|
||||
/* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | RES | Sample-Specific Info Length |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . QuickTime TLVs ...
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
if (payload_len <= 4)
|
||||
goto wrong_length;
|
||||
|
||||
ssilen = (payload[2] << 8) | payload[3];
|
||||
if (ssilen < 4)
|
||||
goto wrong_length;
|
||||
|
||||
/* calc padding */
|
||||
ssipadded = ssilen + 3;
|
||||
ssipadded -= ssipadded % 4;
|
||||
if (payload_len < ssipadded)
|
||||
goto wrong_length;
|
||||
|
||||
padding = ssipadded - ssilen;
|
||||
GST_LOG_OBJECT (rtpxqtdepay, "len: %d, padding %d", ssilen, padding);
|
||||
|
||||
payload += 4;
|
||||
payload_len -= 4;
|
||||
ssilen -= 4;
|
||||
|
||||
/* parse TLV (type-length-value triplets */
|
||||
while (ssilen > 3) {
|
||||
guint16 tlv_len, tlv_type;
|
||||
|
||||
/* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | QuickTime TLV Length | QuickTime TLV Type |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . QuickTime TLV Value ... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
tlv_len = (payload[0] << 8) | payload[1];
|
||||
tlv_type = (payload[2] << 8) | payload[3];
|
||||
ssilen -= 4;
|
||||
if (tlv_len > ssilen)
|
||||
goto wrong_length;
|
||||
|
||||
GST_LOG_OBJECT (rtpxqtdepay, "TLV '%c%c', len %d", payload[2],
|
||||
payload[3], tlv_len);
|
||||
|
||||
payload += 4;
|
||||
payload_len -= 4;
|
||||
|
||||
switch (tlv_type) {
|
||||
case TLV_sd:
|
||||
case TLV_qt:
|
||||
case TLV_ti:
|
||||
case TLV_ly:
|
||||
case TLV_vo:
|
||||
case TLV_mx:
|
||||
case TLV_tr:
|
||||
case TLV_tw:
|
||||
case TLV_th:
|
||||
case TLV_la:
|
||||
case TLV_rt:
|
||||
case TLV_gm:
|
||||
case TLV_oc:
|
||||
case TLV_cr:
|
||||
case TLV_du:
|
||||
case TLV_po:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ssilen -= tlv_len;
|
||||
payload += tlv_len;
|
||||
payload_len -= tlv_len;
|
||||
}
|
||||
payload += padding;
|
||||
payload_len -= padding;
|
||||
}
|
||||
|
||||
timestamp = gst_rtp_buffer_get_timestamp (buf);
|
||||
rtpxqtdepay->previous_id = rtpxqtdepay->current_id;
|
||||
|
||||
switch (pck) {
|
||||
case 1:
|
||||
{
|
||||
/* multiple samples per packet. */
|
||||
outbuf = gst_buffer_new_and_alloc (payload_len);
|
||||
memcpy (GST_BUFFER_DATA (outbuf), payload, payload_len);
|
||||
return outbuf;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
guint slen, timestamp;
|
||||
|
||||
/* multiple samples per packet.
|
||||
* 1 2 3
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* |S| Reserved | Sample Length |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Sample Timestamp |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . Sample Data ... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* |S| Reserved | Sample Length |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* | Sample Timestamp |
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . Sample Data ... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
* . ...... .
|
||||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
*/
|
||||
while (payload_len > 8) {
|
||||
s = (payload[0] & 0x80) != 0; /* contains sync sample */
|
||||
slen = (payload[2] << 8) | payload[3];
|
||||
timestamp =
|
||||
(payload[4] << 24) | (payload[5] << 16) | (payload[6] << 8) |
|
||||
payload[7];
|
||||
|
||||
payload += 8;
|
||||
payload_len -= 8;
|
||||
|
||||
if (slen > payload_len)
|
||||
slen = payload_len;
|
||||
|
||||
outbuf = gst_buffer_new_and_alloc (slen);
|
||||
memcpy (GST_BUFFER_DATA (outbuf), payload, slen);
|
||||
if (!s)
|
||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
|
||||
gst_base_rtp_depayload_push (depayload, outbuf);
|
||||
|
||||
/* aligned on 32 bit boundary */
|
||||
slen = GST_ROUND_UP_4 (slen);
|
||||
|
||||
payload += slen;
|
||||
payload_len -= slen;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
/* one sample per packet, use adapter to combine based on marker bit. */
|
||||
outbuf = gst_buffer_new_and_alloc (payload_len);
|
||||
memcpy (GST_BUFFER_DATA (outbuf), payload, payload_len);
|
||||
|
||||
gst_adapter_push (rtpxqtdepay->adapter, outbuf);
|
||||
|
||||
if (!m)
|
||||
goto done;
|
||||
|
||||
avail = gst_adapter_available (rtpxqtdepay->adapter);
|
||||
outbuf = gst_adapter_take_buffer (rtpxqtdepay->adapter, avail);
|
||||
|
||||
GST_DEBUG_OBJECT (rtpxqtdepay,
|
||||
"gst_rtp_xqt_depay_chain: pushing buffer of size %u", avail);
|
||||
|
||||
return outbuf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
return NULL;
|
||||
|
||||
bad_packet:
|
||||
{
|
||||
GST_ELEMENT_WARNING (rtpxqtdepay, STREAM, DECODE,
|
||||
("Packet did not validate."), (NULL));
|
||||
return NULL;
|
||||
}
|
||||
need_resync:
|
||||
{
|
||||
GST_DEBUG_OBJECT (rtpxqtdepay, "waiting for marker");
|
||||
return NULL;
|
||||
}
|
||||
wrong_version:
|
||||
{
|
||||
GST_ELEMENT_WARNING (rtpxqtdepay, STREAM, DECODE,
|
||||
("Unknown payload version."), (NULL));
|
||||
return NULL;
|
||||
}
|
||||
pck_reserved:
|
||||
{
|
||||
GST_ELEMENT_WARNING (rtpxqtdepay, STREAM, DECODE,
|
||||
("PCK reserved 0."), (NULL));
|
||||
return NULL;
|
||||
}
|
||||
wrong_length:
|
||||
{
|
||||
GST_ELEMENT_WARNING (rtpxqtdepay, STREAM, DECODE,
|
||||
("Wrong payload length."), (NULL));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_xqt_depay_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (object);
|
||||
|
||||
switch (prop_id) {
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtp_xqt_depay_get_property (GObject * object, guint prop_id, GValue * value,
|
||||
GParamSpec * pspec)
|
||||
{
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (object);
|
||||
|
||||
switch (prop_id) {
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
gst_rtp_xqt_depay_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
GstStateChangeReturn ret;
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (element);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
gst_adapter_clear (rtpxqtdepay->adapter);
|
||||
rtpxqtdepay->previous_id = -1;
|
||||
rtpxqtdepay->current_id = -1;
|
||||
rtpxqtdepay->need_resync = FALSE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_adapter_clear (rtpxqtdepay->adapter);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_rtp_xqt_depay_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rtpxqtdepay",
|
||||
GST_RANK_MARGINAL, GST_TYPE_RTP_XQT_DEPAY);
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
/* 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;
|
||||
|
||||
gboolean need_resync;
|
||||
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__ */
|
File diff suppressed because it is too large
Load diff
|
@ -1,101 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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_QTDEMUX_H__
|
||||
#define __GST_QTDEMUX_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/gstadapter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (qtdemux_debug);
|
||||
#define GST_CAT_DEFAULT qtdemux_debug
|
||||
|
||||
#define GST_TYPE_QTDEMUX \
|
||||
(gst_qtdemux_get_type())
|
||||
#define GST_QTDEMUX(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QTDEMUX,GstQTDemux))
|
||||
#define GST_QTDEMUX_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QTDEMUX,GstQTDemuxClass))
|
||||
#define GST_IS_QTDEMUX(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QTDEMUX))
|
||||
#define GST_IS_QTDEMUX_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QTDEMUX))
|
||||
|
||||
#define GST_QTDEMUX_CAST(obj) ((GstQTDemux *)(obj))
|
||||
|
||||
#define GST_QTDEMUX_MAX_STREAMS 8
|
||||
|
||||
typedef struct _GstQTDemux GstQTDemux;
|
||||
typedef struct _GstQTDemuxClass GstQTDemuxClass;
|
||||
typedef struct _QtDemuxStream QtDemuxStream;
|
||||
|
||||
struct _GstQTDemux {
|
||||
GstElement element;
|
||||
|
||||
/* pads */
|
||||
GstPad *sinkpad;
|
||||
|
||||
QtDemuxStream *streams[GST_QTDEMUX_MAX_STREAMS];
|
||||
gint n_streams;
|
||||
gint n_video_streams;
|
||||
gint n_audio_streams;
|
||||
|
||||
GNode *moov_node;
|
||||
GNode *moov_node_compressed;
|
||||
|
||||
guint32 timescale;
|
||||
guint32 duration;
|
||||
|
||||
gint state;
|
||||
|
||||
gboolean pullbased;
|
||||
|
||||
/* push based variables */
|
||||
guint neededbytes;
|
||||
guint todrop;
|
||||
GstAdapter *adapter;
|
||||
GstBuffer *mdatbuffer;
|
||||
|
||||
/* offset of the media data (i.e.: Size of header) */
|
||||
guint64 offset;
|
||||
/* offset of the mdat atom */
|
||||
guint64 mdatoffset;
|
||||
|
||||
GstTagList *tag_list;
|
||||
|
||||
/* track stuff */
|
||||
guint64 last_ts;
|
||||
|
||||
/* configured playback region */
|
||||
GstSegment segment;
|
||||
gboolean segment_running;
|
||||
};
|
||||
|
||||
struct _GstQTDemuxClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_qtdemux_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QTDEMUX_H__ */
|
|
@ -1,148 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="qtdemux"
|
||||
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D678C4}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../../win32/Debug"
|
||||
IntermediateDirectory="../../win32/Debug"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../../gstreamer/win32;../../../gstreamer;../../../gstreamer/libs;../../../glib;../../../glib/glib;../../../glib/gmodule;"../../gst-libs";../../../popt/include;../../../libxml2/include/libxml2"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;qtdemux_EXPORTS;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
||||
OutputFile="$(OutDir)/gstqtdemux.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../../../gstreamer/win32/Debug;../../../glib/glib;../../../glib/gmodule;../../../glib/gthread;../../../glib/gobject;../../../gettext/lib;../../../libiconv/lib"
|
||||
ModuleDefinitionFile=""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/qtdemux.pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
ImportLibrary="$(OutDir)/gstqtdemux.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../../win32/Release"
|
||||
IntermediateDirectory="../../win32/Release"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../../gstreamer/win32;../../../gstreamer;../../../gstreamer/libs;../../../glib;../../../glib/glib;../../../glib/gmodule;"../../gst-libs";../../../popt/include;../../../libxml2/include/libxml2"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;qtdemux_EXPORTS;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
||||
OutputFile="$(OutDir)/gstqtdemux.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../../../gstreamer/win32/Release;../../../glib/glib;../../../glib/gmodule;../../../glib/gthread;../../../glib/gobject;../../../gettext/lib;../../../libiconv/lib"
|
||||
ModuleDefinitionFile=""
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/gstqtdemux.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\qtdemux.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\qtdemux.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,417 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "qtdemux_types.h"
|
||||
#include "qtdemux_dump.h"
|
||||
|
||||
#if 0
|
||||
#define qtdemux_dump_mem(a,b) gst_util_dump_mem(a,b)
|
||||
#else
|
||||
#define qtdemux_dump_mem(a,b) /* */
|
||||
#endif
|
||||
|
||||
void
|
||||
qtdemux_dump_mvhd (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s creation time: %u", depth, "", QT_UINT32 (buffer + 12));
|
||||
GST_LOG ("%*s modify time: %u", depth, "", QT_UINT32 (buffer + 16));
|
||||
GST_LOG ("%*s time scale: 1/%u sec", depth, "", QT_UINT32 (buffer + 20));
|
||||
GST_LOG ("%*s duration: %u", depth, "", QT_UINT32 (buffer + 24));
|
||||
GST_LOG ("%*s pref. rate: %g", depth, "", QT_FP32 (buffer + 28));
|
||||
GST_LOG ("%*s pref. volume: %g", depth, "", QT_FP16 (buffer + 32));
|
||||
GST_LOG ("%*s preview time: %u", depth, "", QT_UINT32 (buffer + 80));
|
||||
GST_LOG ("%*s preview dur.: %u", depth, "", QT_UINT32 (buffer + 84));
|
||||
GST_LOG ("%*s poster time: %u", depth, "", QT_UINT32 (buffer + 88));
|
||||
GST_LOG ("%*s select time: %u", depth, "", QT_UINT32 (buffer + 92));
|
||||
GST_LOG ("%*s select dur.: %u", depth, "", QT_UINT32 (buffer + 96));
|
||||
GST_LOG ("%*s current time: %u", depth, "", QT_UINT32 (buffer + 100));
|
||||
GST_LOG ("%*s next track ID: %d", depth, "", QT_UINT32 (buffer + 104));
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_tkhd (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s creation time: %u", depth, "", QT_UINT32 (buffer + 12));
|
||||
GST_LOG ("%*s modify time: %u", depth, "", QT_UINT32 (buffer + 16));
|
||||
GST_LOG ("%*s track ID: %u", depth, "", QT_UINT32 (buffer + 20));
|
||||
GST_LOG ("%*s duration: %u", depth, "", QT_UINT32 (buffer + 28));
|
||||
GST_LOG ("%*s layer: %u", depth, "", QT_UINT16 (buffer + 36));
|
||||
GST_LOG ("%*s alt group: %u", depth, "", QT_UINT16 (buffer + 38));
|
||||
GST_LOG ("%*s volume: %g", depth, "", QT_FP16 (buffer + 44));
|
||||
GST_LOG ("%*s track width: %g", depth, "", QT_FP32 (buffer + 84));
|
||||
GST_LOG ("%*s track height: %g", depth, "", QT_FP32 (buffer + 88));
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_elst (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %u", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s track dur: %u", depth, "",
|
||||
QT_UINT32 (buffer + 16 + i * 12));
|
||||
GST_LOG ("%*s media time: %u", depth, "",
|
||||
QT_UINT32 (buffer + 20 + i * 12));
|
||||
GST_LOG ("%*s media rate: %g", depth, "",
|
||||
QT_FP32 (buffer + 24 + i * 12));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_mdhd (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
guint32 version;
|
||||
guint64 duration, ctime, mtime;
|
||||
guint32 time_scale;
|
||||
guint16 language, quality;
|
||||
|
||||
version = QT_UINT32 (buffer + 8);
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", version);
|
||||
|
||||
if (version == 0x01000000) {
|
||||
ctime = QT_UINT64 (buffer + 12);
|
||||
mtime = QT_UINT64 (buffer + 20);
|
||||
time_scale = QT_UINT32 (buffer + 28);
|
||||
duration = QT_UINT64 (buffer + 32);
|
||||
language = QT_UINT16 (buffer + 40);
|
||||
quality = QT_UINT16 (buffer + 42);
|
||||
} else {
|
||||
ctime = QT_UINT32 (buffer + 12);
|
||||
mtime = QT_UINT32 (buffer + 16);
|
||||
time_scale = QT_UINT32 (buffer + 20);
|
||||
duration = QT_UINT32 (buffer + 24);
|
||||
language = QT_UINT16 (buffer + 28);
|
||||
quality = QT_UINT16 (buffer + 30);
|
||||
}
|
||||
|
||||
GST_LOG ("%*s creation time: %" G_GUINT64_FORMAT, depth, "", ctime);
|
||||
GST_LOG ("%*s modify time: %" G_GUINT64_FORMAT, depth, "", mtime);
|
||||
GST_LOG ("%*s time scale: 1/%u sec", depth, "", time_scale);
|
||||
GST_LOG ("%*s duration: %" G_GUINT64_FORMAT, depth, "", duration);
|
||||
GST_LOG ("%*s language: %u", depth, "", language);
|
||||
GST_LOG ("%*s quality: %u", depth, "", quality);
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_hdlr (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s type: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + 12)));
|
||||
GST_LOG ("%*s subtype: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + 16)));
|
||||
GST_LOG ("%*s manufacturer: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + 20)));
|
||||
GST_LOG ("%*s flags: %08x", depth, "", QT_UINT32 (buffer + 24));
|
||||
GST_LOG ("%*s flags mask: %08x", depth, "", QT_UINT32 (buffer + 28));
|
||||
GST_LOG ("%*s name: %*s", depth, "",
|
||||
QT_UINT8 (buffer + 32), (char *) (buffer + 33));
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_vmhd (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s mode/color: %08x", depth, "", QT_UINT32 (buffer + 16));
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_dref (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int n;
|
||||
int i;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %u", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s size: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
GST_LOG ("%*s type: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + offset + 4)));
|
||||
offset += QT_UINT32 (buffer + offset);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_stsd (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %d", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s size: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
GST_LOG ("%*s type: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + offset + 4)));
|
||||
GST_LOG ("%*s data reference:%d", depth, "",
|
||||
QT_UINT16 (buffer + offset + 14));
|
||||
|
||||
GST_LOG ("%*s version/rev.: %08x", depth, "",
|
||||
QT_UINT32 (buffer + offset + 16));
|
||||
GST_LOG ("%*s vendor: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + offset + 20)));
|
||||
GST_LOG ("%*s temporal qual: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset + 24));
|
||||
GST_LOG ("%*s spatial qual: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset + 28));
|
||||
GST_LOG ("%*s width: %u", depth, "",
|
||||
QT_UINT16 (buffer + offset + 32));
|
||||
GST_LOG ("%*s height: %u", depth, "",
|
||||
QT_UINT16 (buffer + offset + 34));
|
||||
GST_LOG ("%*s horiz. resol: %g", depth, "",
|
||||
QT_FP32 (buffer + offset + 36));
|
||||
GST_LOG ("%*s vert. resol.: %g", depth, "",
|
||||
QT_FP32 (buffer + offset + 40));
|
||||
GST_LOG ("%*s data size: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset + 44));
|
||||
GST_LOG ("%*s frame count: %u", depth, "",
|
||||
QT_UINT16 (buffer + offset + 48));
|
||||
GST_LOG ("%*s compressor: %d %d %d", depth, "",
|
||||
QT_UINT8 (buffer + offset + 49),
|
||||
QT_UINT8 (buffer + offset + 50), QT_UINT8 (buffer + offset + 51));
|
||||
//(char *) (buffer + offset + 51));
|
||||
GST_LOG ("%*s depth: %u", depth, "",
|
||||
QT_UINT16 (buffer + offset + 82));
|
||||
GST_LOG ("%*s color table ID:%u", depth, "",
|
||||
QT_UINT16 (buffer + offset + 84));
|
||||
|
||||
offset += QT_UINT32 (buffer + offset);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_stts (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %d", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s count: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
GST_LOG ("%*s duration: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset + 4));
|
||||
|
||||
offset += 8;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_stss (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %d", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s sample: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
|
||||
offset += 4;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_stsc (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %d", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s first chunk: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
GST_LOG ("%*s sample per ch: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset + 4));
|
||||
GST_LOG ("%*s sample desc id:%08x", depth, "",
|
||||
QT_UINT32 (buffer + offset + 8));
|
||||
|
||||
offset += 12;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_stsz (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
//int i;
|
||||
int n;
|
||||
int offset;
|
||||
int sample_size;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
sample_size = QT_UINT32 (buffer + 12);
|
||||
GST_LOG ("%*s sample size: %d", depth, "", sample_size);
|
||||
if (sample_size == 0) {
|
||||
GST_LOG ("%*s n entries: %d", depth, "", QT_UINT32 (buffer + 16));
|
||||
n = QT_UINT32 (buffer + 16);
|
||||
offset = 20;
|
||||
#if 0
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s sample size: %u", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
|
||||
offset += 4;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_stco (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
GST_LOG ("%*s n entries: %d", depth, "", n);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s chunk offset: %d", depth, "",
|
||||
QT_UINT32 (buffer + offset));
|
||||
|
||||
offset += 4;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_ctts (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
GST_LOG ("%*s n entries: %d", depth, "", n);
|
||||
offset = 16;
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s sample count :%8d offset: %8d",
|
||||
depth, "", QT_UINT32 (buffer + offset),
|
||||
QT_UINT32 (buffer + offset + 4));
|
||||
|
||||
offset += 8;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_co64 (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
//int i;
|
||||
int n;
|
||||
int offset;
|
||||
|
||||
GST_LOG ("%*s version/flags: %08x", depth, "", QT_UINT32 (buffer + 8));
|
||||
GST_LOG ("%*s n entries: %d", depth, "", QT_UINT32 (buffer + 12));
|
||||
n = QT_UINT32 (buffer + 12);
|
||||
offset = 16;
|
||||
#if 0
|
||||
for (i = 0; i < n; i++) {
|
||||
GST_LOG ("%*s chunk offset: %" G_GUINT64_FORMAT, depth, "",
|
||||
QTDEMUX_GUINT64_GET (buffer + offset));
|
||||
|
||||
offset += 8;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_dcom (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
GST_LOG ("%*s compression type: %" GST_FOURCC_FORMAT, depth, "",
|
||||
GST_FOURCC_ARGS (QT_FOURCC (buffer + 8)));
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_cmvd (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
GST_LOG ("%*s length: %d", depth, "", QT_UINT32 (buffer + 8));
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_dump_unknown (GstQTDemux * qtdemux, guint8 * buffer, int depth)
|
||||
{
|
||||
int len;
|
||||
|
||||
GST_LOG ("%*s length: %d", depth, "", QT_UINT32 (buffer + 0));
|
||||
|
||||
len = QT_UINT32 (buffer + 0);
|
||||
qtdemux_dump_mem (buffer, len);
|
||||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
qtdemux_node_dump_foreach (GNode * node, gpointer qtdemux)
|
||||
{
|
||||
guint8 *buffer = (guint8 *) node->data;
|
||||
guint32 node_length;
|
||||
guint32 fourcc;
|
||||
const QtNodeType *type;
|
||||
int depth;
|
||||
|
||||
node_length = GST_READ_UINT32_BE (buffer);
|
||||
fourcc = GST_READ_UINT32_LE (buffer + 4);
|
||||
|
||||
type = qtdemux_type_get (fourcc);
|
||||
|
||||
depth = (g_node_depth (node) - 1) * 2;
|
||||
GST_LOG ("%*s'%" GST_FOURCC_FORMAT "', [%d], %s",
|
||||
depth, "", GST_FOURCC_ARGS (fourcc), node_length, type->name);
|
||||
|
||||
if (type->dump)
|
||||
type->dump (GST_QTDEMUX_CAST (qtdemux), buffer, depth);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node)
|
||||
{
|
||||
g_node_traverse (qtdemux->moov_node, G_PRE_ORDER, G_TRAVERSE_ALL, -1,
|
||||
qtdemux_node_dump_foreach, qtdemux);
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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_QTDEMUX_DUMP_H__
|
||||
#define __GST_QTDEMUX_DUMP_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <qtdemux.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void qtdemux_dump_mvhd (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_tkhd (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_elst (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_mdhd (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_hdlr (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_vmhd (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_dref (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_stsd (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_stts (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_stss (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_stsc (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_stsz (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_stco (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_co64 (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_dcom (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_cmvd (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_ctts (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
void qtdemux_dump_unknown (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
|
||||
void qtdemux_node_dump (GstQTDemux * qtdemux, GNode * node);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QTDEMUX_DUMP_H__ */
|
|
@ -1,133 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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_QTDEMUX_FOURCC_H__
|
||||
#define __GST_QTDEMUX_FOURCC_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v')
|
||||
#define FOURCC_mvhd GST_MAKE_FOURCC('m','v','h','d')
|
||||
#define FOURCC_clip GST_MAKE_FOURCC('c','l','i','p')
|
||||
#define FOURCC_trak GST_MAKE_FOURCC('t','r','a','k')
|
||||
#define FOURCC_udta GST_MAKE_FOURCC('u','d','t','a')
|
||||
#define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b')
|
||||
#define FOURCC_tkhd GST_MAKE_FOURCC('t','k','h','d')
|
||||
#define FOURCC_crgn GST_MAKE_FOURCC('c','r','g','n')
|
||||
#define FOURCC_matt GST_MAKE_FOURCC('m','a','t','t')
|
||||
#define FOURCC_kmat GST_MAKE_FOURCC('k','m','a','t')
|
||||
#define FOURCC_edts GST_MAKE_FOURCC('e','d','t','s')
|
||||
#define FOURCC_elst GST_MAKE_FOURCC('e','l','s','t')
|
||||
#define FOURCC_load GST_MAKE_FOURCC('l','o','a','d')
|
||||
#define FOURCC_tref GST_MAKE_FOURCC('t','r','e','f')
|
||||
#define FOURCC_imap GST_MAKE_FOURCC('i','m','a','p')
|
||||
#define FOURCC___in GST_MAKE_FOURCC(' ',' ','i','n')
|
||||
#define FOURCC___ty GST_MAKE_FOURCC(' ',' ','t','y')
|
||||
#define FOURCC_mdia GST_MAKE_FOURCC('m','d','i','a')
|
||||
#define FOURCC_mdhd GST_MAKE_FOURCC('m','d','h','d')
|
||||
#define FOURCC_hdlr GST_MAKE_FOURCC('h','d','l','r')
|
||||
#define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f')
|
||||
#define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d')
|
||||
#define FOURCC_smhd GST_MAKE_FOURCC('s','m','h','d')
|
||||
#define FOURCC_gmhd GST_MAKE_FOURCC('g','m','h','d')
|
||||
#define FOURCC_gmin GST_MAKE_FOURCC('g','m','i','n')
|
||||
#define FOURCC_dinf GST_MAKE_FOURCC('d','i','n','f')
|
||||
#define FOURCC_dref GST_MAKE_FOURCC('d','r','e','f')
|
||||
#define FOURCC_stbl GST_MAKE_FOURCC('s','t','b','l')
|
||||
#define FOURCC_stsd GST_MAKE_FOURCC('s','t','s','d')
|
||||
#define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s')
|
||||
#define FOURCC_stss GST_MAKE_FOURCC('s','t','s','s')
|
||||
#define FOURCC_stsc GST_MAKE_FOURCC('s','t','s','c')
|
||||
#define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z')
|
||||
#define FOURCC_stco GST_MAKE_FOURCC('s','t','c','o')
|
||||
#define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e')
|
||||
#define FOURCC_soun GST_MAKE_FOURCC('s','o','u','n')
|
||||
#define FOURCC_strm GST_MAKE_FOURCC('s','t','r','m')
|
||||
#define FOURCC_rtsp GST_MAKE_FOURCC('r','t','s','p')
|
||||
#define FOURCC_co64 GST_MAKE_FOURCC('c','o','6','4')
|
||||
#define FOURCC_cmov GST_MAKE_FOURCC('c','m','o','v')
|
||||
#define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m')
|
||||
#define FOURCC_cmvd GST_MAKE_FOURCC('c','m','v','d')
|
||||
#define FOURCC_hint GST_MAKE_FOURCC('h','i','n','t')
|
||||
#define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a')
|
||||
#define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v')
|
||||
#define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e')
|
||||
#define FOURCC_appl GST_MAKE_FOURCC('a','p','p','l')
|
||||
#define FOURCC_esds GST_MAKE_FOURCC('e','s','d','s')
|
||||
#define FOURCC_hnti GST_MAKE_FOURCC('h','n','t','i')
|
||||
#define FOURCC_rtp_ GST_MAKE_FOURCC('r','t','p',' ')
|
||||
#define FOURCC_sdp_ GST_MAKE_FOURCC('s','d','p',' ')
|
||||
#define FOURCC_meta GST_MAKE_FOURCC('m','e','t','a')
|
||||
#define FOURCC_ilst GST_MAKE_FOURCC('i','l','s','t')
|
||||
#define FOURCC__nam GST_MAKE_FOURCC(0xa9,'n','a','m')
|
||||
#define FOURCC__ART GST_MAKE_FOURCC(0xa9,'A','R','T')
|
||||
#define FOURCC__wrt GST_MAKE_FOURCC(0xa9,'w','r','t')
|
||||
#define FOURCC__grp GST_MAKE_FOURCC(0xa9,'g','r','p')
|
||||
#define FOURCC__alb GST_MAKE_FOURCC(0xa9,'a','l','b')
|
||||
#define FOURCC__day GST_MAKE_FOURCC(0xa9,'d','a','y')
|
||||
#define FOURCC_gnre GST_MAKE_FOURCC('g','n','r','e')
|
||||
#define FOURCC_disc GST_MAKE_FOURCC('d','i','s','c')
|
||||
#define FOURCC_disk GST_MAKE_FOURCC('d','i','s','k')
|
||||
#define FOURCC_trkn GST_MAKE_FOURCC('t','r','k','n')
|
||||
#define FOURCC_cpil GST_MAKE_FOURCC('c','p','i','l')
|
||||
#define FOURCC_tmpo GST_MAKE_FOURCC('t','m','p','o')
|
||||
#define FOURCC__too GST_MAKE_FOURCC(0xa9,'t','o','o')
|
||||
#define FOURCC_____ GST_MAKE_FOURCC('-','-','-','-')
|
||||
#define FOURCC_free GST_MAKE_FOURCC('f','r','e','e')
|
||||
#define FOURCC_data GST_MAKE_FOURCC('d','a','t','a')
|
||||
#define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3')
|
||||
#define FOURCC_rmra GST_MAKE_FOURCC('r','m','r','a')
|
||||
#define FOURCC_rmda GST_MAKE_FOURCC('r','m','d','a')
|
||||
#define FOURCC_rdrf GST_MAKE_FOURCC('r','d','r','f')
|
||||
#define FOURCC__gen GST_MAKE_FOURCC(0xa9, 'g', 'e', 'n')
|
||||
#define FOURCC_rmdr GST_MAKE_FOURCC('r','m','d','r')
|
||||
#define FOURCC_rmvc GST_MAKE_FOURCC('r','m','v','c')
|
||||
#define FOURCC_qtim GST_MAKE_FOURCC('q','t','i','m')
|
||||
#define FOURCC_drms GST_MAKE_FOURCC('d','r','m','s')
|
||||
#define FOURCC_avc1 GST_MAKE_FOURCC('a','v','c','1')
|
||||
#define FOURCC_avcC GST_MAKE_FOURCC('a','v','c','C')
|
||||
#define FOURCC_VP31 GST_MAKE_FOURCC('V','P','3','1')
|
||||
#define FOURCC_rle_ GST_MAKE_FOURCC('r','l','e',' ')
|
||||
#define FOURCC_MAC6 GST_MAKE_FOURCC('M','A','C','6')
|
||||
#define FOURCC_MAC3 GST_MAKE_FOURCC('M','A','C','3')
|
||||
#define FOURCC_ima4 GST_MAKE_FOURCC('i','m','a','4')
|
||||
#define FOURCC_ulaw GST_MAKE_FOURCC('u','l','a','w')
|
||||
#define FOURCC_alaw GST_MAKE_FOURCC('a','l','a','w')
|
||||
#define FOURCC_twos GST_MAKE_FOURCC('t','w','o','s')
|
||||
#define FOURCC_sowt GST_MAKE_FOURCC('s','o','w','t')
|
||||
#define FOURCC_raw_ GST_MAKE_FOURCC('r','a','w',' ')
|
||||
#define FOURCC_QDM2 GST_MAKE_FOURCC('Q','D','M','2')
|
||||
#define FOURCC_alac GST_MAKE_FOURCC('a','l','a','c')
|
||||
#define FOURCC_samr GST_MAKE_FOURCC('s','a','m','r')
|
||||
#define FOURCC_sawb GST_MAKE_FOURCC('s','a','w','b')
|
||||
#define FOURCC_mdat GST_MAKE_FOURCC('m','d','a','t')
|
||||
#define FOURCC_wide GST_MAKE_FOURCC('w','i','d','e')
|
||||
#define FOURCC_PICT GST_MAKE_FOURCC('P','I','C','T')
|
||||
#define FOURCC_pnot GST_MAKE_FOURCC('p','n','o','t')
|
||||
#define FOURCC_zlib GST_MAKE_FOURCC('z','l','i','b')
|
||||
#define FOURCC_alis GST_MAKE_FOURCC('a','l','i','s')
|
||||
#define FOURCC_url_ GST_MAKE_FOURCC('u','r','l',' ')
|
||||
#define FOURCC_frma GST_MAKE_FOURCC('f','r','m','a')
|
||||
#define FOURCC_ctts GST_MAKE_FOURCC('c','t','t','s')
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QTDEMUX_FOURCC_H__ */
|
|
@ -1,129 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "qtdemux_types.h"
|
||||
#include "qtdemux_dump.h"
|
||||
#include "qtdemux_fourcc.h"
|
||||
|
||||
static const QtNodeType qt_node_types[] = {
|
||||
{FOURCC_moov, "movie", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_mvhd, "movie header", 0,
|
||||
qtdemux_dump_mvhd},
|
||||
{FOURCC_clip, "clipping", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_trak, "track", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_udta, "user data", QT_FLAG_CONTAINER,}, /* special container */
|
||||
{FOURCC_ctab, "color table", 0,},
|
||||
{FOURCC_tkhd, "track header", 0,
|
||||
qtdemux_dump_tkhd},
|
||||
{FOURCC_crgn, "clipping region", 0,},
|
||||
{FOURCC_matt, "track matte", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_kmat, "compressed matte", 0,},
|
||||
{FOURCC_edts, "edit", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_elst, "edit list", 0,
|
||||
qtdemux_dump_elst},
|
||||
{FOURCC_load, "track load settings", 0,},
|
||||
{FOURCC_tref, "track reference", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_imap, "track input map", QT_FLAG_CONTAINER,},
|
||||
{FOURCC___in, "track input", 0,}, /* special container */
|
||||
{FOURCC___ty, "input type", 0,},
|
||||
{FOURCC_mdia, "media", QT_FLAG_CONTAINER},
|
||||
{FOURCC_mdhd, "media header", 0,
|
||||
qtdemux_dump_mdhd},
|
||||
{FOURCC_hdlr, "handler reference", 0,
|
||||
qtdemux_dump_hdlr},
|
||||
{FOURCC_minf, "media information", QT_FLAG_CONTAINER},
|
||||
{FOURCC_vmhd, "video media information", 0,
|
||||
qtdemux_dump_vmhd},
|
||||
{FOURCC_smhd, "sound media information", 0},
|
||||
{FOURCC_gmhd, "base media information header", 0},
|
||||
{FOURCC_gmin, "base media info", 0},
|
||||
{FOURCC_dinf, "data information", QT_FLAG_CONTAINER},
|
||||
{FOURCC_dref, "data reference", 0,
|
||||
qtdemux_dump_dref},
|
||||
{FOURCC_stbl, "sample table", QT_FLAG_CONTAINER},
|
||||
{FOURCC_stsd, "sample description", 0,
|
||||
qtdemux_dump_stsd},
|
||||
{FOURCC_stts, "time-to-sample", 0,
|
||||
qtdemux_dump_stts},
|
||||
{FOURCC_stss, "sync sample", 0,
|
||||
qtdemux_dump_stss},
|
||||
{FOURCC_stsc, "sample-to-chunk", 0,
|
||||
qtdemux_dump_stsc},
|
||||
{FOURCC_stsz, "sample size", 0,
|
||||
qtdemux_dump_stsz},
|
||||
{FOURCC_stco, "chunk offset", 0,
|
||||
qtdemux_dump_stco},
|
||||
{FOURCC_co64, "64-bit chunk offset", 0,
|
||||
qtdemux_dump_co64},
|
||||
{FOURCC_vide, "video media", 0},
|
||||
{FOURCC_cmov, "compressed movie", QT_FLAG_CONTAINER},
|
||||
{FOURCC_dcom, "compressed data", 0, qtdemux_dump_dcom},
|
||||
{FOURCC_cmvd, "compressed movie data", 0, qtdemux_dump_cmvd},
|
||||
{FOURCC_hint, "hint", 0,},
|
||||
{FOURCC_mp4a, "mp4a", 0,},
|
||||
{FOURCC_mp4v, "mp4v", 0,},
|
||||
{FOURCC_wave, "wave", QT_FLAG_CONTAINER},
|
||||
{FOURCC_appl, "appl", QT_FLAG_CONTAINER},
|
||||
{FOURCC_esds, "esds", 0},
|
||||
{FOURCC_hnti, "hnti", QT_FLAG_CONTAINER},
|
||||
{FOURCC_rtp_, "rtp ", 0, qtdemux_dump_unknown},
|
||||
{FOURCC_sdp_, "sdp ", 0, qtdemux_dump_unknown},
|
||||
{FOURCC_meta, "meta", 0, qtdemux_dump_unknown},
|
||||
{FOURCC_ilst, "ilst", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__nam, "Name", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__ART, "Artist", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__wrt, "Writer", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__grp, "Group", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__alb, "Album", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__day, "Date", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_gnre, "Genre", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_trkn, "Track Number", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_disc, "Disc Number", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_disk, "Disc Number", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_cpil, "cpil", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_tmpo, "Tempo", QT_FLAG_CONTAINER,},
|
||||
{FOURCC__too, "too", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_____, "----", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_data, "data", 0, qtdemux_dump_unknown},
|
||||
{FOURCC_free, "free", 0,},
|
||||
{FOURCC_SVQ3, "SVQ3", 0,},
|
||||
{FOURCC_rmra, "rmra", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_rmda, "rmda", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_rdrf, "rdrf", 0,},
|
||||
{FOURCC__gen, "Custom Genre", QT_FLAG_CONTAINER,},
|
||||
{FOURCC_ctts, "Composition time to sample", 0, qtdemux_dump_ctts},
|
||||
{0, "unknown", 0,},
|
||||
};
|
||||
static const int n_qt_node_types =
|
||||
sizeof (qt_node_types) / sizeof (qt_node_types[0]);
|
||||
|
||||
const QtNodeType *
|
||||
qtdemux_type_get (guint32 fourcc)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_qt_node_types; i++) {
|
||||
if (qt_node_types[i].fourcc == fourcc)
|
||||
return qt_node_types + i;
|
||||
}
|
||||
|
||||
GST_WARNING ("unknown QuickTime node type %" GST_FOURCC_FORMAT,
|
||||
GST_FOURCC_ARGS (fourcc));
|
||||
return qt_node_types + n_qt_node_types - 1;
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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_QTDEMUX_TYPES_H__
|
||||
#define __GST_QTDEMUX_TYPES_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
#include "qtdemux.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef void (*QtDumpFunc) (GstQTDemux * qtdemux, guint8 * buffer, int depth);
|
||||
|
||||
typedef struct _QtNodeType QtNodeType;
|
||||
|
||||
#define QT_UINT32(a) (GST_READ_UINT32_BE(a))
|
||||
#define QT_UINT24(a) (GST_READ_UINT32_BE(a) >> 8)
|
||||
#define QT_UINT16(a) (GST_READ_UINT16_BE(a))
|
||||
#define QT_UINT8(a) (GST_READ_UINT8(a))
|
||||
#define QT_FP32(a) ((GST_READ_UINT32_BE(a))/65536.0)
|
||||
#define QT_FP16(a) ((GST_READ_UINT16_BE(a))/256.0)
|
||||
#define QT_FOURCC(a) (GST_READ_UINT32_LE(a))
|
||||
#define QT_UINT64(a) ((((guint64)QT_UINT32(a))<<32)|QT_UINT32(((guint8 *)a)+4))
|
||||
|
||||
typedef enum {
|
||||
QT_FLAG_NONE = (0),
|
||||
QT_FLAG_CONTAINER = (1 << 0)
|
||||
} QtFlags;
|
||||
|
||||
struct _QtNodeType {
|
||||
guint32 fourcc;
|
||||
const gchar *name;
|
||||
QtFlags flags;
|
||||
QtDumpFunc dump;
|
||||
};
|
||||
|
||||
const QtNodeType *qtdemux_type_get (guint32 fourcc);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QTDEMUX_TYPES_H__ */
|
|
@ -1,137 +0,0 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||
*
|
||||
* 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_QTPALLETE_H__
|
||||
#define __GST_QTPALLETE_H__
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
static const guint32 ff_qt_default_palette_2[2] = {
|
||||
0xffffff, 0x000000
|
||||
};
|
||||
|
||||
static const guint32 ff_qt_default_palette_4[4] = {
|
||||
0x93655e, 0xffffff, 0xdfd0ab, 0x000000
|
||||
};
|
||||
|
||||
static const guint32 ff_qt_default_palette_16[16] = {
|
||||
0xfffbff, 0xefd9bb, 0xe8c9b1, 0x93655e,
|
||||
0xfcdee8, 0x9d8891, 0xffffff, 0xffffff,
|
||||
0xffffff, 0x474837, 0x7a5e55, 0xdfd0ab,
|
||||
0xfffbf9, 0xe8cac5, 0x8a7c77, 0x000000
|
||||
};
|
||||
static const guint32 ff_qt_default_palette_256[256] = {
|
||||
0xFFFFFF, 0xFFFFCC, 0xFFFF99, 0xFFFF66, 0xFFFF33, 0xFFFF00,
|
||||
0xFFCCFF, 0xFFCCCC, 0xFFCC99, 0xFFCC66, 0xFFCC33, 0xFFCC00,
|
||||
0xFF99FF, 0xFF99CC, 0xFF9999, 0xFF9966, 0xFF9933, 0xFF9900,
|
||||
0xFF66FF, 0xFF66CC, 0xFF6699, 0xFF6666, 0xFF6633, 0xFF6600,
|
||||
0xFF33FF, 0xFF33CC, 0xFF3399, 0xFF3366, 0xFF3333, 0xFF3300,
|
||||
0xFF00FF, 0xFF00CC, 0xFF0099, 0xFF0066, 0xFF0033, 0xFF0000,
|
||||
0xCCFFFF, 0xCCFFCC, 0xCCFF99, 0xCCFF66, 0xCCFF33, 0xCCFF00,
|
||||
0xCCCCFF, 0xCCCCCC, 0xCCCC99, 0xCCCC66, 0xCCCC33, 0xCCCC00,
|
||||
0xCC99FF, 0xCC99CC, 0xCC9999, 0xCC9966, 0xCC9933, 0xCC9900,
|
||||
0xCC66FF, 0xCC66CC, 0xCC6699, 0xCC6666, 0xCC6633, 0xCC6600,
|
||||
0xCC33FF, 0xCC33CC, 0xCC3399, 0xCC3366, 0xCC3333, 0xCC3300,
|
||||
0xCC00FF, 0xCC00CC, 0xCC0099, 0xCC0066, 0xCC0033, 0xCC0000,
|
||||
0x99FFFF, 0x99FFCC, 0x99FF99, 0x99FF66, 0x99FF33, 0x99FF00,
|
||||
0x99CCFF, 0x99CCCC, 0x99CC99, 0x99CC66, 0x99CC33, 0x99CC00,
|
||||
0x9999FF, 0x9999CC, 0x999999, 0x999966, 0x999933, 0x999900,
|
||||
0x9966FF, 0x9966CC, 0x996699, 0x996666, 0x996633, 0x996600,
|
||||
0x9933FF, 0x9933CC, 0x993399, 0x993366, 0x993333, 0x993300,
|
||||
0x9900FF, 0x9900CC, 0x990099, 0x990066, 0x990033, 0x990000,
|
||||
0x66FFFF, 0x66FFCC, 0x66FF99, 0x66FF66, 0x66FF33, 0x66FF00,
|
||||
0x66CCFF, 0x66CCCC, 0x66CC99, 0x66CC66, 0x66CC33, 0x66CC00,
|
||||
0x6699FF, 0x6699CC, 0x669999, 0x669966, 0x669933, 0x669900,
|
||||
0x6666FF, 0x6666CC, 0x666699, 0x666666, 0x666633, 0x666600,
|
||||
0x6633FF, 0x6633CC, 0x663399, 0x663366, 0x663333, 0x663300,
|
||||
0x6600FF, 0x6600CC, 0x660099, 0x660066, 0x660033, 0x660000,
|
||||
0x33FFFF, 0x33FFCC, 0x33FF99, 0x33FF66, 0x33FF33, 0x33FF00,
|
||||
0x33CCFF, 0x33CCCC, 0x33CC99, 0x33CC66, 0x33CC33, 0x33CC00,
|
||||
0x3399FF, 0x3399CC, 0x339999, 0x339966, 0x339933, 0x339900,
|
||||
0x3366FF, 0x3366CC, 0x336699, 0x336666, 0x336633, 0x336600,
|
||||
0x3333FF, 0x3333CC, 0x333399, 0x333366, 0x333333, 0x333300,
|
||||
0x3300FF, 0x3300CC, 0x330099, 0x330066, 0x330033, 0x330000,
|
||||
0x00FFFF, 0x00FFCC, 0x00FF99, 0x00FF66, 0x00FF33, 0x00FF00,
|
||||
0x00CCFF, 0x00CCCC, 0x00CC99, 0x00CC66, 0x00CC33, 0x00CC00,
|
||||
0x0099FF, 0x0099CC, 0x009999, 0x009966, 0x009933, 0x009900,
|
||||
0x0066FF, 0x0066CC, 0x006699, 0x006666, 0x006633, 0x006600,
|
||||
0x0033FF, 0x0033CC, 0x003399, 0x003366, 0x003333, 0x003300,
|
||||
0x0000FF, 0x0000CC, 0x000099, 0x000066, 0x000033, 0xEE0000,
|
||||
0xDD0000, 0xBB0000, 0xAA0000, 0x880000, 0x770000, 0x550000,
|
||||
0x440000, 0x220000, 0x110000, 0x00EE00, 0x00DD00, 0x00BB00,
|
||||
0x00AA00, 0x008800, 0x007700, 0x005500, 0x004400, 0x002200,
|
||||
0x001100, 0x0000EE, 0x0000DD, 0x0000BB, 0x0000AA, 0x000088,
|
||||
0x000077, 0x000055, 0x000044, 0x000022, 0x000011, 0xEEEEEE,
|
||||
0xDDDDDD, 0xBBBBBB, 0xAAAAAA, 0x888888, 0x777777, 0x555555,
|
||||
0x444444, 0x222222, 0x111111, 0x000000
|
||||
};
|
||||
|
||||
static const guint32 ff_qt_grayscale_palette_16[16] = {
|
||||
0xffffff, 0xeeeeee, 0xdddddd, 0xcccccc,
|
||||
0xbbbbbb, 0xaaaaaa, 0x999999, 0x888888,
|
||||
0x777777, 0x666666, 0x555555, 0x444444,
|
||||
0x333333, 0x222222, 0x111111, 0x000000
|
||||
};
|
||||
|
||||
static const guint32 ff_qt_grayscale_palette_256[256] = {
|
||||
0xffffff, 0xfefefe, 0xfdfdfd, 0xfcfcfc, 0xfbfbfb, 0xfafafa, 0xf9f9f9,
|
||||
0xf8f8f8, 0xf7f7f7, 0xf6f6f6, 0xf5f5f5, 0xf4f4f4, 0xf3f3f3, 0xf2f2f2,
|
||||
0xf1f1f1, 0xf0f0f0, 0xefefef, 0xeeeeee, 0xededed, 0xececec, 0xebebeb,
|
||||
0xeaeaea, 0xe9e9e9, 0xe8e8e8, 0xe7e7e7, 0xe6e6e6, 0xe5e5e5, 0xe4e4e4,
|
||||
0xe3e3e3, 0xe2e2e2, 0xe1e1e1, 0xe0e0e0, 0xdfdfdf, 0xdedede, 0xdddddd,
|
||||
0xdcdcdc, 0xdbdbdb, 0xdadada, 0xd9d9d9, 0xd8d8d8, 0xd7d7d7, 0xd6d6d6,
|
||||
0xd5d5d5, 0xd4d4d4, 0xd3d3d3, 0xd2d2d2, 0xd1d1d1, 0xd0d0d0, 0xcfcfcf,
|
||||
0xcecece, 0xcdcdcd, 0xcccccc, 0xcbcbcb, 0xcacaca, 0xc9c9c9, 0xc8c8c8,
|
||||
0xc7c7c7, 0xc6c6c6, 0xc5c5c5, 0xc4c4c4, 0xc3c3c3, 0xc2c2c2, 0xc1c1c1,
|
||||
0xc0c0c0, 0xbfbfbf, 0xbebebe, 0xbdbdbd, 0xbcbcbc, 0xbbbbbb, 0xbababa,
|
||||
0xb9b9b9, 0xb8b8b8, 0xb7b7b7, 0xb6b6b6, 0xb5b5b5, 0xb4b4b4, 0xb3b3b3,
|
||||
0xb2b2b2, 0xb1b1b1, 0xb0b0b0, 0xafafaf, 0xaeaeae, 0xadadad, 0xacacac,
|
||||
0xababab, 0xaaaaaa, 0xa9a9a9, 0xa8a8a8, 0xa7a7a7, 0xa6a6a6, 0xa5a5a5,
|
||||
0xa4a4a4, 0xa3a3a3, 0xa2a2a2, 0xa1a1a1, 0xa0a0a0, 0x9f9f9f, 0x9e9e9e,
|
||||
0x9d9d9d, 0x9c9c9c, 0x9b9b9b, 0x9a9a9a, 0x999999, 0x989898, 0x979797,
|
||||
0x969696, 0x959595, 0x949494, 0x939393, 0x929292, 0x919191, 0x909090,
|
||||
0x8f8f8f, 0x8e8e8e, 0x8d8d8d, 0x8c8c8c, 0x8b8b8b, 0x8a8a8a, 0x898989,
|
||||
0x888888, 0x878787, 0x868686, 0x858585, 0x848484, 0x838383, 0x828282,
|
||||
0x818181, 0x808080, 0x7f7f7f, 0x7e7e7e, 0x7d7d7d, 0x7c7c7c, 0x7b7b7b,
|
||||
0x7a7a7a, 0x797979, 0x787878, 0x777777, 0x767676, 0x757575, 0x747474,
|
||||
0x737373, 0x727272, 0x717171, 0x707070, 0x6f6f6f, 0x6e6e6e, 0x6d6d6d,
|
||||
0x6c6c6c, 0x6b6b6b, 0x6a6a6a, 0x696969, 0x686868, 0x676767, 0x666666,
|
||||
0x656565, 0x646464, 0x636363, 0x626262, 0x616161, 0x606060, 0x5f5f5f,
|
||||
0x5e5e5e, 0x5d5d5d, 0x5c5c5c, 0x5b5b5b, 0x5a5a5a, 0x595959, 0x585858,
|
||||
0x575757, 0x565656, 0x555555, 0x545454, 0x535353, 0x525252, 0x515151,
|
||||
0x505050, 0x4f4f4f, 0x4e4e4e, 0x4d4d4d, 0x4c4c4c, 0x4b4b4b, 0x4a4a4a,
|
||||
0x494949, 0x484848, 0x474747, 0x464646, 0x454545, 0x444444, 0x434343,
|
||||
0x424242, 0x414141, 0x404040, 0x3f3f3f, 0x3e3e3e, 0x3d3d3d, 0x3c3c3c,
|
||||
0x3b3b3b, 0x3a3a3a, 0x393939, 0x383838, 0x373737, 0x363636, 0x353535,
|
||||
0x343434, 0x333333, 0x323232, 0x313131, 0x303030, 0x2f2f2f, 0x2e2e2e,
|
||||
0x2d2d2d, 0x2c2c2c, 0x2b2b2b, 0x2a2a2a, 0x292929, 0x282828, 0x272727,
|
||||
0x262626, 0x252525, 0x242424, 0x232323, 0x222222, 0x212121, 0x202020,
|
||||
0x1f1f1f, 0x1e1e1e, 0x1d1d1d, 0x1c1c1c, 0x1b1b1b, 0x1a1a1a, 0x191919,
|
||||
0x181818, 0x171717, 0x161616, 0x151515, 0x141414, 0x131313, 0x121212,
|
||||
0x111111, 0x101010, 0x0f0f0f, 0x0e0e0e, 0x0d0d0d, 0x0c0c0c, 0x0b0b0b,
|
||||
0x0a0a0a, 0x090909, 0x080808, 0x070707, 0x060606, 0x050505, 0x040404,
|
||||
0x030303, 0x020202, 0x010101, 0x000000
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QTPALETTE_H__ */
|
|
@ -1,53 +0,0 @@
|
|||
/* 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);
|
|
@ -3,6 +3,5 @@ win32/common/config.h
|
|||
win32/common/config.h.in
|
||||
win32/vs6/gst_plugins_bad.dsw
|
||||
win32/vs6/libgstneon.dsp
|
||||
win32/vs6/libgstqtdemux.dsp
|
||||
win32/vs7/gst-plugins-bad.sln
|
||||
win32/vs8/gst-plugins-bad.sln
|
||||
|
|
|
@ -1,142 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="libgstqtdemux" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=libgstqtdemux - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libgstqtdemux.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "libgstqtdemux.mak" CFG="libgstqtdemux - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "libgstqtdemux - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "libgstqtdemux - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "libgstqtdemux - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTQTDEMUX_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /I "../../../gst-plugins-bad/gst/qtdemux" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTQTDEMUX_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "NDEBUG"
|
||||
# ADD RSC /l 0x40c /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 glib-2.0.lib gobject-2.0.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstrtp-0.10.lib /nologo /dll /machine:I386 /libpath:"../../../gstreamer/win32/vs6/release" /libpath:"../../../gst-plugins-base/win32/vs6/release" /libpath:"./release"
|
||||
# Begin Special Build Tool
|
||||
TargetPath=.\Release\libgstqtdemux.dll
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\lib\gstreamer-0.10
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "libgstqtdemux - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTQTDEMUX_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../gst-libs" /I "../../../gstreamer" /I "../common" /I "../../../gstreamer/libs" /I "../../../gst-plugins-base/gst-libs" /I "../../../gst-plugins-bad/gst/qtdemux" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBGSTQTDEMUX_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x40c /d "_DEBUG"
|
||||
# ADD RSC /l 0x40c /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 glib-2.0D.lib gobject-2.0D.lib libgstreamer-0.10.lib libgstbase-0.10.lib libgstrtp-0.10.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"../../../gstreamer/win32/vs6/debug" /libpath:"../../../gst-plugins-base/win32/vs6/debug" /libpath:"./debug"
|
||||
# Begin Special Build Tool
|
||||
TargetPath=.\Debug\libgstqtdemux.dll
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Cmds=copy /Y $(TargetPath) c:\gstreamer\debug\lib\gstreamer-0.10
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "libgstqtdemux - Win32 Release"
|
||||
# Name "libgstqtdemux - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gst\qtdemux\gstrtpxqtdepay.c
|
||||
# SUBTRACT CPP /YX
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gst\qtdemux\qtdemux.c
|
||||
# SUBTRACT CPP /YX
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gst\qtdemux\qtdemux_dump.c
|
||||
# SUBTRACT CPP /YX
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gst\qtdemux\qtdemux_types.c
|
||||
# SUBTRACT CPP /YX
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gst\qtdemux\quicktime.c
|
||||
# SUBTRACT CPP /YX
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gst\qtdemux\qtdemux.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
Loading…
Reference in a new issue