2003-12-07 22:49:04 +00:00
|
|
|
/* GStreamer RIFF I/O
|
|
|
|
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
|
|
*
|
|
|
|
* riff-media.h: RIFF-id to/from caps routines
|
|
|
|
*
|
|
|
|
* 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 "riff-ids.h"
|
|
|
|
#include "riff-media.h"
|
|
|
|
|
2006-02-16 19:18:46 +00:00
|
|
|
#include <gst/audio/multichannel.h>
|
|
|
|
|
|
|
|
#include <string.h>
|
2007-04-13 06:17:45 +00:00
|
|
|
#include <math.h>
|
2006-02-16 19:18:46 +00:00
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_EXTERN (riff_debug);
|
|
|
|
#define GST_CAT_DEFAULT riff_debug
|
|
|
|
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
/**
|
2008-05-21 14:35:41 +00:00
|
|
|
* gst_riff_create_video_caps:
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
* @codec_fcc: fourCC codec for this codec.
|
|
|
|
* @strh: pointer to the strh stream header structure.
|
|
|
|
* @strf: pointer to the strf stream header structure, including any
|
|
|
|
* data that is within the range of strf.size, but excluding any
|
|
|
|
* additional data withint this chunk but outside strf.size.
|
|
|
|
* @strf_data: a #GstBuffer containing the additional data in the strf
|
|
|
|
* chunk outside reach of strf.size. Ususally a palette.
|
|
|
|
* @strd_data: a #GstBuffer containing the data in the strd stream header
|
|
|
|
* chunk. Usually codec initialization data.
|
|
|
|
* @codec_name: if given, will be filled with a human-readable codec name.
|
|
|
|
*/
|
|
|
|
|
2003-12-07 22:49:04 +00:00
|
|
|
GstCaps *
|
2005-06-30 08:59:30 +00:00
|
|
|
gst_riff_create_video_caps (guint32 codec_fcc,
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
gst_riff_strh * strh, gst_riff_strf_vids * strf,
|
|
|
|
GstBuffer * strf_data, GstBuffer * strd_data, char **codec_name)
|
2003-12-07 22:49:04 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
2004-10-02 14:10:19 +00:00
|
|
|
GstBuffer *palette = NULL;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_DEBUG ("video fourcc %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (codec_fcc));
|
|
|
|
|
2003-12-07 22:49:04 +00:00
|
|
|
switch (codec_fcc) {
|
2008-10-31 09:49:57 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'B', ' '): /* uncompressed RGB */
|
|
|
|
case GST_MAKE_FOURCC (0x00, 0x00, 0x00, 0x00):
|
|
|
|
case GST_MAKE_FOURCC ('R', 'G', 'B', ' '):
|
|
|
|
case GST_MAKE_FOURCC ('R', 'A', 'W', ' '):
|
|
|
|
{
|
2006-03-14 13:16:49 +00:00
|
|
|
gint bpp = (strf && strf->bit_cnt != 0) ? strf->bit_cnt : 8;
|
|
|
|
|
|
|
|
if (strf) {
|
|
|
|
if (bpp == 8) {
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, 8, "depth", G_TYPE_INT, 8,
|
|
|
|
"endianness", G_TYPE_INT, G_BYTE_ORDER, NULL);
|
|
|
|
} else if (bpp == 24) {
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, 24, "depth", G_TYPE_INT, 24,
|
|
|
|
"endianness", G_TYPE_INT, G_BIG_ENDIAN,
|
|
|
|
"red_mask", G_TYPE_INT, 0xff, "green_mask", G_TYPE_INT, 0xff00,
|
|
|
|
"blue_mask", G_TYPE_INT, 0xff0000, NULL);
|
2010-01-07 02:30:57 +00:00
|
|
|
} else if (bpp == 32) {
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, 32, "depth", G_TYPE_INT, 24,
|
|
|
|
"endianness", G_TYPE_INT, G_BIG_ENDIAN,
|
|
|
|
"red_mask", G_TYPE_INT, 0xff00, "green_mask", G_TYPE_INT,
|
|
|
|
0xff0000, "blue_mask", G_TYPE_INT, 0xff000000, NULL);
|
2006-03-14 13:16:49 +00:00
|
|
|
} else {
|
|
|
|
GST_WARNING ("Unhandled DIB RGB depth: %d", bpp);
|
2008-07-15 13:05:04 +00:00
|
|
|
return NULL;
|
2006-03-14 13:16:49 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* for template */
|
2010-01-07 02:30:57 +00:00
|
|
|
caps =
|
|
|
|
gst_caps_from_string ("video/x-raw-rgb, bpp = (int) { 8, 24, 32 }, "
|
2006-03-14 13:16:49 +00:00
|
|
|
"depth = (int) { 8, 24}");
|
|
|
|
}
|
|
|
|
|
2004-10-02 14:10:19 +00:00
|
|
|
palette = strf_data;
|
|
|
|
strf_data = NULL;
|
2010-01-07 02:30:57 +00:00
|
|
|
if (codec_name) {
|
|
|
|
if (bpp == 8)
|
|
|
|
*codec_name = g_strdup_printf ("Palettized %d-bit RGB", bpp);
|
|
|
|
else
|
|
|
|
*codec_name = g_strdup_printf ("%d-bit RGB", bpp);
|
|
|
|
}
|
2004-10-02 14:10:19 +00:00
|
|
|
break;
|
2006-03-14 13:16:49 +00:00
|
|
|
}
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-04-11 17:21:32 +00:00
|
|
|
*codec_name = g_strdup ("Uncompressed planar YUV 4:2:0");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-04-11 17:21:32 +00:00
|
|
|
*codec_name = g_strdup ("Uncompressed packed YUV 4:2:2");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2006-03-23 09:38:59 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'V', 'U', '9'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
|
|
|
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Uncompressed packed YVU 4:1:0");
|
|
|
|
break;
|
|
|
|
|
2009-05-07 21:07:44 +00:00
|
|
|
case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
|
|
|
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Uncompressed packed YUV 4:2:2");
|
|
|
|
break;
|
|
|
|
|
2010-01-23 13:08:39 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
|
|
|
"format", GST_TYPE_FOURCC, codec_fcc, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Uncompressed packed YVU 4:2:2");
|
|
|
|
break;
|
|
|
|
|
2004-03-15 19:32:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'J', 'P', 'G'): /* YUY2 MJPEG */
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('A', 'V', 'R', 'n'):
|
|
|
|
case GST_MAKE_FOURCC ('I', 'J', 'P', 'G'):
|
|
|
|
case GST_MAKE_FOURCC ('i', 'j', 'p', 'g'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'm', 'b', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('A', 'C', 'D', 'V'):
|
|
|
|
case GST_MAKE_FOURCC ('Q', 'I', 'V', 'G'):
|
2004-04-11 17:21:32 +00:00
|
|
|
caps = gst_caps_new_simple ("image/jpeg", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Motion JPEG");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-15 19:32:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('J', 'P', 'E', 'G'): /* generic (mostly RGB) MJPEG */
|
2007-12-16 23:46:16 +00:00
|
|
|
case GST_MAKE_FOURCC ('j', 'p', 'e', 'g'): /* generic (mostly RGB) MJPEG */
|
2004-04-11 17:21:32 +00:00
|
|
|
caps = gst_caps_new_simple ("image/jpeg", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("JPEG Still Image");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2004-03-15 19:32:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('P', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
|
|
|
|
case GST_MAKE_FOURCC ('V', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
|
2004-04-11 17:21:32 +00:00
|
|
|
caps = gst_caps_new_simple ("image/jpeg", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2009-02-28 11:41:28 +00:00
|
|
|
*codec_name = g_strdup ("Miro/Pinnacle Motion JPEG");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('C', 'J', 'P', 'G'):
|
|
|
|
caps = gst_caps_new_simple ("image/jpeg", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Creative Webcam JPEG");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('S', 'L', 'M', 'J'):
|
|
|
|
caps = gst_caps_new_simple ("image/jpeg", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("SL Motion JPEG");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('J', 'P', 'G', 'L'):
|
|
|
|
caps = gst_caps_new_simple ("image/jpeg", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Pegasus Lossless JPEG");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('S', 'P', '5', '3'):
|
|
|
|
case GST_MAKE_FOURCC ('S', 'P', '5', '4'):
|
|
|
|
case GST_MAKE_FOURCC ('S', 'P', '5', '5'):
|
|
|
|
case GST_MAKE_FOURCC ('S', 'P', '5', '6'):
|
|
|
|
case GST_MAKE_FOURCC ('S', 'P', '5', '7'):
|
|
|
|
case GST_MAKE_FOURCC ('S', 'P', '5', '8'):
|
|
|
|
caps = gst_caps_new_simple ("video/sp5x", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Sp5x-like JPEG");
|
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('H', 'F', 'Y', 'U'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-huffyuv", NULL);
|
2005-08-08 16:58:29 +00:00
|
|
|
if (strf) {
|
|
|
|
gst_caps_set_simple (caps, "bpp",
|
|
|
|
G_TYPE_INT, (int) strf->bit_cnt, NULL);
|
|
|
|
}
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Huffman Lossless Codec");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'E', 'G'):
|
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'G', 'I'):
|
2004-05-31 04:56:55 +00:00
|
|
|
case GST_MAKE_FOURCC ('m', 'p', 'g', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'G', '1'):
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('P', 'I', 'M', '1'):
|
2009-02-24 09:33:05 +00:00
|
|
|
case GST_MAKE_FOURCC (0x01, 0x00, 0x00, 0x10):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
2004-03-15 19:32:28 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
2004-04-22 03:29:01 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 1, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2005-08-08 16:58:29 +00:00
|
|
|
*codec_name = g_strdup ("MPEG-1 video");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
2009-02-28 11:41:28 +00:00
|
|
|
|
2004-05-31 04:56:55 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'G', '2'):
|
|
|
|
case GST_MAKE_FOURCC ('m', 'p', 'g', '2'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('P', 'I', 'M', '2'):
|
2009-03-09 08:07:13 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'V', 'R', ' '):
|
2009-02-25 09:52:38 +00:00
|
|
|
case GST_MAKE_FOURCC (0x02, 0x00, 0x00, 0x10):
|
2004-05-31 04:56:55 +00:00
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"mpegversion", G_TYPE_INT, 2, NULL);
|
|
|
|
if (codec_name)
|
2005-08-08 16:58:29 +00:00
|
|
|
*codec_name = g_strdup ("MPEG-2 video");
|
2004-05-31 04:56:55 +00:00
|
|
|
break;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('L', 'M', 'P', '2'):
|
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"mpegversion", G_TYPE_INT, 2, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Lead MPEG-2 video");
|
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('H', '2', '6', '3'):
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('h', '2', '6', '3'):
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('i', '2', '6', '3'):
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('U', '2', '6', '3'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('v', 'i', 'v', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('T', '2', '6', '3'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "itu", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2005-12-19 15:00:38 +00:00
|
|
|
*codec_name = g_strdup ("ITU H.26n");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('L', '2', '6', '3'):
|
2006-11-07 07:22:32 +00:00
|
|
|
/* http://www.leadcodecs.com/Codecs/LEAD-H263.htm */
|
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "lead", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Lead H.263");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', '2', '6', '3'):
|
2005-08-08 16:58:29 +00:00
|
|
|
case GST_MAKE_FOURCC ('m', '2', '6', '3'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "microsoft", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft H.263");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('V', 'D', 'O', 'W'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "vdolive", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("VDOLive");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('V', 'I', 'V', 'O'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "vivo", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Vivo H.263");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('x', '2', '6', '3'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "xirlink", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Xirlink H.263");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2005-08-08 16:58:29 +00:00
|
|
|
/* apparently not standard H.263...? */
|
|
|
|
case GST_MAKE_FOURCC ('I', '2', '6', '3'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-intel-h263",
|
|
|
|
"variant", G_TYPE_STRING, "intel", NULL);
|
2005-08-08 16:58:29 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Intel H.263");
|
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('V', 'X', '1', 'K'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-h263",
|
|
|
|
"variant", G_TYPE_STRING, "lucent", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Lucent VX1000S H.263");
|
|
|
|
break;
|
|
|
|
|
2009-01-26 09:31:14 +00:00
|
|
|
case GST_MAKE_FOURCC ('X', '2', '6', '4'):
|
|
|
|
case GST_MAKE_FOURCC ('x', '2', '6', '4'):
|
2006-04-22 21:19:06 +00:00
|
|
|
case GST_MAKE_FOURCC ('H', '2', '6', '4'):
|
2005-08-08 16:58:29 +00:00
|
|
|
case GST_MAKE_FOURCC ('h', '2', '6', '4'):
|
2007-12-16 23:46:16 +00:00
|
|
|
case GST_MAKE_FOURCC ('a', 'v', 'c', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('A', 'V', 'C', '1'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h264",
|
|
|
|
"variant", G_TYPE_STRING, "itu", NULL);
|
2005-08-08 16:58:29 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("ITU H.264");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('V', 'S', 'S', 'H'):
|
2006-11-07 07:22:32 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-h264",
|
|
|
|
"variant", G_TYPE_STRING, "videosoft", NULL);
|
2005-08-08 16:58:29 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("VideoSoft H.264");
|
|
|
|
break;
|
|
|
|
|
2008-08-14 15:17:31 +00:00
|
|
|
case GST_MAKE_FOURCC ('L', '2', '6', '4'):
|
|
|
|
/* http://www.leadcodecs.com/Codecs/LEAD-H264.htm */
|
|
|
|
caps = gst_caps_new_simple ("video/x-h264",
|
|
|
|
"variant", G_TYPE_STRING, "lead", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Lead H.264");
|
|
|
|
break;
|
|
|
|
|
2006-05-09 11:37:22 +00:00
|
|
|
case GST_MAKE_FOURCC ('S', 'E', 'D', 'G'):
|
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Samsung MPEG-4");
|
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', '4', 'C', 'C'):
|
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Divio MPEG-4");
|
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'V', '3'):
|
2004-04-16 01:43:13 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'i', 'v', '3'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'V', 'X', '3'):
|
|
|
|
case GST_MAKE_FOURCC ('d', 'v', 'x', '3'):
|
2004-04-11 17:21:32 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'V', '4'):
|
2004-04-16 01:43:13 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'i', 'v', '4'):
|
2004-04-11 17:21:32 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'V', '5'):
|
2004-04-16 01:43:13 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'i', 'v', '5'):
|
2004-04-11 17:21:32 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'V', '6'):
|
2004-04-16 01:43:13 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'i', 'v', '6'):
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'G', '3'):
|
|
|
|
case GST_MAKE_FOURCC ('m', 'p', 'g', '3'):
|
|
|
|
case GST_MAKE_FOURCC ('c', 'o', 'l', '0'):
|
|
|
|
case GST_MAKE_FOURCC ('C', 'O', 'L', '0'):
|
|
|
|
case GST_MAKE_FOURCC ('c', 'o', 'l', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('C', 'O', 'L', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('A', 'P', '4', '1'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-divx",
|
2004-03-15 19:32:28 +00:00
|
|
|
"divxversion", G_TYPE_INT, 3, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-04-11 17:21:32 +00:00
|
|
|
*codec_name = g_strdup ("DivX MS-MPEG-4 Version 3");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2004-04-11 17:21:32 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'i', 'v', 'x'):
|
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-divx",
|
2004-04-15 03:21:14 +00:00
|
|
|
"divxversion", G_TYPE_INT, 4, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("DivX MPEG-4 Version 4");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
|
2005-08-08 16:58:29 +00:00
|
|
|
case GST_MAKE_FOURCC ('B', 'L', 'Z', '0'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-divx",
|
|
|
|
"divxversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Blizzard DivX");
|
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'X', '5', '0'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-divx",
|
2004-03-15 19:32:28 +00:00
|
|
|
"divxversion", G_TYPE_INT, 5, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("DivX MPEG-4 Version 5");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('X', 'V', 'I', 'D'):
|
|
|
|
case GST_MAKE_FOURCC ('x', 'v', 'i', 'd'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-xvid", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("XVID MPEG-4");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'G', '4'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', '4', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('m', 'p', '4', '1'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-msmpeg",
|
2004-03-15 19:32:28 +00:00
|
|
|
"msmpegversion", G_TYPE_INT, 41, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft MPEG-4 4.1");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2004-07-15 23:56:05 +00:00
|
|
|
case GST_MAKE_FOURCC ('m', 'p', '4', '2'):
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', '4', '2'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-msmpeg",
|
2004-03-15 19:32:28 +00:00
|
|
|
"msmpegversion", G_TYPE_INT, 42, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft MPEG-4 4.2");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2004-07-15 23:56:05 +00:00
|
|
|
case GST_MAKE_FOURCC ('m', 'p', '4', '3'):
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', '4', '3'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-msmpeg",
|
2004-03-15 19:32:28 +00:00
|
|
|
"msmpegversion", G_TYPE_INT, 43, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft MPEG-4 4.3");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2008-03-28 16:22:35 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'P', '4', 'S'):
|
2005-08-08 16:58:29 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', '4', 'S', '2'):
|
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Microsoft ISO MPEG-4 1.1");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('F', 'M', 'P', '4'):
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('U', 'M', 'P', '4'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('F', 'F', 'D', 'S'):
|
2005-08-08 16:58:29 +00:00
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("FFmpeg MPEG-4");
|
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('E', 'M', '4', 'A'):
|
|
|
|
case GST_MAKE_FOURCC ('E', 'P', 'V', 'H'):
|
|
|
|
case GST_MAKE_FOURCC ('F', 'V', 'F', 'W'):
|
|
|
|
case GST_MAKE_FOURCC ('I', 'N', 'M', 'C'):
|
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'G', 'I'):
|
|
|
|
case GST_MAKE_FOURCC ('D', 'M', '2', 'K'):
|
|
|
|
case GST_MAKE_FOURCC ('D', 'C', 'O', 'D'):
|
|
|
|
case GST_MAKE_FOURCC ('M', 'V', 'X', 'M'):
|
|
|
|
case GST_MAKE_FOURCC ('P', 'M', '4', 'V'):
|
|
|
|
case GST_MAKE_FOURCC ('S', 'M', 'P', '4'):
|
|
|
|
case GST_MAKE_FOURCC ('D', 'X', 'G', 'M'):
|
|
|
|
case GST_MAKE_FOURCC ('V', 'I', 'D', 'M'):
|
|
|
|
case GST_MAKE_FOURCC ('M', '4', 'T', '3'):
|
|
|
|
case GST_MAKE_FOURCC ('G', 'E', 'O', 'X'):
|
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("MPEG-4");
|
|
|
|
break;
|
|
|
|
|
2006-03-05 13:08:37 +00:00
|
|
|
case GST_MAKE_FOURCC ('3', 'i', 'v', 'd'):
|
|
|
|
case GST_MAKE_FOURCC ('3', 'I', 'V', 'D'):
|
2008-07-15 13:05:04 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-msmpeg",
|
|
|
|
"msmpegversion", G_TYPE_INT, 43, NULL);
|
2006-03-05 13:08:37 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Microsoft MPEG-4 4.3"); /* FIXME? */
|
2008-07-15 13:05:04 +00:00
|
|
|
break;
|
2006-03-05 13:08:37 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('3', 'I', 'V', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('3', 'I', 'V', '2'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-3ivx", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("3ivx");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'V', 'S', 'D'):
|
|
|
|
case GST_MAKE_FOURCC ('d', 'v', 's', 'd'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'v', 'c', ' '):
|
|
|
|
case GST_MAKE_FOURCC ('d', 'v', '2', '5'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-dv",
|
2008-05-26 17:18:52 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"dvversion", G_TYPE_INT, 25, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Generic DV");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('C', 'D', 'V', 'C'):
|
|
|
|
case GST_MAKE_FOURCC ('c', 'd', 'v', 'c'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-dv",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"dvversion", G_TYPE_INT, 25, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Canopus DV");
|
|
|
|
break;
|
|
|
|
|
2008-05-26 17:18:52 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'V', '5', '0'):
|
|
|
|
case GST_MAKE_FOURCC ('d', 'v', '5', '0'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-dv",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"dvversion", G_TYPE_INT, 50, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("DVCPro50 Video");
|
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('W', 'M', 'V', '1'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-wmv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 1, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2005-08-08 16:58:29 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft Windows Media 7");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
case GST_MAKE_FOURCC ('W', 'M', 'V', '2'):
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-wmv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 2, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2005-08-08 16:58:29 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft Windows Media 8");
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
break;
|
2004-03-14 22:34:34 +00:00
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('W', 'M', 'V', '3'):
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-wmv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 3, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2005-08-08 16:58:29 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft Windows Media 9");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2006-06-30 12:04:51 +00:00
|
|
|
case GST_MAKE_FOURCC ('W', 'M', 'V', 'A'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-wmv",
|
2009-06-29 13:00:14 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 3, "format", GST_TYPE_FOURCC,
|
2006-06-30 12:04:51 +00:00
|
|
|
codec_fcc, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Microsoft Windows Media Advanced Profile");
|
|
|
|
break;
|
|
|
|
|
2007-12-03 11:32:30 +00:00
|
|
|
case GST_MAKE_FOURCC ('W', 'V', 'C', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-wmv",
|
2009-06-29 13:00:14 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 3, "format", GST_TYPE_FOURCC,
|
2007-12-03 11:32:30 +00:00
|
|
|
codec_fcc, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Microsoft Windows Media VC-1");
|
|
|
|
break;
|
|
|
|
|
2004-03-24 02:12:30 +00:00
|
|
|
case GST_MAKE_FOURCC ('c', 'v', 'i', 'd'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-cinepak", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Cinepak video");
|
|
|
|
break;
|
|
|
|
|
2004-04-11 21:36:45 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'S', 'V', 'C'):
|
|
|
|
case GST_MAKE_FOURCC ('m', 's', 'v', 'c'):
|
|
|
|
case GST_MAKE_FOURCC ('C', 'R', 'A', 'M'):
|
|
|
|
case GST_MAKE_FOURCC ('c', 'r', 'a', 'm'):
|
|
|
|
case GST_MAKE_FOURCC ('W', 'H', 'A', 'M'):
|
|
|
|
case GST_MAKE_FOURCC ('w', 'h', 'a', 'm'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-msvideocodec",
|
|
|
|
"msvideoversion", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("MS video v1");
|
2006-02-24 16:21:34 +00:00
|
|
|
palette = strf_data;
|
|
|
|
strf_data = NULL;
|
2004-04-11 21:36:45 +00:00
|
|
|
break;
|
|
|
|
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
case GST_MAKE_FOURCC ('R', 'L', 'E', ' '):
|
|
|
|
case GST_MAKE_FOURCC ('m', 'r', 'l', 'e'):
|
|
|
|
case GST_MAKE_FOURCC (0x1, 0x0, 0x0, 0x0): /* why, why, why? */
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC (0x2, 0x0, 0x0, 0x0): /* why, why, why? */
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-rle",
|
|
|
|
"layout", G_TYPE_STRING, "microsoft", NULL);
|
2004-10-02 14:10:19 +00:00
|
|
|
palette = strf_data;
|
|
|
|
strf_data = NULL;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
if (strf) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"depth", G_TYPE_INT, (gint) strf->bit_cnt, NULL);
|
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
|
|
|
|
}
|
|
|
|
if (codec_name)
|
2004-10-02 20:27:03 +00:00
|
|
|
*codec_name = g_strdup ("Microsoft RLE");
|
|
|
|
break;
|
|
|
|
|
2010-01-23 12:50:09 +00:00
|
|
|
case GST_MAKE_FOURCC ('A', 'A', 'S', 'C'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-aasc", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Autodesk Animator");
|
|
|
|
break;
|
|
|
|
|
2004-10-02 20:27:03 +00:00
|
|
|
case GST_MAKE_FOURCC ('X', 'x', 'a', 'n'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-xan",
|
|
|
|
"wcversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Xan Wing Commander 4");
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
break;
|
|
|
|
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('R', 'T', '2', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-indeo",
|
|
|
|
"indeoversion", G_TYPE_INT, 2, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Intel Video 2");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('I', 'V', '3', '1'):
|
2005-10-17 16:14:29 +00:00
|
|
|
case GST_MAKE_FOURCC ('I', 'V', '3', '2'):
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('i', 'v', '3', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('i', 'v', '3', '2'):
|
2005-10-17 16:14:29 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-indeo",
|
|
|
|
"indeoversion", G_TYPE_INT, 3, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Intel Video 3");
|
|
|
|
break;
|
|
|
|
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('I', 'V', '4', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('i', 'v', '4', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-indeo",
|
|
|
|
"indeoversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Intel Video 4");
|
|
|
|
break;
|
|
|
|
|
2004-12-01 20:42:01 +00:00
|
|
|
case GST_MAKE_FOURCC ('I', 'V', '5', '0'):
|
2005-12-19 15:00:38 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-indeo",
|
|
|
|
"indeoversion", G_TYPE_INT, 5, NULL);
|
2004-12-01 20:42:01 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Intel Video 5");
|
|
|
|
break;
|
|
|
|
|
2005-12-19 15:00:38 +00:00
|
|
|
case GST_MAKE_FOURCC ('M', 'S', 'Z', 'H'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-mszh", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Lossless MSZH Video");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('Z', 'L', 'I', 'B'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-zlib", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Lossless zlib video");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('C', 'L', 'J', 'R'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('c', 'l', 'j', 'r'):
|
2005-12-19 15:00:38 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-cirrus-logic-accupak", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Cirrus Logipak AccuPak");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('C', 'Y', 'U', 'V'):
|
|
|
|
case GST_MAKE_FOURCC ('c', 'y', 'u', 'v'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-compressed-yuv", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("CYUV Lossless");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('D', 'U', 'C', 'K'):
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('P', 'V', 'E', 'Z'):
|
2005-12-19 15:00:38 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-truemotion",
|
|
|
|
"trueversion", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Duck Truemotion1");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('T', 'M', '2', '0'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-truemotion",
|
|
|
|
"trueversion", G_TYPE_INT, 2, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("TrueMotion 2.0");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('V', 'P', '3', '0'):
|
|
|
|
case GST_MAKE_FOURCC ('v', 'p', '3', '0'):
|
|
|
|
case GST_MAKE_FOURCC ('V', 'P', '3', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('v', 'p', '3', '1'):
|
|
|
|
case GST_MAKE_FOURCC ('V', 'P', '3', ' '):
|
|
|
|
caps = gst_caps_new_simple ("video/x-vp3", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("VP3");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('U', 'L', 'T', 'I'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-ultimotion", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("IBM UltiMotion");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('T', 'S', 'C', 'C'):
|
2007-01-22 09:23:01 +00:00
|
|
|
case GST_MAKE_FOURCC ('t', 's', 'c', 'c'):{
|
|
|
|
if (strf) {
|
2007-01-22 10:27:26 +00:00
|
|
|
gint depth = (strf->bit_cnt != 0) ? (gint) strf->bit_cnt : 24;
|
2007-01-22 09:23:01 +00:00
|
|
|
|
2007-01-22 10:27:26 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-camtasia", "depth", G_TYPE_INT,
|
|
|
|
depth, NULL);
|
2007-01-22 09:23:01 +00:00
|
|
|
} else {
|
|
|
|
/* template caps */
|
|
|
|
caps = gst_caps_new_simple ("video/x-camtasia", NULL);
|
|
|
|
}
|
2005-12-19 15:00:38 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("TechSmith Camtasia");
|
|
|
|
break;
|
2007-01-22 09:23:01 +00:00
|
|
|
}
|
2005-12-19 15:00:38 +00:00
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('V', 'C', 'R', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-ati-vcr",
|
|
|
|
"vcrversion", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("ATI VCR 1");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('V', 'C', 'R', '2'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-ati-vcr",
|
|
|
|
"vcrversion", G_TYPE_INT, 2, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("ATI VCR 2");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('A', 'S', 'V', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-asus",
|
|
|
|
"asusversion", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Asus Video 1");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('A', 'S', 'V', '2'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-asus",
|
|
|
|
"asusversion", G_TYPE_INT, 2, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Asus Video 2");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_MAKE_FOURCC ('M', 'P', 'N', 'G'):
|
|
|
|
case GST_MAKE_FOURCC ('m', 'p', 'n', 'g'):
|
|
|
|
case GST_MAKE_FOURCC ('P', 'N', 'G', ' '):
|
|
|
|
caps = gst_caps_new_simple ("image/png", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("PNG image");
|
|
|
|
break;
|
|
|
|
|
2006-02-10 10:53:33 +00:00
|
|
|
case GST_MAKE_FOURCC ('F', 'L', 'V', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-flash-video",
|
|
|
|
"flvversion", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Flash Video 1");
|
|
|
|
break;
|
|
|
|
|
2006-03-15 17:59:05 +00:00
|
|
|
case GST_MAKE_FOURCC ('V', 'M', 'n', 'c'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-vmnc",
|
|
|
|
"version", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("VMWare NC Video");
|
|
|
|
break;
|
|
|
|
|
2006-11-14 23:34:19 +00:00
|
|
|
case GST_MAKE_FOURCC ('d', 'r', 'a', 'c'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-dirac", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Dirac");
|
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_RIFF_rpza:
|
|
|
|
case GST_RIFF_azpr:
|
|
|
|
case GST_MAKE_FOURCC ('R', 'P', 'Z', 'A'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-apple-video", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Apple Video (RPZA)");
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
2008-10-08 09:22:26 +00:00
|
|
|
case GST_MAKE_FOURCC ('F', 'F', 'V', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-ffv",
|
|
|
|
"ffvversion", G_TYPE_INT, 1, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("FFmpeg lossless video codec");
|
|
|
|
break;
|
|
|
|
|
2008-10-15 15:28:41 +00:00
|
|
|
case GST_MAKE_FOURCC ('K', 'M', 'V', 'C'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-kmvc", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Karl Morton's video codec");
|
|
|
|
break;
|
|
|
|
|
2008-12-12 07:15:22 +00:00
|
|
|
case GST_MAKE_FOURCC ('v', 'p', '6', '0'):
|
|
|
|
case GST_MAKE_FOURCC ('V', 'P', '6', '0'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-vp6", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("On2 VP6");
|
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_MAKE_FOURCC ('L', 'M', '2', '0'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-mimic", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Mimic webcam");
|
|
|
|
break;
|
|
|
|
|
2009-03-06 17:53:17 +00:00
|
|
|
case GST_MAKE_FOURCC ('T', 'H', 'E', 'O'):
|
|
|
|
case GST_MAKE_FOURCC ('t', 'h', 'e', 'o'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-theora", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Theora video codec");
|
|
|
|
|
|
|
|
break;
|
2009-02-28 11:41:28 +00:00
|
|
|
|
2009-03-09 09:03:13 +00:00
|
|
|
case GST_MAKE_FOURCC ('F', 'P', 'S', '1'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-fraps", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Fraps video");
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
2003-12-07 22:49:04 +00:00
|
|
|
default:
|
2005-11-21 13:32:36 +00:00
|
|
|
GST_WARNING ("Unknown video fourcc %" GST_FOURCC_FORMAT,
|
2004-03-15 19:32:28 +00:00
|
|
|
GST_FOURCC_ARGS (codec_fcc));
|
2003-12-22 01:47:09 +00:00
|
|
|
return NULL;
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
if (strh != NULL) {
|
Convert elements to use fractions for their framerate.
Original commit message from CVS:
* ext/libvisual/visual.c: (gst_visual_src_setcaps), (get_buffer),
(gst_visual_chain):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
* ext/theora/theoradec.c: (theora_handle_type_packet):
* ext/theora/theoraenc.c: (theora_enc_sink_setcaps),
(theora_enc_chain):
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
* gst-libs/gst/video/video.c: (gst_video_frame_rate):
* gst-libs/gst/video/video.h:
* gst/ffmpegcolorspace/avcodec.h:
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_caps_to_pixfmt):
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_set_caps):
* gst/videorate/gstvideorate.c: (gst_videorate_transformcaps),
(gst_videorate_setcaps), (gst_videorate_blank_data),
(gst_videorate_chain):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_videotestsrc_src_fixate), (gst_videotestsrc_getcaps),
(gst_videotestsrc_parse_caps), (gst_videotestsrc_setcaps),
(gst_videotestsrc_event), (gst_videotestsrc_create):
* gst/videotestsrc/gstvideotestsrc.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_get_times), (gst_ximagesink_init):
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
(gst_xvimagesink_setcaps), (gst_xvimagesink_change_state),
(gst_xvimagesink_get_times), (gst_xvimagesink_init):
* sys/xvimage/xvimagesink.h:
Convert elements to use fractions for their framerate.
V4L elements to come later tonight.
2005-11-22 16:08:37 +00:00
|
|
|
gst_caps_set_simple (caps, "framerate", GST_TYPE_FRACTION,
|
|
|
|
strh->rate, strh->scale, NULL);
|
2003-12-22 01:47:09 +00:00
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps,
|
Convert elements to use fractions for their framerate.
Original commit message from CVS:
* ext/libvisual/visual.c: (gst_visual_src_setcaps), (get_buffer),
(gst_visual_chain):
* ext/ogg/gstogmparse.c: (gst_ogm_parse_chain):
* ext/theora/theoradec.c: (theora_handle_type_packet):
* ext/theora/theoraenc.c: (theora_enc_sink_setcaps),
(theora_enc_chain):
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
* gst-libs/gst/video/video.c: (gst_video_frame_rate):
* gst-libs/gst/video/video.h:
* gst/ffmpegcolorspace/avcodec.h:
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_caps_to_pixfmt):
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:
(gst_ffmpegcsp_set_caps):
* gst/videorate/gstvideorate.c: (gst_videorate_transformcaps),
(gst_videorate_setcaps), (gst_videorate_blank_data),
(gst_videorate_chain):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_videotestsrc_src_fixate), (gst_videotestsrc_getcaps),
(gst_videotestsrc_parse_caps), (gst_videotestsrc_setcaps),
(gst_videotestsrc_event), (gst_videotestsrc_create):
* gst/videotestsrc/gstvideotestsrc.h:
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get),
(gst_ximagesink_setcaps), (gst_ximagesink_change_state),
(gst_ximagesink_get_times), (gst_ximagesink_init):
* sys/ximage/ximagesink.h:
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support),
(gst_xvimagesink_setcaps), (gst_xvimagesink_change_state),
(gst_xvimagesink_get_times), (gst_xvimagesink_init):
* sys/xvimage/xvimagesink.h:
Convert elements to use fractions for their framerate.
V4L elements to come later tonight.
2005-11-22 16:08:37 +00:00
|
|
|
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
|
2003-12-22 01:47:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (strf != NULL) {
|
|
|
|
gst_caps_set_simple (caps,
|
2004-03-15 19:32:28 +00:00
|
|
|
"width", G_TYPE_INT, strf->width,
|
|
|
|
"height", G_TYPE_INT, strf->height, NULL);
|
2003-12-22 01:47:09 +00:00
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps,
|
2004-03-15 19:32:28 +00:00
|
|
|
"width", GST_TYPE_INT_RANGE, 16, 4096,
|
|
|
|
"height", GST_TYPE_INT_RANGE, 16, 4096, NULL);
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
2004-10-01 10:50:57 +00:00
|
|
|
/* extradata */
|
|
|
|
if (strf_data || strd_data) {
|
2009-03-06 17:53:17 +00:00
|
|
|
GstBuffer *codec_data;
|
|
|
|
|
|
|
|
codec_data = strf_data ? strf_data : strd_data;
|
|
|
|
|
|
|
|
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
|
2004-10-01 10:50:57 +00:00
|
|
|
}
|
|
|
|
|
2004-10-02 14:10:19 +00:00
|
|
|
/* palette */
|
2006-03-08 09:37:12 +00:00
|
|
|
if (palette) {
|
|
|
|
GstBuffer *copy;
|
|
|
|
guint num_colors;
|
|
|
|
|
|
|
|
if (strf != NULL)
|
|
|
|
num_colors = strf->num_colors;
|
|
|
|
else
|
|
|
|
num_colors = 256;
|
|
|
|
|
2006-03-10 11:09:23 +00:00
|
|
|
if (GST_BUFFER_SIZE (palette) >= (num_colors * 4)) {
|
|
|
|
/* palette is always at least 256*4 bytes */
|
2006-03-14 15:13:04 +00:00
|
|
|
copy =
|
|
|
|
gst_buffer_new_and_alloc (MAX (GST_BUFFER_SIZE (palette), 256 * 4));
|
2006-03-10 11:09:23 +00:00
|
|
|
memcpy (GST_BUFFER_DATA (copy), GST_BUFFER_DATA (palette),
|
|
|
|
GST_BUFFER_SIZE (palette));
|
2004-10-02 14:10:19 +00:00
|
|
|
|
|
|
|
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
2007-01-16 19:37:55 +00:00
|
|
|
{
|
|
|
|
guint8 *data = GST_BUFFER_DATA (copy);
|
|
|
|
gint n;
|
|
|
|
|
|
|
|
/* own endianness */
|
|
|
|
for (n = 0; n < num_colors; n++) {
|
|
|
|
GST_WRITE_UINT32_BE (data, GST_READ_UINT32_LE (data));
|
|
|
|
data += sizeof (guint32);
|
|
|
|
}
|
|
|
|
}
|
2004-10-02 14:10:19 +00:00
|
|
|
#endif
|
2006-03-10 11:09:23 +00:00
|
|
|
gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, copy, NULL);
|
|
|
|
gst_buffer_unref (copy);
|
|
|
|
} else {
|
|
|
|
GST_WARNING ("Palette smaller than expected: broken file");
|
|
|
|
}
|
2004-10-02 14:10:19 +00:00
|
|
|
}
|
|
|
|
|
2003-12-07 22:49:04 +00:00
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
2006-02-16 19:18:46 +00:00
|
|
|
static const struct
|
|
|
|
{
|
|
|
|
const guint32 ms_mask;
|
|
|
|
const GstAudioChannelPosition gst_pos;
|
|
|
|
} layout_mapping[] = {
|
|
|
|
{
|
|
|
|
0x00001, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT}, {
|
|
|
|
0x00002, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT}, {
|
|
|
|
0x00004, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER}, {
|
|
|
|
0x00008, GST_AUDIO_CHANNEL_POSITION_LFE}, {
|
|
|
|
0x00010, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT}, {
|
|
|
|
0x00020, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT}, {
|
|
|
|
0x00040, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER}, {
|
|
|
|
0x00080, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER}, {
|
|
|
|
0x00100, GST_AUDIO_CHANNEL_POSITION_REAR_CENTER}, {
|
|
|
|
0x00200, GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT}, {
|
|
|
|
0x00400, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT}, {
|
|
|
|
0x00800, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_CENTER */
|
|
|
|
{
|
|
|
|
0x01000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_FRONT_LEFT */
|
|
|
|
{
|
|
|
|
0x02000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_FRONT_CENTER */
|
|
|
|
{
|
|
|
|
0x04000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_FRONT_RIGHT */
|
|
|
|
{
|
|
|
|
0x08000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_BACK_LEFT */
|
|
|
|
{
|
|
|
|
0x10000, GST_AUDIO_CHANNEL_POSITION_INVALID}, /* TOP_BACK_CENTER */
|
|
|
|
{
|
|
|
|
0x20000, GST_AUDIO_CHANNEL_POSITION_INVALID} /* TOP_BACK_RIGHT */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define MAX_CHANNEL_POSITIONS G_N_ELEMENTS (layout_mapping)
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
gst_riff_wavext_add_channel_layout (GstCaps * caps, guint32 layout)
|
|
|
|
{
|
|
|
|
GstAudioChannelPosition pos[MAX_CHANNEL_POSITIONS];
|
|
|
|
GstStructure *s;
|
|
|
|
gint num_channels, i, p;
|
|
|
|
|
|
|
|
s = gst_caps_get_structure (caps, 0);
|
|
|
|
if (!gst_structure_get_int (s, "channels", &num_channels))
|
|
|
|
g_return_val_if_reached (FALSE);
|
|
|
|
|
2007-10-28 11:53:36 +00:00
|
|
|
/* In theory this should be done for 1 and 2 channels too but
|
|
|
|
* apparently breaks too many things currently.
|
|
|
|
*/
|
|
|
|
if (num_channels <= 2 || num_channels > MAX_CHANNEL_POSITIONS) {
|
2006-02-16 19:18:46 +00:00
|
|
|
GST_DEBUG ("invalid number of channels: %d", num_channels);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
p = 0;
|
|
|
|
for (i = 0; i < MAX_CHANNEL_POSITIONS; ++i) {
|
|
|
|
if ((layout & layout_mapping[i].ms_mask) != 0) {
|
|
|
|
if (p >= num_channels) {
|
|
|
|
GST_WARNING ("More bits set in the channel layout map than there "
|
|
|
|
"are channels! Broken file");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
if (layout_mapping[i].gst_pos == GST_AUDIO_CHANNEL_POSITION_INVALID) {
|
|
|
|
GST_WARNING ("Unsupported channel position (mask 0x%08x) in channel "
|
|
|
|
"layout map - ignoring those channels", layout_mapping[i].ms_mask);
|
|
|
|
/* what to do? just ignore it and let downstream deal with a channel
|
|
|
|
* layout that has INVALID positions in it for now ... */
|
|
|
|
}
|
|
|
|
pos[p] = layout_mapping[i].gst_pos;
|
|
|
|
++p;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (p != num_channels) {
|
|
|
|
GST_WARNING ("Only %d bits set in the channel layout map, but there are "
|
|
|
|
"supposed to be %d channels! Broken file", p, num_channels);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_audio_set_channel_positions (s, pos);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2007-10-28 11:53:36 +00:00
|
|
|
static gboolean
|
|
|
|
gst_riff_wave_add_default_channel_layout (GstCaps * caps)
|
|
|
|
{
|
|
|
|
GstAudioChannelPosition pos[8] = { GST_AUDIO_CHANNEL_POSITION_NONE, };
|
|
|
|
GstStructure *s;
|
|
|
|
gint nchannels;
|
|
|
|
|
|
|
|
s = gst_caps_get_structure (caps, 0);
|
|
|
|
|
|
|
|
if (!gst_structure_get_int (s, "channels", &nchannels))
|
|
|
|
g_return_val_if_reached (FALSE);
|
|
|
|
|
|
|
|
if (nchannels > 8) {
|
|
|
|
GST_DEBUG ("invalid number of channels: %d", nchannels);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This uses the default channel mapping from ALSA which
|
|
|
|
* is used in quite a few surround test files and seems to be
|
|
|
|
* the defacto standard. The channel mapping from
|
|
|
|
* WAVE_FORMAT_EXTENSIBLE doesn't seem to be used in normal
|
|
|
|
* wav files like chan-id.wav.
|
|
|
|
* http://bugzilla.gnome.org/show_bug.cgi?id=489010
|
|
|
|
*/
|
|
|
|
switch (nchannels) {
|
|
|
|
case 1:
|
|
|
|
pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_MONO;
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
pos[7] = GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT;
|
|
|
|
pos[6] = GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT;
|
|
|
|
/* fall through */
|
|
|
|
case 6:
|
|
|
|
pos[5] = GST_AUDIO_CHANNEL_POSITION_LFE;
|
|
|
|
/* fall through */
|
|
|
|
case 5:
|
|
|
|
pos[4] = GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER;
|
|
|
|
/* fall through */
|
|
|
|
case 4:
|
|
|
|
pos[3] = GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT;
|
|
|
|
pos[2] = GST_AUDIO_CHANNEL_POSITION_REAR_LEFT;
|
|
|
|
/* fall through */
|
|
|
|
case 2:
|
|
|
|
pos[1] = GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT;
|
|
|
|
pos[0] = GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_audio_set_channel_positions (s, pos);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static guint32
|
|
|
|
gst_riff_wavext_get_default_channel_mask (guint nchannels)
|
|
|
|
{
|
|
|
|
guint32 channel_mask = 0;
|
|
|
|
|
|
|
|
/* Set the default channel mask for the given number of channels.
|
|
|
|
* http://www.microsoft.com/whdc/device/audio/multichaud.mspx
|
|
|
|
*/
|
|
|
|
switch (nchannels) {
|
|
|
|
case 11:
|
|
|
|
channel_mask |= 0x00400;
|
|
|
|
channel_mask |= 0x00200;
|
|
|
|
case 9:
|
|
|
|
channel_mask |= 0x00100;
|
|
|
|
case 8:
|
|
|
|
channel_mask |= 0x00080;
|
|
|
|
channel_mask |= 0x00040;
|
|
|
|
case 6:
|
|
|
|
channel_mask |= 0x00020;
|
|
|
|
channel_mask |= 0x00010;
|
|
|
|
case 4:
|
|
|
|
channel_mask |= 0x00008;
|
|
|
|
case 3:
|
|
|
|
channel_mask |= 0x00004;
|
|
|
|
case 2:
|
|
|
|
channel_mask |= 0x00002;
|
|
|
|
channel_mask |= 0x00001;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return channel_mask;
|
|
|
|
}
|
|
|
|
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
GstCaps *
|
2005-06-30 08:59:30 +00:00
|
|
|
gst_riff_create_audio_caps (guint16 codec_id,
|
2004-07-13 10:24:29 +00:00
|
|
|
gst_riff_strh * strh, gst_riff_strf_auds * strf,
|
|
|
|
GstBuffer * strf_data, GstBuffer * strd_data, char **codec_name)
|
2003-12-07 22:49:04 +00:00
|
|
|
{
|
2004-07-13 10:24:29 +00:00
|
|
|
gboolean block_align = FALSE, rate_chan = TRUE;
|
2003-12-07 22:49:04 +00:00
|
|
|
GstCaps *caps = NULL;
|
2007-06-19 09:34:35 +00:00
|
|
|
gint rate_min = 1000, rate_max = 96000;
|
2004-07-12 11:41:51 +00:00
|
|
|
gint channels_max = 2;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
|
|
|
switch (codec_id) {
|
2004-04-11 19:33:55 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_PCM: /* PCM */
|
2008-12-09 18:30:10 +00:00
|
|
|
rate_max = 192000;
|
2007-04-17 02:04:21 +00:00
|
|
|
channels_max = 8;
|
|
|
|
|
2003-12-07 22:49:04 +00:00
|
|
|
if (strf != NULL) {
|
2004-07-20 21:06:35 +00:00
|
|
|
gint ba = strf->blockalign;
|
|
|
|
gint ch = strf->channels;
|
2007-12-17 00:01:00 +00:00
|
|
|
gint wd, ws;
|
|
|
|
|
|
|
|
/* If we have an empty blockalign, we take the width contained in
|
|
|
|
* strf->size */
|
|
|
|
if (ba != 0)
|
|
|
|
wd = ba * 8 / ch;
|
|
|
|
else
|
|
|
|
wd = strf->size;
|
2007-04-13 06:17:45 +00:00
|
|
|
|
|
|
|
if (strf->size > 32) {
|
|
|
|
GST_WARNING ("invalid depth (%d) of pcm audio, overwriting.",
|
|
|
|
strf->size);
|
2007-12-10 15:13:55 +00:00
|
|
|
strf->size = 8 * ((wd + 7) / 8);
|
2007-04-13 06:17:45 +00:00
|
|
|
}
|
2007-12-17 00:01:00 +00:00
|
|
|
|
2007-05-31 17:08:58 +00:00
|
|
|
/* in riff, the depth is stored in the size field but it just means that
|
|
|
|
* the _least_ significant bits are cleared. We can therefore just play
|
|
|
|
* the sample as if it had a depth == width */
|
|
|
|
/* For reference, the actual depth is in strf->size */
|
|
|
|
ws = wd;
|
2004-03-15 19:32:28 +00:00
|
|
|
|
2006-09-23 08:51:14 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-raw-int",
|
|
|
|
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
|
|
|
"channels", G_TYPE_INT, ch,
|
2007-03-29 12:07:02 +00:00
|
|
|
"width", G_TYPE_INT, wd,
|
|
|
|
"depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, wd != 8, NULL);
|
2006-02-16 20:19:51 +00:00
|
|
|
|
2007-10-28 11:53:36 +00:00
|
|
|
/* Add default channel layout. In theory this should be done
|
|
|
|
* for 1 and 2 channels too but apparently breaks too many
|
|
|
|
* things currently. Also we know no default layout for more than
|
|
|
|
* 8 channels. */
|
2006-02-16 20:19:51 +00:00
|
|
|
if (ch > 2) {
|
2007-10-28 11:53:36 +00:00
|
|
|
if (ch > 8)
|
|
|
|
GST_WARNING ("don't know default layout for %d channels", ch);
|
|
|
|
else if (gst_riff_wave_add_default_channel_layout (caps))
|
2006-02-16 20:19:51 +00:00
|
|
|
GST_DEBUG ("using default channel layout for %d channels", ch);
|
2007-10-28 11:53:36 +00:00
|
|
|
else
|
|
|
|
GST_WARNING ("failed to add channel layout");
|
2006-02-16 20:19:51 +00:00
|
|
|
}
|
2003-12-07 22:49:04 +00:00
|
|
|
} else {
|
2006-02-16 19:18:46 +00:00
|
|
|
/* FIXME: this is pretty useless - we need fixed caps */
|
2004-03-15 19:32:28 +00:00
|
|
|
caps = gst_caps_from_string ("audio/x-raw-int, "
|
|
|
|
"endianness = (int) LITTLE_ENDIAN, "
|
|
|
|
"signed = (boolean) { true, false }, "
|
2007-04-17 02:53:16 +00:00
|
|
|
"width = (int) { 8, 16, 24, 32 }, " "depth = (int) [ 1, 32 ]");
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
2005-08-08 16:58:29 +00:00
|
|
|
if (codec_name && strf)
|
|
|
|
*codec_name = g_strdup_printf ("Uncompressed %d-bit PCM audio",
|
|
|
|
strf->size);
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_ADPCM:
|
|
|
|
caps = gst_caps_new_simple ("audio/x-adpcm",
|
|
|
|
"layout", G_TYPE_STRING, "microsoft", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("ADPCM audio");
|
2004-05-09 15:49:25 +00:00
|
|
|
block_align = TRUE;
|
|
|
|
break;
|
|
|
|
|
2007-03-30 17:05:23 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_IEEE_FLOAT:
|
2008-12-09 18:30:10 +00:00
|
|
|
rate_max = 192000;
|
2007-04-17 02:04:21 +00:00
|
|
|
channels_max = 8;
|
|
|
|
|
2007-03-30 17:05:23 +00:00
|
|
|
if (strf != NULL) {
|
|
|
|
gint ba = strf->blockalign;
|
|
|
|
gint ch = strf->channels;
|
|
|
|
gint wd = ba * 8 / ch;
|
|
|
|
|
|
|
|
caps = gst_caps_new_simple ("audio/x-raw-float",
|
|
|
|
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
|
|
|
"channels", G_TYPE_INT, ch, "width", G_TYPE_INT, wd, NULL);
|
|
|
|
|
2007-10-28 11:53:36 +00:00
|
|
|
/* Add default channel layout. In theory this should be done
|
|
|
|
* for 1 and 2 channels too but apparently breaks too many
|
|
|
|
* things currently. Also we know no default layout for more than
|
|
|
|
* 8 channels. */
|
2007-03-30 17:05:23 +00:00
|
|
|
if (ch > 2) {
|
2007-10-28 11:53:36 +00:00
|
|
|
if (ch > 8)
|
|
|
|
GST_WARNING ("don't know default layout for %d channels", ch);
|
|
|
|
else if (gst_riff_wave_add_default_channel_layout (caps))
|
2007-03-30 17:05:23 +00:00
|
|
|
GST_DEBUG ("using default channel layout for %d channels", ch);
|
2007-10-28 11:53:36 +00:00
|
|
|
else
|
|
|
|
GST_WARNING ("failed to add channel layout");
|
2007-03-30 17:05:23 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* FIXME: this is pretty useless - we need fixed caps */
|
|
|
|
caps = gst_caps_from_string ("audio/x-raw-float, "
|
|
|
|
"endianness = (int) LITTLE_ENDIAN, " "width = (int) { 32, 64 }");
|
|
|
|
}
|
|
|
|
if (codec_name && strf)
|
|
|
|
*codec_name = g_strdup_printf ("Uncompressed %d-bit IEEE float audio",
|
|
|
|
strf->size);
|
|
|
|
break;
|
|
|
|
|
2006-09-19 10:23:03 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_IBM_CVSD:
|
|
|
|
goto unknown;
|
|
|
|
|
|
|
|
case GST_RIFF_WAVE_FORMAT_ALAW:
|
|
|
|
if (strf != NULL) {
|
|
|
|
if (strf->size != 8) {
|
|
|
|
GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.",
|
|
|
|
strf->size);
|
|
|
|
strf->size = 8;
|
2008-05-21 14:35:41 +00:00
|
|
|
strf->blockalign = (strf->size * strf->channels) / 8;
|
|
|
|
strf->av_bps = strf->blockalign * strf->rate;
|
2006-09-19 10:23:03 +00:00
|
|
|
}
|
|
|
|
if (strf->av_bps == 0 || strf->blockalign == 0) {
|
|
|
|
GST_WARNING ("fixing av_bps (%d) and blockalign (%d) of alaw audio",
|
|
|
|
strf->av_bps, strf->blockalign);
|
2008-05-21 14:35:41 +00:00
|
|
|
strf->blockalign = (strf->size * strf->channels) / 8;
|
|
|
|
strf->av_bps = strf->blockalign * strf->rate;
|
2006-09-19 10:23:03 +00:00
|
|
|
}
|
|
|
|
}
|
2007-04-13 06:17:45 +00:00
|
|
|
rate_max = 48000;
|
2006-09-19 10:23:03 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-alaw", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("A-law audio");
|
|
|
|
break;
|
|
|
|
|
2006-10-10 16:50:06 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_WMS:
|
|
|
|
caps = gst_caps_new_simple ("audio/x-wms", NULL);
|
|
|
|
if (strf != NULL) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"bitrate", G_TYPE_INT, strf->av_bps * 8,
|
|
|
|
"width", G_TYPE_INT, strf->size,
|
|
|
|
"depth", G_TYPE_INT, strf->size, NULL);
|
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
|
|
|
|
}
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Windows Media Audio Speech");
|
|
|
|
block_align = TRUE;
|
|
|
|
break;
|
|
|
|
|
2006-09-19 10:23:03 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_MULAW:
|
|
|
|
if (strf != NULL) {
|
|
|
|
if (strf->size != 8) {
|
|
|
|
GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.",
|
|
|
|
strf->size);
|
|
|
|
strf->size = 8;
|
2008-05-21 14:35:41 +00:00
|
|
|
strf->blockalign = (strf->size * strf->channels) / 8;
|
|
|
|
strf->av_bps = strf->blockalign * strf->rate;
|
2006-09-19 10:23:03 +00:00
|
|
|
}
|
|
|
|
if (strf->av_bps == 0 || strf->blockalign == 0) {
|
|
|
|
GST_WARNING ("fixing av_bps (%d) and blockalign (%d) of mulaw audio",
|
|
|
|
strf->av_bps, strf->blockalign);
|
2008-05-21 14:35:41 +00:00
|
|
|
strf->blockalign = (strf->size * strf->channels) / 8;
|
|
|
|
strf->av_bps = strf->blockalign * strf->rate;
|
2006-09-19 10:23:03 +00:00
|
|
|
}
|
|
|
|
}
|
2007-04-13 06:17:45 +00:00
|
|
|
rate_max = 48000;
|
2006-09-19 10:23:03 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-mulaw", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Mu-law audio");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_RIFF_WAVE_FORMAT_OKI_ADPCM:
|
|
|
|
goto unknown;
|
|
|
|
|
2004-05-09 15:49:25 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_DVI_ADPCM:
|
2007-04-13 06:17:45 +00:00
|
|
|
rate_max = 48000;
|
2004-05-09 15:49:25 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-adpcm",
|
|
|
|
"layout", G_TYPE_STRING, "dvi", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("DVI ADPCM audio");
|
|
|
|
block_align = TRUE;
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
break;
|
|
|
|
|
2008-09-03 13:27:20 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_DSP_TRUESPEECH:
|
|
|
|
rate_min = 8000;
|
|
|
|
rate_max = 8000;
|
2008-09-03 14:00:06 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-truespeech", NULL);
|
2008-09-03 13:27:20 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("DSP Group TrueSpeech");
|
|
|
|
break;
|
|
|
|
|
2006-09-19 10:23:03 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_GSM610:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_MSN:
|
2008-03-31 16:08:45 +00:00
|
|
|
rate_min = 1;
|
2006-09-19 10:23:03 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/ms-gsm", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2006-09-19 10:23:03 +00:00
|
|
|
*codec_name = g_strdup ("MS GSM audio");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2006-09-19 10:23:03 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */
|
2007-04-13 06:17:45 +00:00
|
|
|
rate_min = 16000;
|
|
|
|
rate_max = 48000;
|
2006-09-19 10:23:03 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2006-09-19 10:23:03 +00:00
|
|
|
*codec_name = g_strdup ("MPEG-1 layer 2");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */
|
2007-05-22 11:40:31 +00:00
|
|
|
rate_min = 8000;
|
2007-04-13 06:17:45 +00:00
|
|
|
rate_max = 48000;
|
2006-09-19 10:23:03 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("MPEG-1 layer 3");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_AMR_NB: /* amr-nb */
|
|
|
|
rate_min = 8000;
|
|
|
|
rate_max = 8000;
|
|
|
|
channels_max = 1;
|
|
|
|
caps = gst_caps_new_simple ("audio/AMR", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("AMR Narrow Band (NB)");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_RIFF_WAVE_FORMAT_AMR_WB: /* amr-wb */
|
|
|
|
rate_min = 16000;
|
|
|
|
rate_max = 16000;
|
|
|
|
channels_max = 1;
|
|
|
|
caps = gst_caps_new_simple ("audio/AMR-WB", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("AMR Wide Band (WB)");
|
|
|
|
break;
|
|
|
|
|
2004-03-15 19:32:28 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VORBIS2: /* ogg/vorbis mode 2 */
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VORBIS3: /* ogg/vorbis mode 3 */
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* ogg/vorbis mode 1+ */
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* ogg/vorbis mode 2+ */
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* ogg/vorbis mode 3+ */
|
2008-12-09 18:30:10 +00:00
|
|
|
rate_max = 192000;
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-vorbis", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Vorbis");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case GST_RIFF_WAVE_FORMAT_A52:
|
2004-07-12 11:41:51 +00:00
|
|
|
channels_max = 6;
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-ac3", NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2005-08-08 16:58:29 +00:00
|
|
|
*codec_name = g_strdup ("AC-3 audio");
|
2003-12-07 22:49:04 +00:00
|
|
|
break;
|
2006-08-07 08:26:03 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_DTS:
|
|
|
|
channels_max = 6;
|
|
|
|
caps = gst_caps_new_simple ("audio/x-dts", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("DTS audio");
|
2007-05-24 15:16:59 +00:00
|
|
|
/* wavparse is not always able to specify rate/channels for DTS-in-wav */
|
|
|
|
rate_chan = FALSE;
|
2006-08-07 08:26:03 +00:00
|
|
|
break;
|
2006-09-23 08:51:14 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_AAC:
|
2009-01-23 10:33:29 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_AAC_AC:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_AAC_pm:
|
2006-09-23 08:51:14 +00:00
|
|
|
{
|
|
|
|
channels_max = 8;
|
|
|
|
caps = gst_caps_new_simple ("audio/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("MPEG-4 AAC audio");
|
|
|
|
break;
|
|
|
|
}
|
2004-07-13 10:24:29 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_WMAV1:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_WMAV2:
|
2004-10-01 10:50:57 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_WMAV3:
|
2008-11-20 21:20:27 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_WMAV3_L:
|
2004-07-13 10:24:29 +00:00
|
|
|
{
|
2004-10-01 10:50:57 +00:00
|
|
|
gint version = (codec_id - GST_RIFF_WAVE_FORMAT_WMAV1) + 1;
|
2004-07-13 10:24:29 +00:00
|
|
|
|
2004-10-30 06:44:03 +00:00
|
|
|
channels_max = 6;
|
2004-07-13 10:24:29 +00:00
|
|
|
block_align = TRUE;
|
|
|
|
|
|
|
|
caps = gst_caps_new_simple ("audio/x-wma",
|
|
|
|
"wmaversion", G_TYPE_INT, version, NULL);
|
|
|
|
|
2008-11-20 21:20:27 +00:00
|
|
|
if (codec_name) {
|
|
|
|
if (codec_id == GST_RIFF_WAVE_FORMAT_WMAV3_L)
|
|
|
|
*codec_name = g_strdup ("WMA Lossless");
|
|
|
|
else
|
|
|
|
*codec_name = g_strdup_printf ("WMA Version %d", version + 6);
|
|
|
|
}
|
2003-12-07 22:49:04 +00:00
|
|
|
|
2004-07-13 10:24:29 +00:00
|
|
|
if (strf != NULL) {
|
|
|
|
gst_caps_set_simple (caps,
|
2006-03-06 14:14:47 +00:00
|
|
|
"bitrate", G_TYPE_INT, strf->av_bps * 8,
|
|
|
|
"depth", G_TYPE_INT, strf->size, NULL);
|
2004-07-13 10:24:29 +00:00
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2004-10-06 14:18:13 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_SONY_ATRAC3:
|
|
|
|
caps = gst_caps_new_simple ("audio/x-vnd.sony.atrac3", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Sony ATRAC3");
|
|
|
|
break;
|
|
|
|
|
2009-07-13 16:21:49 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_SIREN:
|
|
|
|
caps = gst_caps_new_simple ("audio/x-siren", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Siren7");
|
|
|
|
rate_chan = FALSE;
|
|
|
|
break;
|
|
|
|
|
2008-06-30 09:20:59 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK4:
|
|
|
|
rate_min = 8000;
|
|
|
|
rate_max = 96000;
|
|
|
|
channels_max = 2;
|
|
|
|
caps =
|
|
|
|
gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, "dk4",
|
|
|
|
NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("IMA/DK4 ADPCM");
|
|
|
|
break;
|
|
|
|
case GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK3:
|
|
|
|
rate_min = 8000;
|
|
|
|
rate_max = 96000;
|
|
|
|
channels_max = 2;
|
|
|
|
caps =
|
|
|
|
gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, "dk3",
|
|
|
|
NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("IMA/DK3 ADPCM");
|
|
|
|
break;
|
|
|
|
|
2009-02-28 11:41:28 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_ADPCM_IMA_WAV:
|
|
|
|
rate_min = 8000;
|
|
|
|
rate_max = 96000;
|
|
|
|
channels_max = 2;
|
|
|
|
caps =
|
|
|
|
gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, "dvi",
|
|
|
|
NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("IMA/WAV ADPCM");
|
|
|
|
break;
|
2006-02-16 19:18:46 +00:00
|
|
|
case GST_RIFF_WAVE_FORMAT_EXTENSIBLE:{
|
|
|
|
guint16 valid_bits_per_sample;
|
|
|
|
guint32 channel_mask;
|
|
|
|
guint32 subformat_guid[4];
|
|
|
|
const guint8 *data;
|
|
|
|
|
2007-04-17 01:56:07 +00:00
|
|
|
channels_max = 8;
|
|
|
|
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
/* should be at least 22 bytes */
|
|
|
|
if (strf_data == NULL || GST_BUFFER_SIZE (strf_data) < 22) {
|
2006-02-16 19:18:46 +00:00
|
|
|
GST_WARNING ("WAVE_FORMAT_EXTENSIBLE data size is %d (expected: 22)",
|
2006-04-29 16:25:58 +00:00
|
|
|
(strf_data) ? GST_BUFFER_SIZE (strf_data) : -1);
|
2006-02-16 19:18:46 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
data = GST_BUFFER_DATA (strf_data);
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
|
2006-02-16 19:18:46 +00:00
|
|
|
valid_bits_per_sample = GST_READ_UINT16_LE (data);
|
|
|
|
channel_mask = GST_READ_UINT32_LE (data + 2);
|
|
|
|
subformat_guid[0] = GST_READ_UINT32_LE (data + 6);
|
|
|
|
subformat_guid[1] = GST_READ_UINT32_LE (data + 10);
|
|
|
|
subformat_guid[2] = GST_READ_UINT32_LE (data + 14);
|
|
|
|
subformat_guid[3] = GST_READ_UINT32_LE (data + 18);
|
|
|
|
|
|
|
|
GST_DEBUG ("valid bps = %u", valid_bits_per_sample);
|
|
|
|
GST_DEBUG ("channel mask = 0x%08x", channel_mask);
|
|
|
|
GST_DEBUG ("GUID = %08x-%08x-%08x-%08x", subformat_guid[0],
|
|
|
|
subformat_guid[1], subformat_guid[2], subformat_guid[3]);
|
|
|
|
|
|
|
|
if (subformat_guid[1] == 0x00100000 &&
|
|
|
|
subformat_guid[2] == 0xaa000080 && subformat_guid[3] == 0x719b3800) {
|
|
|
|
if (subformat_guid[0] == 0x00000001) {
|
|
|
|
GST_DEBUG ("PCM");
|
|
|
|
if (strf != NULL) {
|
|
|
|
gint ba = strf->blockalign;
|
2007-04-17 01:56:07 +00:00
|
|
|
gint wd = ba * 8 / strf->channels;
|
2007-05-31 17:08:58 +00:00
|
|
|
gint ws;
|
2006-02-16 19:18:46 +00:00
|
|
|
|
2007-05-31 17:08:58 +00:00
|
|
|
/* in riff, the depth is stored in the size field but it just
|
|
|
|
* means that the _least_ significant bits are cleared. We can
|
|
|
|
* therefore just play the sample as if it had a depth == width */
|
|
|
|
ws = wd;
|
|
|
|
|
|
|
|
/* For reference, use this to get the actual depth:
|
|
|
|
* ws = strf->size;
|
|
|
|
* if (valid_bits_per_sample != 0)
|
|
|
|
* ws = valid_bits_per_sample; */
|
2006-02-16 19:18:46 +00:00
|
|
|
|
|
|
|
caps = gst_caps_new_simple ("audio/x-raw-int",
|
|
|
|
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
|
|
|
"channels", G_TYPE_INT, strf->channels,
|
2007-04-17 01:56:07 +00:00
|
|
|
"width", G_TYPE_INT, wd,
|
|
|
|
"depth", G_TYPE_INT, ws,
|
2006-02-16 19:18:46 +00:00
|
|
|
"rate", G_TYPE_INT, strf->rate,
|
2007-04-17 01:56:07 +00:00
|
|
|
"signed", G_TYPE_BOOLEAN, wd != 8, NULL);
|
|
|
|
|
2007-10-28 11:53:36 +00:00
|
|
|
/* If channel_mask == 0 and channels > 2 let's
|
2007-04-17 01:56:07 +00:00
|
|
|
* assume default layout as some wav files don't have the
|
2007-10-28 11:53:36 +00:00
|
|
|
* channel mask set. Don't set the layout for 1 or 2
|
|
|
|
* channels as it apparently breaks too many things currently. */
|
|
|
|
if (channel_mask == 0 && strf->channels > 2)
|
|
|
|
channel_mask =
|
|
|
|
gst_riff_wavext_get_default_channel_mask (strf->channels);
|
2006-02-16 19:18:46 +00:00
|
|
|
|
2007-04-17 01:56:07 +00:00
|
|
|
if ((channel_mask != 0 || strf->channels > 2) &&
|
|
|
|
!gst_riff_wavext_add_channel_layout (caps, channel_mask)) {
|
2006-02-16 19:18:46 +00:00
|
|
|
GST_WARNING ("failed to add channel layout");
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
caps = NULL;
|
|
|
|
}
|
|
|
|
rate_chan = FALSE;
|
2006-02-16 20:19:51 +00:00
|
|
|
|
|
|
|
if (codec_name) {
|
|
|
|
*codec_name = g_strdup_printf ("Uncompressed %d-bit PCM audio",
|
|
|
|
strf->size);
|
|
|
|
}
|
2006-02-16 19:18:46 +00:00
|
|
|
}
|
|
|
|
} else if (subformat_guid[0] == 0x00000003) {
|
2007-04-17 01:56:07 +00:00
|
|
|
GST_DEBUG ("FLOAT");
|
|
|
|
if (strf != NULL) {
|
|
|
|
gint ba = strf->blockalign;
|
|
|
|
gint wd = ba * 8 / strf->channels;
|
|
|
|
|
|
|
|
caps = gst_caps_new_simple ("audio/x-raw-float",
|
|
|
|
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
|
|
|
|
"channels", G_TYPE_INT, strf->channels,
|
|
|
|
"width", G_TYPE_INT, wd, "rate", G_TYPE_INT, strf->rate, NULL);
|
|
|
|
|
2007-10-28 11:53:36 +00:00
|
|
|
/* If channel_mask == 0 and channels > 2 let's
|
2007-04-17 01:56:07 +00:00
|
|
|
* assume default layout as some wav files don't have the
|
2007-10-28 11:53:36 +00:00
|
|
|
* channel mask set. Don't set the layout for 1 or 2
|
|
|
|
* channels as it apparently breaks too many things currently. */
|
|
|
|
if (channel_mask == 0 && strf->channels > 2)
|
|
|
|
channel_mask =
|
|
|
|
gst_riff_wavext_get_default_channel_mask (strf->channels);
|
2007-04-17 01:56:07 +00:00
|
|
|
|
|
|
|
if ((channel_mask != 0 || strf->channels > 2) &&
|
|
|
|
!gst_riff_wavext_add_channel_layout (caps, channel_mask)) {
|
|
|
|
GST_WARNING ("failed to add channel layout");
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
caps = NULL;
|
|
|
|
}
|
|
|
|
rate_chan = FALSE;
|
|
|
|
|
|
|
|
if (codec_name) {
|
|
|
|
*codec_name =
|
|
|
|
g_strdup_printf ("Uncompressed %d-bit IEEE float audio",
|
|
|
|
strf->size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (subformat_guid[0] == 00000006) {
|
|
|
|
GST_DEBUG ("ALAW");
|
|
|
|
if (strf != NULL) {
|
|
|
|
if (strf->size != 8) {
|
|
|
|
GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.",
|
|
|
|
strf->size);
|
|
|
|
strf->size = 8;
|
|
|
|
strf->av_bps = 8;
|
|
|
|
strf->blockalign = strf->av_bps * strf->channels;
|
|
|
|
}
|
|
|
|
if (strf->av_bps == 0 || strf->blockalign == 0) {
|
|
|
|
GST_WARNING
|
|
|
|
("fixing av_bps (%d) and blockalign (%d) of alaw audio",
|
|
|
|
strf->av_bps, strf->blockalign);
|
|
|
|
strf->av_bps = strf->size;
|
|
|
|
strf->blockalign = strf->av_bps * strf->channels;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rate_max = 48000;
|
|
|
|
caps = gst_caps_new_simple ("audio/x-alaw", NULL);
|
|
|
|
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("A-law audio");
|
|
|
|
} else if (subformat_guid[0] == 0x00000007) {
|
|
|
|
GST_DEBUG ("MULAW");
|
|
|
|
if (strf != NULL) {
|
|
|
|
if (strf->size != 8) {
|
|
|
|
GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.",
|
|
|
|
strf->size);
|
|
|
|
strf->size = 8;
|
|
|
|
strf->av_bps = 8;
|
|
|
|
strf->blockalign = strf->av_bps * strf->channels;
|
|
|
|
}
|
|
|
|
if (strf->av_bps == 0 || strf->blockalign == 0) {
|
|
|
|
GST_WARNING
|
|
|
|
("fixing av_bps (%d) and blockalign (%d) of mulaw audio",
|
|
|
|
strf->av_bps, strf->blockalign);
|
|
|
|
strf->av_bps = strf->size;
|
|
|
|
strf->blockalign = strf->av_bps * strf->channels;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rate_max = 48000;
|
|
|
|
caps = gst_caps_new_simple ("audio/x-mulaw", NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Mu-law audio");
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
} else if (subformat_guid[0] == 0x00000092) {
|
|
|
|
GST_DEBUG ("FIXME: handle DOLBY AC3 SPDIF format");
|
2006-02-16 19:18:46 +00:00
|
|
|
}
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
} else if (subformat_guid[0] == 0x6ba47966 &&
|
|
|
|
subformat_guid[1] == 0x41783f83 &&
|
|
|
|
subformat_guid[2] == 0xf0006596 && subformat_guid[3] == 0xe59262bf) {
|
|
|
|
caps = gst_caps_new_simple ("application/x-ogg-avi", NULL);
|
2006-09-23 08:51:14 +00:00
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Ogg-AVI");
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
}
|
2006-02-16 19:18:46 +00:00
|
|
|
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
if (caps == NULL) {
|
|
|
|
GST_WARNING ("Unknown WAVE_FORMAT_EXTENSIBLE audio format");
|
|
|
|
return NULL;
|
2006-02-16 19:18:46 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2006-08-22 15:50:36 +00:00
|
|
|
/* can anything decode these? pitfdll? */
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_AC8:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_AC10:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_AC16:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_AC20:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_METAVOICE:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_METASOUND:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_RT29HW:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_VR12:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_VR18:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_TQ40:
|
|
|
|
case GST_RIFF_WAVE_FORMAT_VOXWARE_TQ60:{
|
|
|
|
caps = gst_caps_new_simple ("audio/x-voxware",
|
|
|
|
"voxwaretype", G_TYPE_INT, (gint) codec_id, NULL);
|
|
|
|
if (codec_name)
|
|
|
|
*codec_name = g_strdup ("Voxware");
|
|
|
|
break;
|
|
|
|
}
|
2003-12-07 22:49:04 +00:00
|
|
|
default:
|
2006-09-19 10:23:03 +00:00
|
|
|
unknown:
|
2004-05-14 11:39:41 +00:00
|
|
|
GST_WARNING ("Unknown audio tag 0x%04x", codec_id);
|
2004-03-30 03:13:03 +00:00
|
|
|
return NULL;
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
if (strf != NULL) {
|
2004-07-13 10:24:29 +00:00
|
|
|
if (rate_chan) {
|
2007-04-13 06:17:45 +00:00
|
|
|
if (strf->channels > channels_max)
|
|
|
|
goto too_many_channels;
|
|
|
|
if (strf->rate < rate_min || strf->rate > rate_max)
|
|
|
|
goto invalid_rate;
|
|
|
|
|
2004-07-13 10:24:29 +00:00
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"rate", G_TYPE_INT, strf->rate,
|
|
|
|
"channels", G_TYPE_INT, strf->channels, NULL);
|
|
|
|
}
|
|
|
|
if (block_align) {
|
2004-05-09 15:49:25 +00:00
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"block_align", G_TYPE_INT, strf->blockalign, NULL);
|
2004-07-13 10:24:29 +00:00
|
|
|
}
|
2003-12-22 01:47:09 +00:00
|
|
|
} else {
|
2004-07-13 10:24:29 +00:00
|
|
|
if (rate_chan) {
|
2008-11-06 12:14:51 +00:00
|
|
|
if (rate_min == rate_max)
|
|
|
|
gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate_min, NULL);
|
|
|
|
else
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"rate", GST_TYPE_INT_RANGE, rate_min, rate_max, NULL);
|
|
|
|
if (channels_max == 1)
|
|
|
|
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
|
|
|
|
else
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"channels", GST_TYPE_INT_RANGE, 1, channels_max, NULL);
|
2004-07-13 10:24:29 +00:00
|
|
|
}
|
|
|
|
if (block_align) {
|
2004-05-09 15:49:25 +00:00
|
|
|
gst_caps_set_simple (caps,
|
2004-12-03 15:34:19 +00:00
|
|
|
"block_align", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
|
2004-07-13 10:24:29 +00:00
|
|
|
}
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
2004-10-01 10:50:57 +00:00
|
|
|
/* extradata */
|
|
|
|
if (strf_data || strd_data) {
|
|
|
|
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER,
|
|
|
|
strf_data ? strf_data : strd_data, NULL);
|
|
|
|
}
|
|
|
|
|
2003-12-07 22:49:04 +00:00
|
|
|
return caps;
|
2007-04-13 06:17:45 +00:00
|
|
|
|
|
|
|
/* ERROR */
|
|
|
|
too_many_channels:
|
|
|
|
GST_WARNING
|
2007-04-16 22:20:03 +00:00
|
|
|
("Stream claims to contain %u channels, but format only supports %d",
|
2007-04-13 06:17:45 +00:00
|
|
|
strf->channels, channels_max);
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
return NULL;
|
|
|
|
invalid_rate:
|
|
|
|
GST_WARNING
|
2007-04-16 22:20:03 +00:00
|
|
|
("Stream with sample_rate %u, but format only supports %d .. %d",
|
2007-04-13 06:17:45 +00:00
|
|
|
strf->rate, rate_min, rate_max);
|
|
|
|
gst_caps_unref (caps);
|
|
|
|
return NULL;
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GstCaps *
|
2004-03-14 22:34:34 +00:00
|
|
|
gst_riff_create_iavs_caps (guint32 codec_fcc,
|
2005-06-30 08:59:30 +00:00
|
|
|
gst_riff_strh * strh, gst_riff_strf_iavs * strf,
|
|
|
|
GstBuffer * init_data, GstBuffer * extra_data, char **codec_name)
|
2003-12-07 22:49:04 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
|
|
|
|
|
|
|
switch (codec_fcc) {
|
2004-03-14 22:34:34 +00:00
|
|
|
/* is this correct? */
|
|
|
|
case GST_MAKE_FOURCC ('D', 'V', 'S', 'D'):
|
|
|
|
case GST_MAKE_FOURCC ('d', 'v', 's', 'd'):
|
|
|
|
caps = gst_caps_new_simple ("video/x-dv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
|
gst/: First batch implementing audio and video codec tags in demuxers.
Original commit message from CVS:
2004-02-23 Julien MOUTTE <julien@moutte.net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps),
(gst_riff_create_audio_caps), (gst_riff_create_iavs_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps),
(gst_riff_create_iavs_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_base_init),
(gst_asf_demux_audio_caps), (gst_asf_demux_add_audio_stream),
(gst_asf_demux_video_caps), (gst_asf_demux_add_video_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps),
(gst_matroska_demux_plugin_init): First batch implementing audio and
video codec tags in demuxers.
2004-02-23 22:16:21 +00:00
|
|
|
if (codec_name)
|
2004-03-15 19:32:28 +00:00
|
|
|
*codec_name = g_strdup ("Generic DV");
|
2004-05-14 11:39:41 +00:00
|
|
|
break;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
|
|
|
default:
|
2005-11-21 13:32:36 +00:00
|
|
|
GST_WARNING ("Unknown IAVS fourcc %" GST_FOURCC_FORMAT,
|
2004-03-15 19:32:28 +00:00
|
|
|
GST_FOURCC_ARGS (codec_fcc));
|
2003-12-22 01:47:09 +00:00
|
|
|
return NULL;
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Functions below are for template caps. All is variable.
|
|
|
|
*/
|
|
|
|
|
|
|
|
GstCaps *
|
|
|
|
gst_riff_create_video_template_caps (void)
|
|
|
|
{
|
2006-08-22 15:11:52 +00:00
|
|
|
static const guint32 tags[] = {
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('3', 'I', 'V', '1'),
|
|
|
|
GST_MAKE_FOURCC ('A', 'S', 'V', '1'),
|
|
|
|
GST_MAKE_FOURCC ('A', 'S', 'V', '2'),
|
|
|
|
GST_MAKE_FOURCC ('C', 'L', 'J', 'R'),
|
|
|
|
GST_MAKE_FOURCC ('C', 'Y', 'U', 'V'),
|
|
|
|
GST_MAKE_FOURCC ('D', 'I', 'B', ' '),
|
2004-03-14 22:34:34 +00:00
|
|
|
GST_MAKE_FOURCC ('D', 'I', 'V', '3'),
|
|
|
|
GST_MAKE_FOURCC ('D', 'I', 'V', 'X'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('D', 'U', 'C', 'K'),
|
|
|
|
GST_MAKE_FOURCC ('D', 'V', 'S', 'D'),
|
2008-05-26 17:18:52 +00:00
|
|
|
GST_MAKE_FOURCC ('D', 'V', '5', '0'),
|
2004-07-12 11:41:51 +00:00
|
|
|
GST_MAKE_FOURCC ('D', 'X', '5', '0'),
|
2009-02-28 11:41:28 +00:00
|
|
|
GST_MAKE_FOURCC ('M', '4', 'C', 'C'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('F', 'L', 'V', '1'),
|
|
|
|
GST_MAKE_FOURCC ('H', '2', '6', '3'),
|
2009-02-28 11:41:28 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'X', '1', 'K'),
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_MAKE_FOURCC ('H', '2', '6', '4'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('H', 'F', 'Y', 'U'),
|
|
|
|
GST_MAKE_FOURCC ('I', '2', '6', '3'),
|
|
|
|
GST_MAKE_FOURCC ('I', '4', '2', '0'),
|
2005-10-17 16:14:29 +00:00
|
|
|
GST_MAKE_FOURCC ('I', 'V', '3', '2'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('I', 'V', '4', '1'),
|
2004-12-01 20:42:01 +00:00
|
|
|
GST_MAKE_FOURCC ('I', 'V', '5', '0'),
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_MAKE_FOURCC ('L', '2', '6', '3'),
|
2008-08-14 15:17:31 +00:00
|
|
|
GST_MAKE_FOURCC ('L', '2', '6', '4'),
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_MAKE_FOURCC ('M', '2', '6', '3'),
|
2005-08-08 16:58:29 +00:00
|
|
|
GST_MAKE_FOURCC ('M', '4', 'S', '2'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('M', 'J', 'P', 'G'),
|
|
|
|
GST_MAKE_FOURCC ('M', 'P', '4', '2'),
|
|
|
|
GST_MAKE_FOURCC ('M', 'P', '4', '3'),
|
|
|
|
GST_MAKE_FOURCC ('M', 'P', 'E', 'G'),
|
|
|
|
GST_MAKE_FOURCC ('M', 'P', 'G', '2'),
|
|
|
|
GST_MAKE_FOURCC ('M', 'P', 'G', '4'),
|
2005-12-19 15:00:38 +00:00
|
|
|
GST_MAKE_FOURCC ('M', 'S', 'Z', 'H'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('P', 'N', 'G', ' '),
|
|
|
|
GST_MAKE_FOURCC ('R', 'L', 'E', ' '),
|
2005-12-19 15:00:38 +00:00
|
|
|
GST_MAKE_FOURCC ('R', 'T', '2', '1'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('S', 'P', '5', '3'),
|
2005-12-19 15:00:38 +00:00
|
|
|
GST_MAKE_FOURCC ('T', 'M', '2', '0'),
|
|
|
|
GST_MAKE_FOURCC ('T', 'S', 'C', 'C'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('U', 'L', 'T', 'I'),
|
2009-05-07 21:07:44 +00:00
|
|
|
GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'C', 'R', '1'),
|
|
|
|
GST_MAKE_FOURCC ('V', 'C', 'R', '2'),
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'D', 'O', 'W'),
|
|
|
|
GST_MAKE_FOURCC ('V', 'I', 'V', 'O'),
|
2006-03-15 17:59:05 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'M', 'n', 'c'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'P', '3', ' '),
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'S', 'S', 'H'),
|
2006-07-18 19:48:48 +00:00
|
|
|
GST_MAKE_FOURCC ('W', 'M', 'V', '1'),
|
|
|
|
GST_MAKE_FOURCC ('W', 'M', 'V', '2'),
|
|
|
|
GST_MAKE_FOURCC ('W', 'M', 'V', '3'),
|
|
|
|
GST_MAKE_FOURCC ('X', 'V', 'I', 'D'),
|
|
|
|
GST_MAKE_FOURCC ('X', 'x', 'a', 'n'),
|
|
|
|
GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'),
|
|
|
|
GST_MAKE_FOURCC ('Y', 'V', 'U', '9'),
|
|
|
|
GST_MAKE_FOURCC ('Z', 'L', 'I', 'B'),
|
|
|
|
GST_MAKE_FOURCC ('c', 'v', 'i', 'd'),
|
|
|
|
GST_MAKE_FOURCC ('h', '2', '6', '4'),
|
2006-11-07 07:22:32 +00:00
|
|
|
GST_MAKE_FOURCC ('m', 's', 'v', 'c'),
|
2008-02-29 00:04:57 +00:00
|
|
|
GST_MAKE_FOURCC ('x', '2', '6', '3'),
|
2008-10-08 09:22:26 +00:00
|
|
|
GST_MAKE_FOURCC ('d', 'r', 'a', 'c'),
|
2008-10-15 15:28:41 +00:00
|
|
|
GST_MAKE_FOURCC ('F', 'F', 'V', '1'),
|
|
|
|
GST_MAKE_FOURCC ('K', 'M', 'V', 'C'),
|
2008-12-12 07:15:22 +00:00
|
|
|
GST_MAKE_FOURCC ('V', 'P', '6', '0'),
|
2009-02-28 11:41:28 +00:00
|
|
|
GST_MAKE_FOURCC ('L', 'M', '2', '0'),
|
|
|
|
GST_MAKE_FOURCC ('R', 'P', 'Z', 'A'),
|
2009-03-06 17:53:17 +00:00
|
|
|
GST_MAKE_FOURCC ('T', 'H', 'E', 'O'),
|
2009-03-09 09:03:13 +00:00
|
|
|
GST_MAKE_FOURCC ('F', 'P', 'S', '1'),
|
2010-01-23 12:50:09 +00:00
|
|
|
GST_MAKE_FOURCC ('A', 'A', 'S', 'C'),
|
2010-01-23 13:08:39 +00:00
|
|
|
GST_MAKE_FOURCC ('Y', 'V', '1', '2'),
|
2008-10-15 15:28:41 +00:00
|
|
|
/* FILL ME */
|
2003-12-07 22:49:04 +00:00
|
|
|
};
|
|
|
|
guint i;
|
2003-12-22 01:47:09 +00:00
|
|
|
GstCaps *caps, *one;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_empty ();
|
2006-08-22 15:11:52 +00:00
|
|
|
for (i = 0; i < G_N_ELEMENTS (tags); i++) {
|
2005-06-30 08:59:30 +00:00
|
|
|
one = gst_riff_create_video_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
2003-12-07 22:49:04 +00:00
|
|
|
if (one)
|
2003-12-22 01:47:09 +00:00
|
|
|
gst_caps_append (caps, one);
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
GstCaps *
|
|
|
|
gst_riff_create_audio_template_caps (void)
|
|
|
|
{
|
2006-08-22 15:11:52 +00:00
|
|
|
static const guint16 tags[] = {
|
2006-09-19 10:23:03 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_GSM610,
|
2003-12-07 22:49:04 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_MPEGL3,
|
|
|
|
GST_RIFF_WAVE_FORMAT_MPEGL12,
|
|
|
|
GST_RIFF_WAVE_FORMAT_PCM,
|
|
|
|
GST_RIFF_WAVE_FORMAT_VORBIS1,
|
|
|
|
GST_RIFF_WAVE_FORMAT_A52,
|
2006-08-07 08:26:03 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_DTS,
|
2006-09-23 08:51:14 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_AAC,
|
2003-12-07 22:49:04 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_ALAW,
|
|
|
|
GST_RIFF_WAVE_FORMAT_MULAW,
|
2006-10-10 16:50:06 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_WMS,
|
gst/: Add MS RLE support. I added some functions to read out strf chunks into strf chunks and the data behind it. Thi...
Original commit message from CVS:
reviewed by: <delete if not using a buddy>
* gst-libs/gst/riff/riff-media.c:
(gst_riff_create_video_caps_with_data),
(gst_riff_create_video_caps), (gst_riff_create_audio_caps),
(gst_riff_create_video_template_caps),
(gst_riff_create_audio_template_caps):
* gst-libs/gst/riff/riff-media.h:
* gst-libs/gst/riff/riff-read.c:
(gst_riff_read_strf_vids_with_data), (gst_riff_read_strf_vids):
* gst-libs/gst/riff/riff-read.h:
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Add MS RLE support. I added some functions to read out strf chunks
into strf chunks and the data behind it. This is usually color
palettes (as in RLE, but also in 8-bit RGB). Also use those during
caps creation. Lastly, add ADPCM (similar to wavparse - which
should eventually be rifflib based).
* gst/matroska/matroska-demux.c: (gst_matroska_demux_class_init),
(gst_matroska_demux_init), (gst_matroska_demux_reset):
* gst/matroska/matroska-demux.h:
Remove placeholders for some prehistoric tagging system. Didn't add
support for any tag system really anyway.
* gst/qtdemux/qtdemux.c:
Add support for audio/x-m4a (MPEG-4) through spider.
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
ADPCM support (#135862). Increase max. buffer size because we
cannot split buffers for ADPCM (screws references) and I've seen
files with 2048 byte chunks. 4096 seems safe for now.
2004-04-16 01:20:43 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_ADPCM,
|
2004-05-09 15:49:25 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_DVI_ADPCM,
|
2008-09-03 13:27:20 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_DSP_TRUESPEECH,
|
2004-07-13 10:24:29 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_WMAV1,
|
|
|
|
GST_RIFF_WAVE_FORMAT_WMAV2,
|
2004-10-30 06:44:03 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_WMAV3,
|
2007-04-17 01:56:07 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_SONY_ATRAC3,
|
|
|
|
GST_RIFF_WAVE_FORMAT_IEEE_FLOAT,
|
2008-06-30 09:20:59 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_VOXWARE_METASOUND,
|
|
|
|
GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK4,
|
|
|
|
GST_RIFF_WAVE_FORMAT_ADPCM_IMA_DK3,
|
2009-02-28 11:41:28 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_ADPCM_IMA_WAV,
|
|
|
|
GST_RIFF_WAVE_FORMAT_AMR_NB,
|
|
|
|
GST_RIFF_WAVE_FORMAT_AMR_WB,
|
2009-07-13 16:21:49 +00:00
|
|
|
GST_RIFF_WAVE_FORMAT_SIREN,
|
2008-06-30 09:20:59 +00:00
|
|
|
/* FILL ME */
|
2003-12-07 22:49:04 +00:00
|
|
|
};
|
|
|
|
guint i;
|
2003-12-22 01:47:09 +00:00
|
|
|
GstCaps *caps, *one;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_empty ();
|
2006-08-22 15:11:52 +00:00
|
|
|
for (i = 0; i < G_N_ELEMENTS (tags); i++) {
|
2005-06-30 08:59:30 +00:00
|
|
|
one = gst_riff_create_audio_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
2003-12-07 22:49:04 +00:00
|
|
|
if (one)
|
2003-12-22 01:47:09 +00:00
|
|
|
gst_caps_append (caps, one);
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
ext/ogg/: Added ogg-in-avi parser element. Fixes #140139.
Original commit message from CVS:
* ext/ogg/Makefile.am:
* ext/ogg/gstogg.c: (plugin_init):
* ext/ogg/gstoggaviparse.c: (gst_ogg_avi_parse_get_type),
(gst_ogg_avi_parse_base_init), (gst_ogg_avi_parse_class_init),
(gst_ogg_avi_parse_init), (gst_ogg_avi_parse_finalize),
(gst_ogg_avi_parse_setcaps), (gst_ogg_avi_parse_event),
(gst_ogg_avi_parse_push_packet), (gst_ogg_avi_parse_chain),
(gst_ogg_avi_parse_change_state), (gst_ogg_avi_parse_plugin_init):
Added ogg-in-avi parser element. Fixes #140139.
* ext/ogg/gstoggmux.c: (gst_ogg_mux_buffer_from_page):
Fixed a bug in oggdemux debug code.
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
(gst_riff_create_audio_template_caps):
Recognise Ogg in the AVI extensible wave format.
2006-08-17 15:43:40 +00:00
|
|
|
one = gst_caps_new_simple ("application/x-ogg-avi", NULL);
|
|
|
|
gst_caps_append (caps, one);
|
2003-12-07 22:49:04 +00:00
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
GstCaps *
|
|
|
|
gst_riff_create_iavs_template_caps (void)
|
|
|
|
{
|
2006-08-22 15:11:52 +00:00
|
|
|
static const guint32 tags[] = {
|
|
|
|
GST_MAKE_FOURCC ('D', 'V', 'S', 'D')
|
|
|
|
/* FILL ME */
|
2003-12-07 22:49:04 +00:00
|
|
|
};
|
|
|
|
guint i;
|
2003-12-22 01:47:09 +00:00
|
|
|
GstCaps *caps, *one;
|
2003-12-07 22:49:04 +00:00
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
caps = gst_caps_new_empty ();
|
2006-08-22 15:11:52 +00:00
|
|
|
for (i = 0; i < G_N_ELEMENTS (tags); i++) {
|
2005-06-30 08:59:30 +00:00
|
|
|
one = gst_riff_create_iavs_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
2003-12-07 22:49:04 +00:00
|
|
|
if (one)
|
2003-12-22 01:47:09 +00:00
|
|
|
gst_caps_append (caps, one);
|
2003-12-07 22:49:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|