2002-11-06 23:53:46 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
2003-06-07 00:41:32 +00:00
|
|
|
* This file:
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
* Copyright (c) 2002-2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
2002-11-06 23:53:46 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2004-01-12 04:15:46 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2002-11-26 14:50:05 +00:00
|
|
|
#include "config.h"
|
2004-01-12 04:15:46 +00:00
|
|
|
#endif
|
2003-10-26 11:30:18 +00:00
|
|
|
#include <gst/gst.h>
|
2002-11-26 14:50:05 +00:00
|
|
|
#ifdef HAVE_FFMPEG_UNINSTALLED
|
|
|
|
#include <avcodec.h>
|
|
|
|
#else
|
|
|
|
#include <ffmpeg/avcodec.h>
|
|
|
|
#endif
|
2003-06-07 00:41:32 +00:00
|
|
|
#include <string.h>
|
2002-11-06 23:53:46 +00:00
|
|
|
|
2004-12-18 20:53:55 +00:00
|
|
|
#include "gstffmpeg.h"
|
2003-06-07 00:41:32 +00:00
|
|
|
#include "gstffmpegcodecmap.h"
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
/*
|
|
|
|
* Read a palette from a caps.
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_ffmpeg_get_palette (const GstCaps * caps, AVCodecContext * context)
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
{
|
|
|
|
GstStructure *str = gst_caps_get_structure (caps, 0);
|
|
|
|
const GValue *palette_v;
|
|
|
|
const GstBuffer *palette;
|
|
|
|
|
|
|
|
/* do we have a palette? */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
if ((palette_v = gst_structure_get_value (str, "palette_data")) && context) {
|
2006-02-04 13:08:10 +00:00
|
|
|
palette = gst_value_get_buffer (palette_v);
|
2006-02-24 16:31:49 +00:00
|
|
|
if (GST_BUFFER_SIZE (palette) >= AVPALETTE_SIZE) {
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (context->palctrl)
|
|
|
|
av_free (context->palctrl);
|
|
|
|
context->palctrl = av_malloc (sizeof (AVPaletteControl));
|
|
|
|
context->palctrl->palette_changed = 1;
|
|
|
|
memcpy (context->palctrl->palette, GST_BUFFER_DATA (palette),
|
|
|
|
AVPALETTE_SIZE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_ffmpeg_set_palette (GstCaps * caps, AVCodecContext * context)
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
{
|
|
|
|
if (context->palctrl) {
|
2006-02-24 16:31:49 +00:00
|
|
|
GstBuffer *palette = gst_buffer_new_and_alloc (AVPALETTE_SIZE);
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
|
|
|
|
memcpy (GST_BUFFER_DATA (palette), context->palctrl->palette,
|
|
|
|
AVPALETTE_SIZE);
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_caps_set_simple (caps, "palette_data", GST_TYPE_BUFFER, palette, NULL);
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
/* this macro makes a caps width fixed or unfixed width/height
|
|
|
|
* properties depending on whether we've got a context.
|
|
|
|
*
|
|
|
|
* See below for why we use this.
|
2004-03-15 00:01:03 +00:00
|
|
|
*
|
|
|
|
* We should actually do this stuff at the end, like in riff-media.c,
|
|
|
|
* but I'm too lazy today. Maybe later.
|
2003-06-07 00:41:32 +00:00
|
|
|
*/
|
2006-09-06 15:15:05 +00:00
|
|
|
static GstCaps *
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_ff_vid_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
|
|
|
const char *mimetype, const char *fieldname, ...)
|
2006-09-06 15:15:05 +00:00
|
|
|
{
|
|
|
|
GstStructure *structure = NULL;
|
|
|
|
GstCaps *caps = NULL;
|
|
|
|
va_list var_args;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gint i;
|
2006-09-06 15:15:05 +00:00
|
|
|
|
|
|
|
if (context != NULL) {
|
|
|
|
caps = gst_caps_new_simple (mimetype,
|
|
|
|
"width", G_TYPE_INT, context->width,
|
|
|
|
"height", G_TYPE_INT, context->height,
|
|
|
|
"framerate", GST_TYPE_FRACTION,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->time_base.den, context->time_base.num, NULL);
|
2006-09-06 15:15:05 +00:00
|
|
|
} else {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_H263:
|
|
|
|
{
|
|
|
|
/* 128x96, 176x144, 352x288, 704x576, and 1408x1152. slightly reordered
|
|
|
|
* because we want automatic negotiation to go as close to 320x240 as
|
|
|
|
* possible. */
|
|
|
|
const static gint widths[] = { 352, 704, 176, 1408, 128 };
|
|
|
|
const static gint heights[] = { 288, 576, 144, 1152, 96 };
|
|
|
|
GstCaps *temp;
|
|
|
|
gint n_sizes = G_N_ELEMENTS (widths);
|
2006-09-06 15:15:05 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_caps_new_empty ();
|
|
|
|
for (i = 0; i < n_sizes; i++) {
|
|
|
|
temp = gst_caps_new_simple (mimetype,
|
|
|
|
"width", G_TYPE_INT, widths[i],
|
|
|
|
"height", G_TYPE_INT, heights[i],
|
|
|
|
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
|
2006-09-06 15:15:05 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_caps_append (caps, temp);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
caps = gst_caps_new_simple (mimetype,
|
|
|
|
"width", GST_TYPE_INT_RANGE, 16, 4096,
|
|
|
|
"height", GST_TYPE_INT_RANGE, 16, 4096,
|
|
|
|
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < gst_caps_get_size (caps); i++) {
|
|
|
|
structure = gst_caps_get_structure (caps, i);
|
2006-09-06 15:15:05 +00:00
|
|
|
va_start (var_args, fieldname);
|
|
|
|
gst_structure_set_valist (structure, fieldname, var_args);
|
|
|
|
va_end (var_args);
|
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
2003-06-07 00:41:32 +00:00
|
|
|
|
|
|
|
/* same for audio - now with channels/sample rate
|
|
|
|
*/
|
|
|
|
|
2006-09-06 15:15:05 +00:00
|
|
|
static GstCaps *
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
|
|
|
const char *mimetype, const char *fieldname, ...)
|
2006-09-06 15:15:05 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
|
|
|
GstStructure *structure = NULL;
|
|
|
|
va_list var_args;
|
|
|
|
|
|
|
|
if (context != NULL) {
|
|
|
|
caps = gst_caps_new_simple (mimetype,
|
|
|
|
"rate", G_TYPE_INT, context->sample_rate,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
"channels", G_TYPE_INT, context->channels, NULL);
|
2006-09-06 15:15:05 +00:00
|
|
|
} else {
|
|
|
|
caps = gst_caps_new_simple (mimetype,
|
|
|
|
"rate", GST_TYPE_INT_RANGE, 8000, 96000,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
"channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
|
2006-09-06 15:15:05 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
structure = gst_caps_get_structure (caps, 0);
|
|
|
|
|
|
|
|
if (structure) {
|
|
|
|
va_start (var_args, fieldname);
|
|
|
|
gst_structure_set_valist (structure, fieldname, var_args);
|
|
|
|
va_end (var_args);
|
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
2003-06-07 00:41:32 +00:00
|
|
|
|
|
|
|
/* Convert a FFMPEG codec ID and optional AVCodecContext
|
|
|
|
* to a GstCaps. If the context is ommitted, no fixed values
|
|
|
|
* for video/audio size will be included in the GstCaps
|
|
|
|
*
|
|
|
|
* CodecID is primarily meant for compressed data GstCaps!
|
2004-03-15 00:01:03 +00:00
|
|
|
*
|
|
|
|
* encode is a special parameter. gstffmpegdec will say
|
|
|
|
* FALSE, gstffmpegenc will say TRUE. The output caps
|
|
|
|
* depends on this, in such a way that it will be very
|
|
|
|
* specific, defined, fixed and correct caps for encoders,
|
|
|
|
* yet very wide, "forgiving" caps for decoders. Example
|
|
|
|
* for mp3: decode: audio/mpeg,mpegversion=1,layer=[1-3]
|
|
|
|
* but encode: audio/mpeg,mpegversion=1,layer=3,bitrate=x,
|
|
|
|
* rate=x,channels=x.
|
2003-06-07 00:41:32 +00:00
|
|
|
*/
|
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
GstCaps *
|
2004-03-29 16:39:18 +00:00
|
|
|
gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|
|
|
AVCodecContext * context, gboolean encode)
|
2002-11-06 23:53:46 +00:00
|
|
|
{
|
2003-06-07 00:41:32 +00:00
|
|
|
GstCaps *caps = NULL;
|
2004-03-15 00:01:03 +00:00
|
|
|
gboolean buildcaps = FALSE;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-25 21:37:26 +00:00
|
|
|
switch (codec_id) {
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_MPEG1VIDEO:
|
2007-12-17 12:43:06 +00:00
|
|
|
/* FIXME: bitrate */
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 1,
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_MPEG2VIDEO:
|
|
|
|
if (encode) {
|
|
|
|
/* FIXME: bitrate */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
|
2004-03-29 16:39:18 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 2,
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
} else {
|
|
|
|
/* decode both MPEG-1 and MPEG-2; width/height/fps are all in
|
|
|
|
* the MPEG video stream headers, so may be omitted from caps. */
|
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
2004-03-29 16:39:18 +00:00
|
|
|
"mpegversion", GST_TYPE_INT_RANGE, 1, 2,
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
|
|
|
case CODEC_ID_MPEG2VIDEO_XVMC:
|
|
|
|
/* this is a special ID - don't need it in GStreamer, I think */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_H263:
|
2006-11-16 07:28:28 +00:00
|
|
|
if (encode) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
|
2006-11-16 07:28:28 +00:00
|
|
|
"variant", G_TYPE_STRING, "itu",
|
|
|
|
"h263version", G_TYPE_STRING, "h263", NULL);
|
|
|
|
} else {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
/* don't pass codec_id, we can decode other variants with the H263
|
|
|
|
* decoder that don't have specific size requirements
|
|
|
|
*/
|
|
|
|
caps = gst_ff_vid_caps_new (context, CODEC_ID_NONE, "video/x-h263",
|
2006-11-16 07:28:28 +00:00
|
|
|
"variant", G_TYPE_STRING, "itu", NULL);
|
|
|
|
}
|
2006-05-16 20:03:00 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_H263P:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263",
|
2006-11-16 07:28:28 +00:00
|
|
|
"variant", G_TYPE_STRING, "itu",
|
|
|
|
"h263version", G_TYPE_STRING, "h263p", NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2005-01-19 12:41:34 +00:00
|
|
|
case CODEC_ID_H263I:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-intel-h263",
|
2006-11-16 07:28:28 +00:00
|
|
|
"variant", G_TYPE_STRING, "intel", NULL);
|
2005-01-19 12:41:34 +00:00
|
|
|
break;
|
|
|
|
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_H261:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h261", NULL);
|
2004-12-16 18:14:19 +00:00
|
|
|
break;
|
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_RV10:
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_RV20:
|
2007-10-01 17:27:42 +00:00
|
|
|
case CODEC_ID_RV30:
|
2006-05-07 01:18:46 +00:00
|
|
|
case CODEC_ID_RV40:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint version;
|
2006-05-07 01:18:46 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_RV40:
|
|
|
|
version = 4;
|
|
|
|
break;
|
2007-10-01 17:27:42 +00:00
|
|
|
case CODEC_ID_RV30:
|
|
|
|
version = 3;
|
|
|
|
break;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
case CODEC_ID_RV20:
|
|
|
|
version = 2;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
version = 1;
|
|
|
|
break;
|
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
/* FIXME: context->sub_id must be filled in during decoding */
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-pn-realvideo",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"rmversion", G_TYPE_INT, version, NULL);
|
|
|
|
if (context) {
|
ext/ffmpeg/: gst-indent cleanup.
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (gst_ffmpeg_avcodec_open),
(gst_ffmpeg_avcodec_close), (gst_ffmpeg_av_find_stream_info),
(gst_ffmpeg_log_callback), (plugin_init):
* ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_mb_decision_get_type),
(gst_ffmpeg_flags_get_type), (gst_ffmpeg_cfg_init),
(gst_ffmpeg_cfg_codec_has_pspec),
(gst_ffmpeg_cfg_install_property), (gst_ffmpeg_cfg_set_property),
(gst_ffmpeg_cfg_get_property), (gst_ffmpeg_cfg_set_defaults),
(gst_ffmpeg_cfg_fill_context), (gst_ffmpeg_cfg_finalize):
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_setcaps), (gst_ffmpegdec_save_incoming_values),
(gst_ffmpegdec_get_best_values), (gst_ffmpegdec_video_frame):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_base_init),
(gst_ffmpegdemux_src_query):
* ext/ffmpeg/gstffmpegenc.c: (ffmpegenc_setup_working_buf),
(gst_ffmpegenc_chain_video), (gst_ffmpegenc_flush_buffers):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_read),
(gst_ffmpegdata_write), (gst_ffmpegdata_seek),
(gst_ffmpegdata_close):
gst-indent cleanup.
2007-11-03 16:14:53 +00:00
|
|
|
gst_caps_set_simple (caps, "format", G_TYPE_INT, context->sub_id, NULL);
|
2007-10-01 17:27:42 +00:00
|
|
|
if (context->extradata_size >= 8) {
|
|
|
|
gst_caps_set_simple (caps,
|
ext/ffmpeg/: gst-indent cleanup.
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (gst_ffmpeg_avcodec_open),
(gst_ffmpeg_avcodec_close), (gst_ffmpeg_av_find_stream_info),
(gst_ffmpeg_log_callback), (plugin_init):
* ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_mb_decision_get_type),
(gst_ffmpeg_flags_get_type), (gst_ffmpeg_cfg_init),
(gst_ffmpeg_cfg_codec_has_pspec),
(gst_ffmpeg_cfg_install_property), (gst_ffmpeg_cfg_set_property),
(gst_ffmpeg_cfg_get_property), (gst_ffmpeg_cfg_set_defaults),
(gst_ffmpeg_cfg_fill_context), (gst_ffmpeg_cfg_finalize):
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_setcaps), (gst_ffmpegdec_save_incoming_values),
(gst_ffmpegdec_get_best_values), (gst_ffmpegdec_video_frame):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_base_init),
(gst_ffmpegdemux_src_query):
* ext/ffmpeg/gstffmpegenc.c: (ffmpegenc_setup_working_buf),
(gst_ffmpegenc_chain_video), (gst_ffmpegenc_flush_buffers):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_read),
(gst_ffmpegdata_write), (gst_ffmpegdata_seek),
(gst_ffmpegdata_close):
gst-indent cleanup.
2007-11-03 16:14:53 +00:00
|
|
|
"subformat", G_TYPE_INT, GST_READ_UINT32_BE (context->extradata),
|
|
|
|
NULL);
|
|
|
|
}
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_MP2:
|
2007-12-17 12:43:06 +00:00
|
|
|
/* FIXME: bitrate */
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
|
|
|
|
"mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_MP3:
|
|
|
|
if (encode) {
|
|
|
|
/* FIXME: bitrate */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
|
2004-03-29 16:39:18 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
} else {
|
|
|
|
/* Decodes MPEG-1 layer 1/2/3. Samplerate, channels et al are
|
|
|
|
* in the MPEG audio header, so may be omitted from caps. */
|
|
|
|
caps = gst_caps_new_simple ("audio/mpeg",
|
2004-03-29 16:39:18 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 1,
|
|
|
|
"layer", GST_TYPE_INT_RANGE, 1, 3, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_AC3:
|
|
|
|
/* FIXME: bitrate */
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-ac3", NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ATRAC3:
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/atrac3", NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
|
2006-05-07 01:18:46 +00:00
|
|
|
case CODEC_ID_DTS:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dts", NULL);
|
2006-05-07 01:18:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2008-04-19 19:43:54 +00:00
|
|
|
case CODEC_ID_APE:
|
|
|
|
caps =
|
|
|
|
gst_ff_aud_caps_new (context, codec_id, "audio/x-ffmpeg-parsed-ape",
|
|
|
|
NULL);
|
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"depth", G_TYPE_INT, context->bits_per_sample, NULL);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-03-29 16:39:18 +00:00
|
|
|
/* MJPEG is normal JPEG, Motion-JPEG and Quicktime MJPEG-A. MJPEGB
|
|
|
|
* is Quicktime's MJPEG-B. LJPEG is lossless JPEG. I don't know what
|
|
|
|
* sp5x is, but it's apparently something JPEG... We don't separate
|
|
|
|
* between those in GStreamer. Should we (at least between MJPEG,
|
|
|
|
* MJPEG-B and sp5x decoding...)? */
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_MJPEG:
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_LJPEG:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "image/jpeg", NULL);
|
2003-01-07 20:42:56 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2005-12-19 15:47:13 +00:00
|
|
|
case CODEC_ID_SP5X:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/sp5x", NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
2005-02-03 11:12:34 +00:00
|
|
|
case CODEC_ID_MJPEGB:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mjpeg-b", NULL);
|
2005-02-03 11:12:34 +00:00
|
|
|
break;
|
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_MPEG4:
|
2004-10-25 11:56:52 +00:00
|
|
|
if (encode && context != NULL) {
|
2004-03-15 00:01:03 +00:00
|
|
|
/* I'm not exactly sure what ffmpeg outputs... ffmpeg itself uses
|
|
|
|
* the AVI fourcc 'DIVX', but 'mp4v' for Quicktime... */
|
2004-10-25 11:56:52 +00:00
|
|
|
switch (context->codec_tag) {
|
2004-04-23 00:49:10 +00:00
|
|
|
case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-divx",
|
2005-12-06 19:57:08 +00:00
|
|
|
"divxversion", G_TYPE_INT, 5, NULL);
|
2004-04-23 00:49:10 +00:00
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('m', 'p', '4', 'v'):
|
|
|
|
default:
|
|
|
|
/* FIXME: bitrate */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
|
2004-04-23 00:49:10 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
|
|
|
break;
|
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
} else {
|
|
|
|
/* The trick here is to separate xvid, divx, mpeg4, 3ivx et al */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/mpeg",
|
2004-03-29 16:39:18 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 4,
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
2004-10-25 11:56:52 +00:00
|
|
|
if (encode) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
|
|
|
|
"video/x-divx", "divxversion", G_TYPE_INT, 5, NULL));
|
2004-10-25 11:56:52 +00:00
|
|
|
} else {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
|
|
|
|
"video/x-divx", "divxversion", GST_TYPE_INT_RANGE, 4, 5,
|
|
|
|
NULL));
|
|
|
|
gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
|
|
|
|
"video/x-xvid", NULL));
|
|
|
|
gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
|
|
|
|
"video/x-3ivx", NULL));
|
2004-10-25 11:56:52 +00:00
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2003-06-17 11:44:11 +00:00
|
|
|
case CODEC_ID_RAWVIDEO:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ffmpeg_codectype_to_caps (CODEC_TYPE_VIDEO, context, codec_id);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_MSMPEG4V1:
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_MSMPEG4V2:
|
|
|
|
case CODEC_ID_MSMPEG4V3:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint version = 41 + codec_id - CODEC_ID_MSMPEG4V1;
|
|
|
|
|
|
|
|
/* encode-FIXME: bitrate */
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msmpeg",
|
|
|
|
"msmpegversion", G_TYPE_INT, version, NULL);
|
|
|
|
if (!encode && codec_id == CODEC_ID_MSMPEG4V3) {
|
|
|
|
gst_caps_append (caps, gst_ff_vid_caps_new (context, codec_id,
|
|
|
|
"video/x-divx", "divxversion", G_TYPE_INT, 3, NULL));
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_WMV1:
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_WMV2:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint version = (codec_id == CODEC_ID_WMV1) ? 1 : 2;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
|
|
|
|
"wmvversion", G_TYPE_INT, version, NULL);
|
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_FLV1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-flash-video",
|
|
|
|
"flvversion", G_TYPE_INT, 1, NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_SVQ1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
|
2004-03-29 16:39:18 +00:00
|
|
|
"svqversion", G_TYPE_INT, 1, NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
|
|
|
case CODEC_ID_SVQ3:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-svq",
|
2005-06-09 09:39:38 +00:00
|
|
|
"svqversion", G_TYPE_INT, 3, NULL);
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2003-07-06 20:49:15 +00:00
|
|
|
case CODEC_ID_DVAUDIO:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dv", NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2003-07-06 20:49:15 +00:00
|
|
|
case CODEC_ID_DVVIDEO:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
if (encode && context) {
|
|
|
|
guint32 fourcc;
|
|
|
|
|
|
|
|
switch (context->pix_fmt) {
|
|
|
|
case PIX_FMT_YUV422:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
|
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV420P:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
|
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV411P:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
|
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV422P:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
|
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV410P:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
GST_WARNING
|
|
|
|
("Couldnt' find fourcc for pixfmt %d, defaulting to I420",
|
|
|
|
context->pix_fmt);
|
|
|
|
fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE,
|
|
|
|
"format", GST_TYPE_FOURCC, fourcc, NULL);
|
|
|
|
} else {
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dv",
|
|
|
|
"systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
|
2006-10-24 09:27:16 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_WMAV1:
|
|
|
|
case CODEC_ID_WMAV2:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint version = (codec_id == CODEC_ID_WMAV1) ? 1 : 2;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
if (context) {
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
|
|
|
|
"wmaversion", G_TYPE_INT, version,
|
|
|
|
"block_align", G_TYPE_INT, context->block_align,
|
|
|
|
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
|
|
|
|
} else {
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-wma",
|
|
|
|
"wmaversion", G_TYPE_INT, version,
|
|
|
|
"block_align", GST_TYPE_INT_RANGE, 0, G_MAXINT,
|
|
|
|
"bitrate", GST_TYPE_INT_RANGE, 0, G_MAXINT, NULL);
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_MACE3:
|
|
|
|
case CODEC_ID_MACE6:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint version = (codec_id == CODEC_ID_MACE3) ? 3 : 6;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mace",
|
|
|
|
"maceversion", G_TYPE_INT, version, NULL);
|
|
|
|
}
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2003-01-07 20:42:56 +00:00
|
|
|
case CODEC_ID_HUFFYUV:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
|
2005-01-25 15:17:44 +00:00
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"bpp", G_TYPE_INT, context->bits_per_sample, NULL);
|
|
|
|
}
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_CYUV:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps =
|
|
|
|
gst_ff_vid_caps_new (context, codec_id, "video/x-compressed-yuv",
|
|
|
|
NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_H264:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h264", NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_INDEO3:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
|
2004-03-29 16:39:18 +00:00
|
|
|
"indeoversion", G_TYPE_INT, 3, NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_INDEO2:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
|
2005-04-21 19:01:36 +00:00
|
|
|
"indeoversion", G_TYPE_INT, 2, NULL);
|
|
|
|
break;
|
|
|
|
|
2006-09-23 12:00:15 +00:00
|
|
|
case CODEC_ID_FLASHSV:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps =
|
|
|
|
gst_ff_vid_caps_new (context, codec_id, "video/x-flash-screen", NULL);
|
2006-09-23 12:00:15 +00:00
|
|
|
break;
|
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
case CODEC_ID_VP3:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp3", NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
2006-09-20 20:02:16 +00:00
|
|
|
case CODEC_ID_VP5:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp5", NULL);
|
2006-09-20 20:02:16 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_VP6:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6", NULL);
|
2006-09-20 20:02:16 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_VP6F:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-flash", NULL);
|
2006-09-20 20:02:16 +00:00
|
|
|
break;
|
|
|
|
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_VP6A:
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-alpha", NULL);
|
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_THEORA:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-theora", NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_AAC:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
|
2005-03-06 13:38:53 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_ASV1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
|
|
|
|
"asusversion", G_TYPE_INT, 1, NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_ASV2:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-asus",
|
|
|
|
"asusversion", G_TYPE_INT, 2, NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
2003-06-17 11:44:11 +00:00
|
|
|
case CODEC_ID_FFV1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ffv",
|
2004-03-29 16:39:18 +00:00
|
|
|
"ffvversion", G_TYPE_INT, 1, NULL);
|
2003-06-17 11:44:11 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_4XM:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-4xm", NULL);
|
2003-06-17 11:44:11 +00:00
|
|
|
break;
|
|
|
|
|
2004-10-02 20:26:10 +00:00
|
|
|
case CODEC_ID_XAN_WC3:
|
|
|
|
case CODEC_ID_XAN_WC4:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-xan",
|
2004-10-02 20:26:10 +00:00
|
|
|
"wcversion", G_TYPE_INT, 3 - CODEC_ID_XAN_WC3 + codec_id, NULL);
|
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_CLJR:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps =
|
|
|
|
gst_ff_vid_caps_new (context, codec_id,
|
|
|
|
"video/x-cirrus-logic-accupak", NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_FRAPS:
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_MDEC:
|
|
|
|
case CODEC_ID_ROQ:
|
|
|
|
case CODEC_ID_INTERPLAY_VIDEO:
|
|
|
|
buildcaps = TRUE;
|
|
|
|
break;
|
|
|
|
|
2005-12-19 15:47:13 +00:00
|
|
|
case CODEC_ID_VCR1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ati-vcr",
|
|
|
|
"vcrversion", G_TYPE_INT, 1, NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
2004-04-09 06:20:31 +00:00
|
|
|
case CODEC_ID_RPZA:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps =
|
|
|
|
gst_ff_vid_caps_new (context, codec_id, "video/x-apple-video", NULL);
|
2004-04-09 06:20:31 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_CINEPAK:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-cinepak", NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
break;
|
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
/* WS_VQA belogns here (order) */
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
|
|
|
|
case CODEC_ID_MSRLE:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
|
2005-12-06 19:57:08 +00:00
|
|
|
"layout", G_TYPE_STRING, "microsoft", NULL);
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
2005-12-06 19:57:08 +00:00
|
|
|
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2005-08-15 13:46:16 +00:00
|
|
|
case CODEC_ID_QTRLE:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-rle",
|
2005-08-15 13:46:16 +00:00
|
|
|
"layout", G_TYPE_STRING, "quicktime", NULL);
|
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
|
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-04-11 21:40:01 +00:00
|
|
|
case CODEC_ID_MSVIDEO1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-msvideocodec",
|
2005-12-06 19:57:08 +00:00
|
|
|
"msvideoversion", G_TYPE_INT, 1, NULL);
|
2004-04-11 21:40:01 +00:00
|
|
|
break;
|
|
|
|
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_WMV3:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
|
2005-04-21 19:01:36 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 3, NULL);
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_VC1:
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
|
2007-12-17 20:31:35 +00:00
|
|
|
"wmvversion", G_TYPE_INT, 3, "fourcc", GST_TYPE_FOURCC,
|
|
|
|
GST_MAKE_FOURCC ('W', 'V', 'C', '1'), NULL);
|
2007-12-17 12:43:06 +00:00
|
|
|
break;
|
2005-10-23 16:07:46 +00:00
|
|
|
case CODEC_ID_QDM2:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-qdm2", NULL);
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
|
2005-12-19 15:47:13 +00:00
|
|
|
case CODEC_ID_MSZH:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mszh", NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_ZLIB:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-zlib", NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_TRUEMOTION1:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
|
|
|
|
"trueversion", G_TYPE_INT, 1, NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
case CODEC_ID_TRUEMOTION2:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-truemotion",
|
|
|
|
"trueversion", G_TYPE_INT, 2, NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_ULTI:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-ultimotion",
|
|
|
|
NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_TSCC:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
|
2007-01-22 10:26:04 +00:00
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
|
|
|
|
} else {
|
|
|
|
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
|
|
|
|
}
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_KMVC:
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-kmvc", NULL);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_NUV:
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-nuv", NULL);
|
|
|
|
break;
|
|
|
|
|
2007-12-17 20:31:35 +00:00
|
|
|
case CODEC_ID_GIF:
|
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "image/gif", NULL);
|
|
|
|
break;
|
|
|
|
|
2005-12-19 15:47:13 +00:00
|
|
|
case CODEC_ID_PNG:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "image/png", NULL);
|
2005-12-19 15:47:13 +00:00
|
|
|
break;
|
|
|
|
|
2006-09-30 14:42:16 +00:00
|
|
|
case CODEC_ID_PPM:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "image/ppm", NULL);
|
2006-09-30 14:42:16 +00:00
|
|
|
break;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-09-30 14:42:16 +00:00
|
|
|
case CODEC_ID_PBM:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "image/pbm", NULL);
|
2006-09-30 14:42:16 +00:00
|
|
|
break;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-01-23 15:13:29 +00:00
|
|
|
case CODEC_ID_SMC:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-smc", NULL);
|
2006-01-23 15:13:29 +00:00
|
|
|
break;
|
|
|
|
|
2006-04-19 15:35:12 +00:00
|
|
|
case CODEC_ID_QDRAW:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-qdrw", NULL);
|
2006-04-19 15:35:12 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_WS_VQA:
|
|
|
|
case CODEC_ID_IDCIN:
|
|
|
|
case CODEC_ID_8BPS:
|
|
|
|
case CODEC_ID_FLIC:
|
|
|
|
case CODEC_ID_VMDVIDEO:
|
|
|
|
case CODEC_ID_VMDAUDIO:
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_SONIC:
|
|
|
|
case CODEC_ID_SONIC_LS:
|
|
|
|
case CODEC_ID_SNOW:
|
|
|
|
case CODEC_ID_VIXL:
|
|
|
|
case CODEC_ID_QPEG:
|
|
|
|
case CODEC_ID_XVID:
|
|
|
|
case CODEC_ID_PGM:
|
|
|
|
case CODEC_ID_PGMYUV:
|
|
|
|
case CODEC_ID_PAM:
|
|
|
|
case CODEC_ID_FFVHUFF:
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_LOCO:
|
|
|
|
case CODEC_ID_WNV1:
|
|
|
|
case CODEC_ID_AASC:
|
|
|
|
case CODEC_ID_MP3ADU:
|
|
|
|
case CODEC_ID_MP3ON4:
|
|
|
|
case CODEC_ID_WESTWOOD_SND1:
|
2006-02-19 16:54:51 +00:00
|
|
|
case CODEC_ID_CSCD:
|
|
|
|
case CODEC_ID_MMVIDEO:
|
|
|
|
case CODEC_ID_ZMBV:
|
|
|
|
case CODEC_ID_AVS:
|
|
|
|
case CODEC_ID_TRUESPEECH:
|
2006-09-20 20:02:16 +00:00
|
|
|
case CODEC_ID_CAVS:
|
2004-03-15 00:01:03 +00:00
|
|
|
buildcaps = TRUE;
|
|
|
|
break;
|
|
|
|
|
2004-03-29 16:39:18 +00:00
|
|
|
/* weird quasi-codecs for the demuxers only */
|
2003-06-17 11:44:11 +00:00
|
|
|
case CODEC_ID_PCM_S16LE:
|
|
|
|
case CODEC_ID_PCM_S16BE:
|
|
|
|
case CODEC_ID_PCM_U16LE:
|
|
|
|
case CODEC_ID_PCM_U16BE:
|
|
|
|
case CODEC_ID_PCM_S8:
|
|
|
|
case CODEC_ID_PCM_U8:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint width = 0, depth = 0, endianness = 0;
|
|
|
|
gboolean signedness = FALSE; /* blabla */
|
|
|
|
|
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_PCM_S16LE:
|
|
|
|
width = 16;
|
|
|
|
depth = 16;
|
|
|
|
endianness = G_LITTLE_ENDIAN;
|
|
|
|
signedness = TRUE;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PCM_S16BE:
|
|
|
|
width = 16;
|
|
|
|
depth = 16;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
signedness = TRUE;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PCM_U16LE:
|
|
|
|
width = 16;
|
|
|
|
depth = 16;
|
|
|
|
endianness = G_LITTLE_ENDIAN;
|
|
|
|
signedness = FALSE;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PCM_U16BE:
|
|
|
|
width = 16;
|
|
|
|
depth = 16;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
signedness = FALSE;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PCM_S8:
|
|
|
|
width = 8;
|
|
|
|
depth = 8;
|
|
|
|
endianness = G_BYTE_ORDER;
|
|
|
|
signedness = TRUE;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PCM_U8:
|
|
|
|
width = 8;
|
|
|
|
depth = 8;
|
|
|
|
endianness = G_BYTE_ORDER;
|
|
|
|
signedness = FALSE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
g_assert (0); /* don't worry, we never get here */
|
|
|
|
break;
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
|
|
|
|
"width", G_TYPE_INT, width,
|
|
|
|
"depth", G_TYPE_INT, depth,
|
|
|
|
"endianness", G_TYPE_INT, endianness,
|
|
|
|
"signed", G_TYPE_BOOLEAN, signedness, NULL);
|
|
|
|
}
|
2003-06-17 11:44:11 +00:00
|
|
|
break;
|
|
|
|
|
2003-07-06 20:49:15 +00:00
|
|
|
case CODEC_ID_PCM_MULAW:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-mulaw", NULL);
|
2003-07-06 20:49:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_PCM_ALAW:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alaw", NULL);
|
2003-07-06 20:49:15 +00:00
|
|
|
break;
|
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_ADPCM_IMA_QT:
|
|
|
|
case CODEC_ID_ADPCM_IMA_WAV:
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_ADPCM_IMA_DK3:
|
|
|
|
case CODEC_ID_ADPCM_IMA_DK4:
|
|
|
|
case CODEC_ID_ADPCM_IMA_WS:
|
|
|
|
case CODEC_ID_ADPCM_IMA_SMJPEG:
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ADPCM_IMA_AMV:
|
2002-11-06 23:53:46 +00:00
|
|
|
case CODEC_ID_ADPCM_MS:
|
2003-07-06 20:49:15 +00:00
|
|
|
case CODEC_ID_ADPCM_4XM:
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_ADPCM_XA:
|
|
|
|
case CODEC_ID_ADPCM_ADX:
|
|
|
|
case CODEC_ID_ADPCM_EA:
|
|
|
|
case CODEC_ID_ADPCM_G726:
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_ADPCM_CT:
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_ADPCM_SWF:
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
case CODEC_ID_ADPCM_YAMAHA:
|
2006-02-18 23:12:14 +00:00
|
|
|
case CODEC_ID_ADPCM_SBPRO_2:
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_3:
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_4:
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ADPCM_EA_R1:
|
|
|
|
case CODEC_ID_ADPCM_EA_R2:
|
|
|
|
case CODEC_ID_ADPCM_EA_R3:
|
|
|
|
case CODEC_ID_ADPCM_THP:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gchar *layout = NULL;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_ADPCM_IMA_QT:
|
|
|
|
layout = "quicktime";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_WAV:
|
|
|
|
layout = "dvi";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_DK3:
|
|
|
|
layout = "dk3";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_DK4:
|
|
|
|
layout = "dk4";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_WS:
|
|
|
|
layout = "westwood";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_SMJPEG:
|
|
|
|
layout = "smjpeg";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ADPCM_IMA_AMV:
|
|
|
|
layout = "amv";
|
|
|
|
break;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
case CODEC_ID_ADPCM_MS:
|
|
|
|
layout = "microsoft";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_4XM:
|
|
|
|
layout = "4xm";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_XA:
|
|
|
|
layout = "xa";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_ADX:
|
|
|
|
layout = "adx";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_EA:
|
|
|
|
layout = "ea";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_G726:
|
|
|
|
layout = "g726";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_CT:
|
|
|
|
layout = "ct";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_SWF:
|
|
|
|
layout = "swf";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_YAMAHA:
|
|
|
|
layout = "yamaha";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_2:
|
|
|
|
layout = "sbpro2";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_3:
|
|
|
|
layout = "sbpro3";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_4:
|
|
|
|
layout = "sbpro4";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ADPCM_EA_R1:
|
|
|
|
layout = "ea-r1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_EA_R2:
|
|
|
|
layout = "ea-r3";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_EA_R3:
|
|
|
|
layout = "ea-r3";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_THP:
|
|
|
|
layout = "thp";
|
|
|
|
break;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
default:
|
|
|
|
g_assert (0); /* don't worry, we never get here */
|
|
|
|
break;
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
|
|
|
/* FIXME: someone please check whether we need additional properties
|
|
|
|
* in this caps definition. */
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-adpcm",
|
|
|
|
"layout", G_TYPE_STRING, layout, NULL);
|
|
|
|
if (context)
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"block_align", G_TYPE_INT, context->block_align,
|
|
|
|
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
|
|
|
|
}
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_AMR_NB:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR", NULL);
|
2005-01-28 10:45:37 +00:00
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_AMR_WB:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/AMR-WB", NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_NELLYMOSER:
|
|
|
|
caps =
|
|
|
|
gst_ff_aud_caps_new (context, codec_id, "audio/x-nellymoser", NULL);
|
|
|
|
break;
|
|
|
|
|
2003-10-26 12:10:01 +00:00
|
|
|
case CODEC_ID_RA_144:
|
2003-07-06 20:49:15 +00:00
|
|
|
case CODEC_ID_RA_288:
|
2006-02-19 14:28:59 +00:00
|
|
|
case CODEC_ID_COOK:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint version = 0;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_RA_144:
|
|
|
|
version = 1;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_RA_288:
|
|
|
|
version = 2;
|
|
|
|
break;
|
|
|
|
case CODEC_ID_COOK:
|
|
|
|
version = 8;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* FIXME: properties? */
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-pn-realaudio",
|
|
|
|
"raversion", G_TYPE_INT, version, NULL);
|
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"leaf_size", G_TYPE_INT, context->block_align,
|
|
|
|
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
}
|
2003-10-26 12:10:01 +00:00
|
|
|
break;
|
2003-07-06 20:49:15 +00:00
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_ROQ_DPCM:
|
|
|
|
case CODEC_ID_INTERPLAY_DPCM:
|
|
|
|
case CODEC_ID_XAN_DPCM:
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_SOL_DPCM:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gchar *layout = NULL;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_ROQ_DPCM:
|
|
|
|
layout = "roq";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_INTERPLAY_DPCM:
|
|
|
|
layout = "interplay";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_XAN_DPCM:
|
|
|
|
layout = "xan";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SOL_DPCM:
|
|
|
|
layout = "sol";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
g_assert (0); /* don't worry, we never get here */
|
|
|
|
break;
|
2005-09-30 09:29:22 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
|
|
|
/* FIXME: someone please check whether we need additional properties
|
|
|
|
* in this caps definition. */
|
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-dpcm",
|
|
|
|
"layout", G_TYPE_STRING, layout, NULL);
|
|
|
|
if (context)
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"block_align", G_TYPE_INT, context->block_align,
|
|
|
|
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
|
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
break;
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_SHORTEN:
|
|
|
|
caps = gst_caps_new_simple ("audio/x-shorten", NULL);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_ID_ALAC:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
|
2005-04-21 19:01:36 +00:00
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
case CODEC_ID_FLAC:
|
|
|
|
/* Note that ffmpeg has no encoder yet, but just for safety. In the
|
|
|
|
* encoder case, we want to add things like samplerate, channels... */
|
|
|
|
if (!encode) {
|
|
|
|
caps = gst_caps_new_simple ("audio/x-flac", NULL);
|
|
|
|
}
|
2004-03-07 22:02:15 +00:00
|
|
|
break;
|
|
|
|
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
case CODEC_ID_DVD_SUBTITLE:
|
|
|
|
case CODEC_ID_DVB_SUBTITLE:
|
|
|
|
caps = NULL;
|
|
|
|
break;
|
2006-02-19 16:54:51 +00:00
|
|
|
case CODEC_ID_BMP:
|
|
|
|
caps = gst_caps_new_simple ("image/bmp", NULL);
|
|
|
|
break;
|
|
|
|
case CODEC_ID_TTA:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
|
2006-02-19 16:54:51 +00:00
|
|
|
if (context) {
|
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
|
|
|
|
}
|
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
default:
|
2004-03-15 00:01:03 +00:00
|
|
|
g_warning ("Unknown codec ID %d, please add here", codec_id);
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
if (buildcaps) {
|
|
|
|
AVCodec *codec;
|
|
|
|
|
|
|
|
if ((codec = avcodec_find_decoder (codec_id)) ||
|
|
|
|
(codec = avcodec_find_encoder (codec_id))) {
|
|
|
|
gchar *mime = NULL;
|
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
GST_LOG ("Could not create stream format caps for %s", codec->name);
|
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
switch (codec->type) {
|
|
|
|
case CODEC_TYPE_VIDEO:
|
|
|
|
mime = g_strdup_printf ("video/x-gst_ff-%s", codec->name);
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, mime, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
g_free (mime);
|
|
|
|
break;
|
|
|
|
case CODEC_TYPE_AUDIO:
|
|
|
|
mime = g_strdup_printf ("audio/x-gst_ff-%s", codec->name);
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, mime, NULL);
|
2004-06-14 01:21:01 +00:00
|
|
|
if (context)
|
2004-06-14 01:26:15 +00:00
|
|
|
gst_caps_set_simple (caps,
|
|
|
|
"block_align", G_TYPE_INT, context->block_align,
|
|
|
|
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
|
2004-03-15 00:01:03 +00:00
|
|
|
g_free (mime);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
if (caps != NULL) {
|
2004-10-01 10:50:58 +00:00
|
|
|
|
|
|
|
/* set private data */
|
|
|
|
if (context && context->extradata_size > 0) {
|
|
|
|
GstBuffer *data = gst_buffer_new_and_alloc (context->extradata_size);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2004-10-01 10:50:58 +00:00
|
|
|
memcpy (GST_BUFFER_DATA (data), context->extradata,
|
|
|
|
context->extradata_size);
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, data, NULL);
|
2004-10-01 10:50:58 +00:00
|
|
|
gst_buffer_unref (data);
|
|
|
|
}
|
|
|
|
|
2004-10-02 20:26:10 +00:00
|
|
|
/* palette */
|
|
|
|
if (context) {
|
|
|
|
gst_ffmpeg_set_palette (caps, context);
|
|
|
|
}
|
|
|
|
|
2006-02-06 17:51:41 +00:00
|
|
|
GST_LOG ("caps for codec_id=%d: %" GST_PTR_FORMAT, codec_id, caps);
|
2004-10-01 10:50:58 +00:00
|
|
|
|
2003-07-06 20:49:15 +00:00
|
|
|
} else {
|
2006-05-26 12:42:06 +00:00
|
|
|
GST_LOG ("No caps found for codec_id=%d", codec_id);
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a FFMPEG Pixel Format and optional AVCodecContext
|
|
|
|
* to a GstCaps. If the context is ommitted, no fixed values
|
|
|
|
* for video/audio size will be included in the GstCaps
|
|
|
|
*
|
|
|
|
* See below for usefullness
|
|
|
|
*/
|
|
|
|
|
|
|
|
static GstCaps *
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context,
|
|
|
|
enum CodecID codec_id)
|
2003-06-07 00:41:32 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
|
|
|
|
|
|
|
int bpp = 0, depth = 0, endianness = 0;
|
2005-01-25 15:17:44 +00:00
|
|
|
gulong g_mask = 0, r_mask = 0, b_mask = 0, a_mask = 0;
|
2003-06-07 00:41:32 +00:00
|
|
|
guint32 fmt = 0;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
switch (pix_fmt) {
|
2005-05-02 09:12:59 +00:00
|
|
|
case PIX_FMT_YUVJ420P:
|
2003-06-07 00:41:32 +00:00
|
|
|
case PIX_FMT_YUV420P:
|
2004-03-29 16:39:18 +00:00
|
|
|
fmt = GST_MAKE_FOURCC ('I', '4', '2', '0');
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV422:
|
2004-03-29 16:39:18 +00:00
|
|
|
fmt = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_RGB24:
|
|
|
|
bpp = depth = 24;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
2004-03-29 16:39:18 +00:00
|
|
|
r_mask = 0xff0000;
|
|
|
|
g_mask = 0x00ff00;
|
|
|
|
b_mask = 0x0000ff;
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_BGR24:
|
|
|
|
bpp = depth = 24;
|
2003-07-06 20:49:15 +00:00
|
|
|
endianness = G_BIG_ENDIAN;
|
2004-03-29 16:39:18 +00:00
|
|
|
r_mask = 0x0000ff;
|
|
|
|
g_mask = 0x00ff00;
|
|
|
|
b_mask = 0xff0000;
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
2005-05-02 09:12:59 +00:00
|
|
|
case PIX_FMT_YUVJ422P:
|
2003-06-07 00:41:32 +00:00
|
|
|
case PIX_FMT_YUV422P:
|
2004-03-29 16:39:18 +00:00
|
|
|
fmt = GST_MAKE_FOURCC ('Y', '4', '2', 'B');
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
2005-05-02 09:12:59 +00:00
|
|
|
case PIX_FMT_YUVJ444P:
|
2003-06-07 00:41:32 +00:00
|
|
|
case PIX_FMT_YUV444P:
|
2005-05-17 18:29:17 +00:00
|
|
|
fmt = GST_MAKE_FOURCC ('Y', '4', '4', '4');
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_RGBA32:
|
2004-03-29 16:39:18 +00:00
|
|
|
bpp = 32;
|
2005-01-25 15:17:44 +00:00
|
|
|
depth = 32;
|
2003-07-06 20:49:15 +00:00
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
2008-03-06 12:18:48 +00:00
|
|
|
r_mask = 0x00ff0000;
|
2004-03-29 16:39:18 +00:00
|
|
|
g_mask = 0x0000ff00;
|
2008-03-06 12:18:48 +00:00
|
|
|
b_mask = 0x000000ff;
|
2005-01-25 15:17:44 +00:00
|
|
|
a_mask = 0xff000000;
|
2004-03-29 16:39:18 +00:00
|
|
|
#else
|
2008-03-06 12:18:48 +00:00
|
|
|
r_mask = 0x0000ff00;
|
2004-03-29 16:39:18 +00:00
|
|
|
g_mask = 0x00ff0000;
|
2008-03-06 12:18:48 +00:00
|
|
|
b_mask = 0xff000000;
|
2005-01-25 15:17:44 +00:00
|
|
|
a_mask = 0x000000ff;
|
2003-07-06 20:49:15 +00:00
|
|
|
#endif
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV410P:
|
2004-03-29 16:39:18 +00:00
|
|
|
fmt = GST_MAKE_FOURCC ('Y', 'U', 'V', '9');
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_YUV411P:
|
2004-03-29 16:39:18 +00:00
|
|
|
fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_RGB565:
|
|
|
|
bpp = depth = 16;
|
|
|
|
endianness = G_BYTE_ORDER;
|
2004-03-29 16:39:18 +00:00
|
|
|
r_mask = 0xf800;
|
|
|
|
g_mask = 0x07e0;
|
|
|
|
b_mask = 0x001f;
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
case PIX_FMT_RGB555:
|
2004-03-29 16:39:18 +00:00
|
|
|
bpp = 16;
|
|
|
|
depth = 15;
|
2003-06-07 00:41:32 +00:00
|
|
|
endianness = G_BYTE_ORDER;
|
2004-03-29 16:39:18 +00:00
|
|
|
r_mask = 0x7c00;
|
|
|
|
g_mask = 0x03e0;
|
|
|
|
b_mask = 0x001f;
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
2004-10-02 14:10:27 +00:00
|
|
|
case PIX_FMT_PAL8:
|
|
|
|
bpp = depth = 8;
|
|
|
|
endianness = G_BYTE_ORDER;
|
|
|
|
break;
|
2005-05-13 14:33:09 +00:00
|
|
|
case PIX_FMT_GRAY8:
|
|
|
|
bpp = depth = 8;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-gray",
|
|
|
|
"bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
|
2005-05-13 14:33:09 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
default:
|
|
|
|
/* give up ... */
|
|
|
|
break;
|
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2005-05-13 14:33:09 +00:00
|
|
|
if (caps == NULL) {
|
|
|
|
if (bpp != 0) {
|
|
|
|
if (r_mask != 0) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, bpp,
|
|
|
|
"depth", G_TYPE_INT, depth,
|
|
|
|
"red_mask", G_TYPE_INT, r_mask,
|
|
|
|
"green_mask", G_TYPE_INT, g_mask,
|
|
|
|
"blue_mask", G_TYPE_INT, b_mask,
|
|
|
|
"endianness", G_TYPE_INT, endianness, NULL);
|
2005-12-06 19:57:08 +00:00
|
|
|
if (a_mask) {
|
|
|
|
gst_caps_set_simple (caps, "alpha_mask", G_TYPE_INT, a_mask, NULL);
|
|
|
|
}
|
2005-05-13 14:33:09 +00:00
|
|
|
} else {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, bpp,
|
|
|
|
"depth", G_TYPE_INT, depth,
|
|
|
|
"endianness", G_TYPE_INT, endianness, NULL);
|
2005-12-06 19:57:08 +00:00
|
|
|
if (context) {
|
|
|
|
gst_ffmpeg_set_palette (caps, context);
|
|
|
|
}
|
2004-10-02 14:10:27 +00:00
|
|
|
}
|
2005-05-13 14:33:09 +00:00
|
|
|
} else if (fmt) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-yuv",
|
|
|
|
"format", GST_TYPE_FOURCC, fmt, NULL);
|
2004-10-02 14:10:27 +00:00
|
|
|
}
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (caps != NULL) {
|
2003-12-22 01:46:58 +00:00
|
|
|
char *str = gst_caps_to_string (caps);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
GST_DEBUG ("caps for pix_fmt=%d: %s", pix_fmt, str);
|
2004-03-29 16:39:18 +00:00
|
|
|
g_free (str);
|
2003-07-06 20:49:15 +00:00
|
|
|
} else {
|
2006-05-26 12:42:06 +00:00
|
|
|
GST_LOG ("No caps found for pix_fmt=%d", pix_fmt);
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a FFMPEG Sample Format and optional AVCodecContext
|
|
|
|
* to a GstCaps. If the context is ommitted, no fixed values
|
|
|
|
* for video/audio size will be included in the GstCaps
|
|
|
|
*
|
|
|
|
* See below for usefullness
|
|
|
|
*/
|
|
|
|
|
|
|
|
static GstCaps *
|
2004-03-29 16:39:18 +00:00
|
|
|
gst_ffmpeg_smpfmt_to_caps (enum SampleFormat sample_fmt,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
AVCodecContext * context, enum CodecID codec_id)
|
2003-06-07 00:41:32 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
|
|
|
|
|
|
|
int bpp = 0;
|
|
|
|
gboolean signedness = FALSE;
|
|
|
|
|
|
|
|
switch (sample_fmt) {
|
|
|
|
case SAMPLE_FMT_S16:
|
|
|
|
signedness = TRUE;
|
|
|
|
bpp = 16;
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
2002-11-06 23:53:46 +00:00
|
|
|
default:
|
2003-06-07 00:41:32 +00:00
|
|
|
/* .. */
|
2002-11-06 23:53:46 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
if (bpp) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-raw-int",
|
2004-03-29 16:39:18 +00:00
|
|
|
"signed", G_TYPE_BOOLEAN, signedness,
|
|
|
|
"endianness", G_TYPE_INT, G_BYTE_ORDER,
|
|
|
|
"width", G_TYPE_INT, bpp, "depth", G_TYPE_INT, bpp, NULL);
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (caps != NULL) {
|
2003-12-22 01:46:58 +00:00
|
|
|
char *str = gst_caps_to_string (caps);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2006-02-06 17:51:41 +00:00
|
|
|
GST_LOG ("caps for sample_fmt=%d: %s", sample_fmt, str);
|
2004-03-29 16:39:18 +00:00
|
|
|
g_free (str);
|
2003-07-06 20:49:15 +00:00
|
|
|
} else {
|
2006-05-26 12:42:06 +00:00
|
|
|
GST_LOG ("No caps found for sample_fmt=%d", sample_fmt);
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a FFMPEG codec Type and optional AVCodecContext
|
|
|
|
* to a GstCaps. If the context is ommitted, no fixed values
|
|
|
|
* for video/audio size will be included in the GstCaps
|
|
|
|
*
|
|
|
|
* CodecType is primarily meant for uncompressed data GstCaps!
|
|
|
|
*/
|
|
|
|
|
|
|
|
GstCaps *
|
2004-03-29 16:39:18 +00:00
|
|
|
gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
AVCodecContext * context, enum CodecID codec_id)
|
2003-06-07 00:41:32 +00:00
|
|
|
{
|
2003-12-22 01:46:58 +00:00
|
|
|
GstCaps *caps;
|
2003-06-07 00:41:32 +00:00
|
|
|
|
|
|
|
switch (codec_type) {
|
|
|
|
case CODEC_TYPE_VIDEO:
|
|
|
|
if (context) {
|
2004-10-25 11:56:52 +00:00
|
|
|
caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->width == -1 ? NULL : context, codec_id);
|
2003-06-07 00:41:32 +00:00
|
|
|
} else {
|
|
|
|
GstCaps *temp;
|
|
|
|
enum PixelFormat i;
|
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
caps = gst_caps_new_empty ();
|
2003-06-07 00:41:32 +00:00
|
|
|
for (i = 0; i < PIX_FMT_NB; i++) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
temp = gst_ffmpeg_pixfmt_to_caps (i, NULL, codec_id);
|
2003-06-07 00:41:32 +00:00
|
|
|
if (temp != NULL) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gst_caps_append (caps, temp);
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_TYPE_AUDIO:
|
|
|
|
if (context) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps =
|
|
|
|
gst_ffmpeg_smpfmt_to_caps (context->sample_fmt, context, codec_id);
|
2003-06-07 00:41:32 +00:00
|
|
|
} else {
|
|
|
|
GstCaps *temp;
|
|
|
|
enum SampleFormat i;
|
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
caps = gst_caps_new_empty ();
|
2003-06-07 00:41:32 +00:00
|
|
|
for (i = 0; i <= SAMPLE_FMT_S16; i++) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
temp = gst_ffmpeg_smpfmt_to_caps (i, NULL, codec_id);
|
2003-06-07 00:41:32 +00:00
|
|
|
if (temp != NULL) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gst_caps_append (caps, temp);
|
2003-06-07 00:41:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
/* .. */
|
2003-12-22 01:46:58 +00:00
|
|
|
caps = NULL;
|
2003-06-07 00:41:32 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
2002-11-06 23:53:46 +00:00
|
|
|
}
|
2003-06-07 20:45:56 +00:00
|
|
|
|
|
|
|
/* Convert a GstCaps (audio/raw) to a FFMPEG SampleFmt
|
|
|
|
* and other audio properties in a AVCodecContext.
|
|
|
|
*
|
|
|
|
* For usefullness, see below
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_ffmpeg_caps_to_smpfmt (const GstCaps * caps,
|
|
|
|
AVCodecContext * context, gboolean raw)
|
2003-06-07 20:45:56 +00:00
|
|
|
{
|
2003-12-22 01:46:58 +00:00
|
|
|
GstStructure *structure;
|
|
|
|
gint depth = 0, width = 0, endianness = 0;
|
|
|
|
gboolean signedness = FALSE;
|
|
|
|
|
|
|
|
g_return_if_fail (gst_caps_get_size (caps) == 1);
|
|
|
|
structure = gst_caps_get_structure (caps, 0);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_structure_get_int (structure, "channels", &context->channels);
|
|
|
|
gst_structure_get_int (structure, "rate", &context->sample_rate);
|
|
|
|
gst_structure_get_int (structure, "block_align", &context->block_align);
|
|
|
|
gst_structure_get_int (structure, "bitrate", &context->bit_rate);
|
|
|
|
|
|
|
|
if (!raw)
|
|
|
|
return;
|
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
if (gst_structure_get_int (structure, "width", &width) &&
|
|
|
|
gst_structure_get_int (structure, "depth", &depth) &&
|
2006-12-21 12:21:51 +00:00
|
|
|
gst_structure_get_boolean (structure, "signed", &signedness) &&
|
2003-12-22 01:46:58 +00:00
|
|
|
gst_structure_get_int (structure, "endianness", &endianness)) {
|
2003-06-07 20:45:56 +00:00
|
|
|
if (width == 16 && depth == 16 &&
|
|
|
|
endianness == G_BYTE_ORDER && signedness == TRUE) {
|
|
|
|
context->sample_fmt = SAMPLE_FMT_S16;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-11-05 23:19:38 +00:00
|
|
|
|
2003-06-07 20:45:56 +00:00
|
|
|
/* Convert a GstCaps (video/raw) to a FFMPEG PixFmt
|
|
|
|
* and other video properties in a AVCodecContext.
|
|
|
|
*
|
|
|
|
* For usefullness, see below
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
|
|
|
|
AVCodecContext * context, gboolean raw)
|
2003-06-07 20:45:56 +00:00
|
|
|
{
|
2003-12-22 01:46:58 +00:00
|
|
|
GstStructure *structure;
|
2005-11-22 23:12:51 +00:00
|
|
|
const GValue *fps;
|
2006-02-12 21:03:53 +00:00
|
|
|
const GValue *par = NULL;
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2006-02-12 19:54:16 +00:00
|
|
|
GST_DEBUG ("converting caps %" GST_PTR_FORMAT, caps);
|
2003-12-22 01:46:58 +00:00
|
|
|
g_return_if_fail (gst_caps_get_size (caps) == 1);
|
|
|
|
structure = gst_caps_get_structure (caps, 0);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
gst_structure_get_int (structure, "width", &context->width);
|
|
|
|
gst_structure_get_int (structure, "height", &context->height);
|
2005-01-25 15:17:44 +00:00
|
|
|
gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
|
2003-06-07 20:45:56 +00:00
|
|
|
|
2005-11-22 23:12:51 +00:00
|
|
|
fps = gst_structure_get_value (structure, "framerate");
|
2005-11-22 23:33:41 +00:00
|
|
|
if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
|
2005-09-19 12:01:27 +00:00
|
|
|
|
2005-11-22 23:33:41 +00:00
|
|
|
/* somehow these seem mixed up.. */
|
|
|
|
context->time_base.den = gst_value_get_fraction_numerator (fps);
|
|
|
|
context->time_base.num = gst_value_get_fraction_denominator (fps);
|
2005-09-19 12:01:27 +00:00
|
|
|
|
2005-11-22 23:33:41 +00:00
|
|
|
GST_DEBUG ("setting framerate %d/%d = %lf",
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->time_base.den, context->time_base.num,
|
|
|
|
1. * context->time_base.den / context->time_base.num);
|
2005-11-22 23:33:41 +00:00
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
|
2006-02-12 19:54:16 +00:00
|
|
|
par = gst_structure_get_value (structure, "pixel-aspect-ratio");
|
2006-02-12 21:03:53 +00:00
|
|
|
if (par && GST_VALUE_HOLDS_FRACTION (par)) {
|
2006-02-12 19:54:16 +00:00
|
|
|
|
|
|
|
context->sample_aspect_ratio.num = gst_value_get_fraction_numerator (par);
|
|
|
|
context->sample_aspect_ratio.den = gst_value_get_fraction_denominator (par);
|
|
|
|
|
|
|
|
GST_DEBUG ("setting pixel-aspect-ratio %d/%d = %lf",
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->sample_aspect_ratio.den, context->sample_aspect_ratio.num,
|
|
|
|
1. * context->sample_aspect_ratio.den /
|
|
|
|
context->sample_aspect_ratio.num);
|
2006-02-12 19:54:16 +00:00
|
|
|
}
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (!raw)
|
|
|
|
return;
|
|
|
|
|
2006-02-12 19:54:16 +00:00
|
|
|
g_return_if_fail (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps));
|
2005-11-22 23:33:41 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
if (strcmp (gst_structure_get_name (structure), "video/x-raw-yuv") == 0) {
|
|
|
|
guint32 fourcc;
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
if (gst_structure_get_fourcc (structure, "format", &fourcc)) {
|
2003-11-25 04:48:31 +00:00
|
|
|
switch (fourcc) {
|
2004-03-29 16:39:18 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV422;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV420P;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV411P;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV422P;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV410P;
|
|
|
|
break;
|
2003-10-26 11:30:18 +00:00
|
|
|
#if 0
|
2004-03-29 16:39:18 +00:00
|
|
|
case FIXME:
|
|
|
|
context->pix_fmt = PIX_FMT_YUV444P;
|
|
|
|
break;
|
2003-10-26 11:30:18 +00:00
|
|
|
#endif
|
2003-11-25 04:48:31 +00:00
|
|
|
}
|
|
|
|
}
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (strcmp (gst_structure_get_name (structure),
|
|
|
|
"video/x-raw-rgb") == 0) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint bpp = 0, rmask = 0, endianness = 0;
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
if (gst_structure_get_int (structure, "bpp", &bpp) &&
|
2004-10-02 14:10:27 +00:00
|
|
|
gst_structure_get_int (structure, "endianness", &endianness)) {
|
|
|
|
if (gst_structure_get_int (structure, "red_mask", &rmask)) {
|
|
|
|
switch (bpp) {
|
|
|
|
case 32:
|
2003-11-28 20:06:18 +00:00
|
|
|
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
|
2004-10-02 14:10:27 +00:00
|
|
|
if (rmask == 0x00ff0000)
|
2003-11-28 20:06:18 +00:00
|
|
|
#else
|
2004-10-02 14:10:27 +00:00
|
|
|
if (rmask == 0x0000ff00)
|
2003-11-28 20:06:18 +00:00
|
|
|
#endif
|
2004-10-02 14:10:27 +00:00
|
|
|
context->pix_fmt = PIX_FMT_RGBA32;
|
|
|
|
break;
|
|
|
|
case 24:
|
|
|
|
if (rmask == 0x0000FF)
|
|
|
|
context->pix_fmt = PIX_FMT_BGR24;
|
|
|
|
else
|
|
|
|
context->pix_fmt = PIX_FMT_RGB24;
|
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
if (endianness == G_BYTE_ORDER)
|
|
|
|
context->pix_fmt = PIX_FMT_RGB565;
|
|
|
|
break;
|
|
|
|
case 15:
|
|
|
|
if (endianness == G_BYTE_ORDER)
|
|
|
|
context->pix_fmt = PIX_FMT_RGB555;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
/* nothing */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (bpp == 8) {
|
|
|
|
context->pix_fmt = PIX_FMT_PAL8;
|
|
|
|
gst_ffmpeg_get_palette (caps, context);
|
|
|
|
}
|
2003-11-25 04:48:31 +00:00
|
|
|
}
|
2003-06-07 20:45:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a GstCaps and a FFMPEG codec Type to a
|
|
|
|
* AVCodecContext. If the context is ommitted, no fixed values
|
|
|
|
* for video/audio size will be included in the context
|
|
|
|
*
|
|
|
|
* CodecType is primarily meant for uncompressed data GstCaps!
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_ffmpeg_caps_with_codectype (enum CodecType type,
|
2004-03-29 16:39:18 +00:00
|
|
|
const GstCaps * caps, AVCodecContext * context)
|
2003-06-07 20:45:56 +00:00
|
|
|
{
|
|
|
|
if (context == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case CODEC_TYPE_VIDEO:
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_ffmpeg_caps_to_pixfmt (caps, context, TRUE);
|
2003-06-07 20:45:56 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CODEC_TYPE_AUDIO:
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_ffmpeg_caps_to_smpfmt (caps, context, TRUE);
|
2003-06-07 20:45:56 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
/* unknown */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-06-08 13:30:10 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
/*
|
|
|
|
* caps_with_codecid () transforms a GstCaps for a known codec
|
|
|
|
* ID into a filled-in context.
|
2007-04-12 11:06:46 +00:00
|
|
|
* codec_data from caps will override possible extradata already in the context
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
*/
|
2005-09-30 09:29:22 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
void
|
|
|
|
gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
enum CodecType codec_type, const GstCaps * caps, AVCodecContext * context)
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
{
|
|
|
|
GstStructure *str = gst_caps_get_structure (caps, 0);
|
2004-10-01 10:50:58 +00:00
|
|
|
const GValue *value;
|
|
|
|
const GstBuffer *buf;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
|
|
|
|
if (!context)
|
|
|
|
return;
|
|
|
|
|
2004-10-01 10:50:58 +00:00
|
|
|
/* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
|
|
|
|
if ((value = gst_structure_get_value (str, "codec_data"))) {
|
2006-08-21 16:33:15 +00:00
|
|
|
gint size;
|
|
|
|
|
|
|
|
buf = GST_BUFFER_CAST (gst_value_get_mini_object (value));
|
|
|
|
size = GST_BUFFER_SIZE (buf);
|
|
|
|
|
2007-04-12 11:06:46 +00:00
|
|
|
/* free the old one if it is there */
|
|
|
|
if (context->extradata)
|
|
|
|
av_free (context->extradata);
|
|
|
|
|
2006-08-21 16:33:15 +00:00
|
|
|
/* allocate with enough padding */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->extradata =
|
|
|
|
av_mallocz (GST_ROUND_UP_16 (size + FF_INPUT_BUFFER_PADDING_SIZE));
|
2006-08-21 16:33:15 +00:00
|
|
|
memcpy (context->extradata, GST_BUFFER_DATA (buf), size);
|
|
|
|
context->extradata_size = size;
|
2007-08-07 10:21:19 +00:00
|
|
|
GST_DEBUG ("have codec data of size %d", size);
|
2007-04-12 11:06:46 +00:00
|
|
|
} else if (context->extradata == NULL) {
|
2006-08-21 16:33:15 +00:00
|
|
|
/* no extradata, alloc dummy with 0 sized, some codecs insist on reading
|
|
|
|
* extradata anyway which makes then segfault. */
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->extradata =
|
|
|
|
av_mallocz (GST_ROUND_UP_16 (FF_INPUT_BUFFER_PADDING_SIZE));
|
2006-08-21 16:33:15 +00:00
|
|
|
context->extradata_size = 0;
|
2007-08-07 10:21:19 +00:00
|
|
|
GST_DEBUG ("no codec data");
|
2004-10-01 10:50:58 +00:00
|
|
|
}
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_MPEG4:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
const gchar *mime = gst_structure_get_name (str);
|
|
|
|
|
|
|
|
if (!strcmp (mime, "video/x-divx"))
|
|
|
|
context->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
|
|
|
|
else if (!strcmp (mime, "video/x-xvid"))
|
|
|
|
context->codec_tag = GST_MAKE_FOURCC ('X', 'V', 'I', 'D');
|
|
|
|
else if (!strcmp (mime, "video/x-3ivx"))
|
|
|
|
context->codec_tag = GST_MAKE_FOURCC ('3', 'I', 'V', '1');
|
|
|
|
else if (!strcmp (mime, "video/mpeg"))
|
|
|
|
context->codec_tag = GST_MAKE_FOURCC ('m', 'p', '4', 'v');
|
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
break;
|
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
case CODEC_ID_SVQ3:
|
|
|
|
/* FIXME: this is a workaround for older gst-plugins releases
|
|
|
|
* (<= 0.8.9). This should be removed at some point, because
|
|
|
|
* it causes wrong decoded frame order. */
|
|
|
|
if (!context->extradata) {
|
|
|
|
gint halfpel_flag, thirdpel_flag, low_delay, unknown_svq3_flag;
|
|
|
|
guint16 flags;
|
|
|
|
|
|
|
|
if (gst_structure_get_int (str, "halfpel_flag", &halfpel_flag) ||
|
|
|
|
gst_structure_get_int (str, "thirdpel_flag", &thirdpel_flag) ||
|
|
|
|
gst_structure_get_int (str, "low_delay", &low_delay) ||
|
|
|
|
gst_structure_get_int (str, "unknown_svq3_flag",
|
|
|
|
&unknown_svq3_flag)) {
|
|
|
|
context->extradata = (guint8 *) av_mallocz (0x64);
|
2007-12-17 12:43:06 +00:00
|
|
|
g_stpcpy ((gchar *) context->extradata, "SVQ3");
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
flags = 1 << 3;
|
|
|
|
flags |= low_delay;
|
|
|
|
flags = flags << 2;
|
|
|
|
flags |= unknown_svq3_flag;
|
|
|
|
flags = flags << 6;
|
|
|
|
flags |= halfpel_flag;
|
|
|
|
flags = flags << 1;
|
|
|
|
flags |= thirdpel_flag;
|
|
|
|
flags = flags << 3;
|
|
|
|
|
|
|
|
flags = GUINT16_FROM_LE (flags);
|
|
|
|
|
2007-11-08 14:44:36 +00:00
|
|
|
memcpy ((gchar *) context->extradata + 0x62, &flags, 2);
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->extradata_size = 0x64;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
2005-06-10 23:55:38 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
case CODEC_ID_MSRLE:
|
|
|
|
case CODEC_ID_QTRLE:
|
2007-01-22 10:26:04 +00:00
|
|
|
case CODEC_ID_TSCC:
|
2008-04-19 19:43:54 +00:00
|
|
|
case CODEC_ID_APE:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint depth;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
|
2007-01-22 10:26:04 +00:00
|
|
|
if (gst_structure_get_int (str, "depth", &depth)) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
context->bits_per_sample = depth;
|
2007-01-22 10:26:04 +00:00
|
|
|
} else {
|
|
|
|
GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
|
|
|
|
}
|
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
break;
|
2004-04-23 00:49:10 +00:00
|
|
|
|
2004-10-04 16:11:30 +00:00
|
|
|
case CODEC_ID_RV10:
|
|
|
|
case CODEC_ID_RV20:
|
2007-10-01 17:27:42 +00:00
|
|
|
case CODEC_ID_RV30:
|
2006-05-07 01:18:46 +00:00
|
|
|
case CODEC_ID_RV40:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
2007-08-07 10:21:19 +00:00
|
|
|
gint format;
|
2004-10-04 16:11:30 +00:00
|
|
|
|
2007-08-07 10:21:19 +00:00
|
|
|
if (gst_structure_get_int (str, "format", &format))
|
|
|
|
context->sub_id = format;
|
|
|
|
|
2004-10-04 16:11:30 +00:00
|
|
|
break;
|
2007-08-07 10:21:19 +00:00
|
|
|
}
|
2006-02-19 22:40:16 +00:00
|
|
|
case CODEC_ID_COOK:
|
|
|
|
case CODEC_ID_RA_288:
|
|
|
|
case CODEC_ID_RA_144:
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
{
|
|
|
|
gint leaf_size;
|
|
|
|
gint bitrate;
|
|
|
|
|
|
|
|
if (gst_structure_get_int (str, "leaf_size", &leaf_size))
|
|
|
|
context->block_align = leaf_size;
|
|
|
|
if (gst_structure_get_int (str, "bitrate", &bitrate))
|
|
|
|
context->bit_rate = bitrate;
|
|
|
|
}
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_ALAC:
|
|
|
|
gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
|
|
|
|
break;
|
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
case CODEC_ID_DVVIDEO:
|
2006-10-24 09:27:16 +00:00
|
|
|
{
|
|
|
|
guint32 fourcc;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-10-24 09:27:16 +00:00
|
|
|
if (gst_structure_get_fourcc (str, "format", &fourcc))
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
switch (fourcc) {
|
|
|
|
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV422;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV420P;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('Y', '4', '1', 'B'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV411P;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('Y', '4', '2', 'B'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV422P;
|
|
|
|
break;
|
|
|
|
case GST_MAKE_FOURCC ('Y', 'U', 'V', '9'):
|
|
|
|
context->pix_fmt = PIX_FMT_YUV410P;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
GST_WARNING ("couldn't convert fourcc %" GST_FOURCC_FORMAT
|
|
|
|
" to a pixel format", GST_FOURCC_ARGS (fourcc));
|
|
|
|
break;
|
|
|
|
}
|
2006-10-24 09:27:16 +00:00
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2004-04-23 00:49:10 +00:00
|
|
|
default:
|
|
|
|
break;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
}
|
|
|
|
|
2004-10-25 11:56:52 +00:00
|
|
|
if (!gst_caps_is_fixed (caps))
|
|
|
|
return;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
/* common properties (width, height, fps) */
|
|
|
|
switch (codec_type) {
|
|
|
|
case CODEC_TYPE_VIDEO:
|
|
|
|
gst_ffmpeg_caps_to_pixfmt (caps, context, codec_id == CODEC_ID_RAWVIDEO);
|
2004-10-02 20:26:10 +00:00
|
|
|
gst_ffmpeg_get_palette (caps, context);
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
break;
|
|
|
|
case CODEC_TYPE_AUDIO:
|
|
|
|
gst_ffmpeg_caps_to_smpfmt (caps, context, FALSE);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-06-08 13:30:10 +00:00
|
|
|
/* _formatid_to_caps () is meant for muxers/demuxers, it
|
|
|
|
* transforms a name (ffmpeg way of ID'ing these, why don't
|
|
|
|
* they have unique numerical IDs?) to the corresponding
|
|
|
|
* caps belonging to that mux-format
|
|
|
|
*
|
|
|
|
* Note: we don't need any additional info because the caps
|
|
|
|
* isn't supposed to contain any useful info besides the
|
|
|
|
* media type anyway
|
|
|
|
*/
|
|
|
|
|
|
|
|
GstCaps *
|
2004-03-29 16:39:18 +00:00
|
|
|
gst_ffmpeg_formatid_to_caps (const gchar * format_name)
|
2003-06-08 13:30:10 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps = NULL;
|
|
|
|
|
|
|
|
if (!strcmp (format_name, "mpeg")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
caps = gst_caps_new_simple ("video/mpeg",
|
2004-03-29 16:39:18 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "mpegts")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
caps = gst_caps_new_simple ("video/mpegts",
|
2004-03-29 16:39:18 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "rm")) {
|
HACKING: Add some basic documentation on how our wrapping works.
Original commit message from CVS:
* HACKING:
Add some basic documentation on how our wrapping works.
* TODO:
Add a list of things that could be worked on or that need doing.
* configure.ac:
Update snapshot.
* ext/ffmpeg/Makefile.am:
Changne .la links. See below (autotools patch).
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable demuxers. See below (gstffmpegdemux.c).
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps):
Realmedia caused a crash - fix that.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_averror),
(gst_ffmpegdemux_base_init), (gst_ffmpegdemux_init),
(gst_ffmpegdemux_close), (gst_ffmpegdemux_dispose),
(gst_ffmpegdemux_stream_from_pad),
(gst_ffmpegdemux_src_event_mask), (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list),
(gst_ffmpegdemux_src_query_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_open), (gst_ffmpegdemux_loop),
(gst_ffmpegdemux_change_state), (gst_ffmpegdemux_register):
Right. OK, so I fixed up the demuxing and have it basically-working,
and the best way to get some more people to test it is to actually
enable it. I'm not sure if we want this for 0.8.0, but we can at
least give it a try. I've tested avi, matroska and mpeg, all appear
to work. The cool thing is that this gives us instant support for
several exotic formats that we'd never care about ourselves. Again,
this needs more testing for it to still be enabled in 0.8.0, but I
want to give it a try...
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init),
(gst_ffmpegmux_init), (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
Add some fixups that I use locally. Make it work in the case of
MPEG encoding, but the muxer is still not in shape to be enabled.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_read), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Some small fixups that crept into it while it was disabled for the
last few years. Basically works.
* gst-libs/ext/ffmpeg/Makefile.am:
Instead of having our local-autotoolized version, I patch the ffmpeg
source to be fully autotoolized. That means a simple SUBDIRS here
is now enough.
* gst-libs/ext/ffmpeg/Tag:
Version update.
* gst-libs/ext/ffmpeg/patch/autotools.diff:
Autotoolize ffmpeg. Needs to be sent to ffmpeg-devel@...
* gst-libs/ext/ffmpeg/patch/disableinstalllibs.diff:
Don't install their libs.
* gst-libs/ext/ffmpeg/patch/disablemmx.diff:
Don't use MMX. It cannot ocmpile using PIC.
* gst-libs/ext/ffmpeg/patch/disabletools.diff:
Don't compile/install their tools, we don't use them.
* gst-libs/ext/ffmpeg/patch/functions.diff:
Prevent symbol conflicts.
* gst-libs/ext/ffmpeg/patch/matroska.diff:
Add a matroska demuxer. Needs to be sent to ffmpeg-devel@...
2004-03-01 04:59:17 +00:00
|
|
|
caps = gst_caps_new_simple ("application/x-pn-realmedia",
|
2004-03-29 16:39:18 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "asf")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "avi")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-msvideo", NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "wav")) {
|
2004-05-11 01:54:59 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-wav", NULL);
|
2008-04-19 19:43:54 +00:00
|
|
|
} else if (!strcmp (format_name, "ape")) {
|
|
|
|
caps = gst_caps_new_simple ("application/x-ape", NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "swf")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
caps = gst_caps_new_simple ("application/x-shockwave-flash", NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "au")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
caps = gst_caps_new_simple ("audio/x-au", NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "dv")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-dv",
|
2004-03-29 16:39:18 +00:00
|
|
|
"systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else if (!strcmp (format_name, "4xm")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-4xm", NULL);
|
2004-03-05 02:40:34 +00:00
|
|
|
} else if (!strcmp (format_name, "matroska")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
caps = gst_caps_new_simple ("video/x-matroska", NULL);
|
2004-12-18 20:27:05 +00:00
|
|
|
} else if (!strcmp (format_name, "mp3")) {
|
|
|
|
caps = gst_caps_new_simple ("application/x-id3", NULL);
|
2005-01-19 17:25:29 +00:00
|
|
|
} else if (!strcmp (format_name, "flic")) {
|
|
|
|
caps = gst_caps_new_simple ("video/x-fli", NULL);
|
2005-06-27 20:41:55 +00:00
|
|
|
} else if (!strcmp (format_name, "flv")) {
|
|
|
|
caps = gst_caps_new_simple ("video/x-flv", NULL);
|
2006-02-19 16:54:51 +00:00
|
|
|
} else if (!strcmp (format_name, "tta")) {
|
|
|
|
caps = gst_caps_new_simple ("audio/x-ttafile", NULL);
|
|
|
|
} else if (!strcmp (format_name, "aiff")) {
|
|
|
|
caps = gst_caps_new_simple ("audio/x-aiff", NULL);
|
|
|
|
} else if (!strcmp (format_name, "mov_mp4_m4a_3gp_3g2")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
caps =
|
|
|
|
gst_caps_from_string
|
|
|
|
("application/x-3gp; video/quicktime; audio/x-m4a");
|
2006-04-19 15:35:12 +00:00
|
|
|
} else if (!strcmp (format_name, "mov")) {
|
|
|
|
caps = gst_caps_new_simple ("video/quicktime", NULL);
|
|
|
|
} else if (!strcmp (format_name, "mp4")) {
|
|
|
|
caps = gst_caps_new_simple ("video/quicktime", NULL);
|
|
|
|
} else if ((!strcmp (format_name, "3gp")) || (!strcmp (format_name, "3gp2"))) {
|
|
|
|
caps = gst_caps_new_simple ("application/x-3gp", NULL);
|
2006-02-21 14:14:39 +00:00
|
|
|
} else if (!strcmp (format_name, "aac")) {
|
|
|
|
caps = gst_caps_new_simple ("audio/mpeg",
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
"mpegversion", G_TYPE_INT, 4, NULL);
|
2006-02-21 14:14:39 +00:00
|
|
|
} else if (!strcmp (format_name, "gif")) {
|
|
|
|
caps = gst_caps_from_string ("image/gif");
|
|
|
|
} else if (!strcmp (format_name, "ogg")) {
|
|
|
|
caps = gst_caps_from_string ("application/ogg");
|
2006-10-09 13:31:55 +00:00
|
|
|
} else if (!strcmp (format_name, "mxf")) {
|
|
|
|
caps = gst_caps_from_string ("application/mxf");
|
|
|
|
} else if (!strcmp (format_name, "gxf")) {
|
|
|
|
caps = gst_caps_from_string ("application/gxf");
|
2006-02-21 14:14:39 +00:00
|
|
|
} else if (!strcmp (format_name, "yuv4mpegpipe")) {
|
|
|
|
caps = gst_caps_new_simple ("application/x-yuv4mpeg",
|
2007-01-11 10:02:40 +00:00
|
|
|
"y4mversion", G_TYPE_INT, 2, NULL);
|
2003-06-08 13:30:10 +00:00
|
|
|
} else {
|
HACKING: Add some basic documentation on how our wrapping works.
Original commit message from CVS:
* HACKING:
Add some basic documentation on how our wrapping works.
* TODO:
Add a list of things that could be worked on or that need doing.
* configure.ac:
Update snapshot.
* ext/ffmpeg/Makefile.am:
Changne .la links. See below (autotools patch).
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable demuxers. See below (gstffmpegdemux.c).
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps):
Realmedia caused a crash - fix that.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_averror),
(gst_ffmpegdemux_base_init), (gst_ffmpegdemux_init),
(gst_ffmpegdemux_close), (gst_ffmpegdemux_dispose),
(gst_ffmpegdemux_stream_from_pad),
(gst_ffmpegdemux_src_event_mask), (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list),
(gst_ffmpegdemux_src_query_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_open), (gst_ffmpegdemux_loop),
(gst_ffmpegdemux_change_state), (gst_ffmpegdemux_register):
Right. OK, so I fixed up the demuxing and have it basically-working,
and the best way to get some more people to test it is to actually
enable it. I'm not sure if we want this for 0.8.0, but we can at
least give it a try. I've tested avi, matroska and mpeg, all appear
to work. The cool thing is that this gives us instant support for
several exotic formats that we'd never care about ourselves. Again,
this needs more testing for it to still be enabled in 0.8.0, but I
want to give it a try...
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init),
(gst_ffmpegmux_init), (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
Add some fixups that I use locally. Make it work in the case of
MPEG encoding, but the muxer is still not in shape to be enabled.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_read), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Some small fixups that crept into it while it was disabled for the
last few years. Basically works.
* gst-libs/ext/ffmpeg/Makefile.am:
Instead of having our local-autotoolized version, I patch the ffmpeg
source to be fully autotoolized. That means a simple SUBDIRS here
is now enough.
* gst-libs/ext/ffmpeg/Tag:
Version update.
* gst-libs/ext/ffmpeg/patch/autotools.diff:
Autotoolize ffmpeg. Needs to be sent to ffmpeg-devel@...
* gst-libs/ext/ffmpeg/patch/disableinstalllibs.diff:
Don't install their libs.
* gst-libs/ext/ffmpeg/patch/disablemmx.diff:
Don't use MMX. It cannot ocmpile using PIC.
* gst-libs/ext/ffmpeg/patch/disabletools.diff:
Don't compile/install their tools, we don't use them.
* gst-libs/ext/ffmpeg/patch/functions.diff:
Prevent symbol conflicts.
* gst-libs/ext/ffmpeg/patch/matroska.diff:
Add a matroska demuxer. Needs to be sent to ffmpeg-devel@...
2004-03-01 04:59:17 +00:00
|
|
|
gchar *name;
|
|
|
|
|
2006-05-26 12:42:06 +00:00
|
|
|
GST_LOG ("Could not create stream format caps for %s", format_name);
|
HACKING: Add some basic documentation on how our wrapping works.
Original commit message from CVS:
* HACKING:
Add some basic documentation on how our wrapping works.
* TODO:
Add a list of things that could be worked on or that need doing.
* configure.ac:
Update snapshot.
* ext/ffmpeg/Makefile.am:
Changne .la links. See below (autotools patch).
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable demuxers. See below (gstffmpegdemux.c).
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps):
Realmedia caused a crash - fix that.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_averror),
(gst_ffmpegdemux_base_init), (gst_ffmpegdemux_init),
(gst_ffmpegdemux_close), (gst_ffmpegdemux_dispose),
(gst_ffmpegdemux_stream_from_pad),
(gst_ffmpegdemux_src_event_mask), (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list),
(gst_ffmpegdemux_src_query_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_open), (gst_ffmpegdemux_loop),
(gst_ffmpegdemux_change_state), (gst_ffmpegdemux_register):
Right. OK, so I fixed up the demuxing and have it basically-working,
and the best way to get some more people to test it is to actually
enable it. I'm not sure if we want this for 0.8.0, but we can at
least give it a try. I've tested avi, matroska and mpeg, all appear
to work. The cool thing is that this gives us instant support for
several exotic formats that we'd never care about ourselves. Again,
this needs more testing for it to still be enabled in 0.8.0, but I
want to give it a try...
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init),
(gst_ffmpegmux_init), (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
Add some fixups that I use locally. Make it work in the case of
MPEG encoding, but the muxer is still not in shape to be enabled.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_read), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Some small fixups that crept into it while it was disabled for the
last few years. Basically works.
* gst-libs/ext/ffmpeg/Makefile.am:
Instead of having our local-autotoolized version, I patch the ffmpeg
source to be fully autotoolized. That means a simple SUBDIRS here
is now enough.
* gst-libs/ext/ffmpeg/Tag:
Version update.
* gst-libs/ext/ffmpeg/patch/autotools.diff:
Autotoolize ffmpeg. Needs to be sent to ffmpeg-devel@...
* gst-libs/ext/ffmpeg/patch/disableinstalllibs.diff:
Don't install their libs.
* gst-libs/ext/ffmpeg/patch/disablemmx.diff:
Don't use MMX. It cannot ocmpile using PIC.
* gst-libs/ext/ffmpeg/patch/disabletools.diff:
Don't compile/install their tools, we don't use them.
* gst-libs/ext/ffmpeg/patch/functions.diff:
Prevent symbol conflicts.
* gst-libs/ext/ffmpeg/patch/matroska.diff:
Add a matroska demuxer. Needs to be sent to ffmpeg-devel@...
2004-03-01 04:59:17 +00:00
|
|
|
name = g_strdup_printf ("application/x-gst_ff-%s", format_name);
|
|
|
|
caps = gst_caps_new_simple (name, NULL);
|
|
|
|
g_free (name);
|
2003-06-08 13:30:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return caps;
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
gboolean
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
enum CodecID ** video_codec_list, enum CodecID ** audio_codec_list)
|
|
|
|
{
|
2006-04-19 15:35:12 +00:00
|
|
|
|
|
|
|
GST_LOG ("format_name : %s", format_name);
|
|
|
|
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
if (!strcmp (format_name, "mp4")) {
|
2006-12-07 18:07:32 +00:00
|
|
|
static enum CodecID mp4_video_list[] = {
|
2007-06-20 08:00:30 +00:00
|
|
|
CODEC_ID_MPEG4, CODEC_ID_H263, CODEC_ID_H264,
|
|
|
|
CODEC_ID_MJPEG,
|
|
|
|
CODEC_ID_NONE
|
2006-12-07 18:07:32 +00:00
|
|
|
};
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID mp4_audio_list[] = {
|
|
|
|
CODEC_ID_AAC, CODEC_ID_MP3, CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
|
|
|
|
CODEC_ID_NONE
|
2006-12-07 18:07:32 +00:00
|
|
|
};
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
|
|
|
|
*video_codec_list = mp4_video_list;
|
|
|
|
*audio_codec_list = mp4_audio_list;
|
2005-04-21 14:19:21 +00:00
|
|
|
} else if (!strcmp (format_name, "mpeg")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID mpeg_video_list[] = { CODEC_ID_MPEG1VIDEO,
|
|
|
|
CODEC_ID_MPEG2VIDEO,
|
|
|
|
CODEC_ID_H264,
|
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
2006-04-19 15:35:12 +00:00
|
|
|
static enum CodecID mpeg_audio_list[] = { CODEC_ID_MP2,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
CODEC_ID_MP3,
|
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
2005-04-21 14:19:21 +00:00
|
|
|
|
|
|
|
*video_codec_list = mpeg_video_list;
|
|
|
|
*audio_codec_list = mpeg_audio_list;
|
2006-04-19 15:35:12 +00:00
|
|
|
} else if (!strcmp (format_name, "mpegts")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID mpegts_video_list[] = { CODEC_ID_MPEG1VIDEO,
|
|
|
|
CODEC_ID_MPEG2VIDEO,
|
|
|
|
CODEC_ID_H264,
|
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
|
|
|
static enum CodecID mpegts_audio_list[] = { CODEC_ID_MP2,
|
|
|
|
CODEC_ID_MP3,
|
|
|
|
CODEC_ID_AC3,
|
|
|
|
CODEC_ID_DTS,
|
|
|
|
CODEC_ID_AAC,
|
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
2006-04-19 15:35:12 +00:00
|
|
|
|
|
|
|
*video_codec_list = mpegts_video_list;
|
|
|
|
*audio_codec_list = mpegts_audio_list;
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
} else if (!strcmp (format_name, "vob")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID vob_video_list[] =
|
|
|
|
{ CODEC_ID_MPEG2VIDEO, CODEC_ID_NONE };
|
|
|
|
static enum CodecID vob_audio_list[] = { CODEC_ID_MP2, CODEC_ID_AC3,
|
|
|
|
CODEC_ID_DTS, CODEC_ID_NONE
|
|
|
|
};
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
|
|
|
|
*video_codec_list = vob_video_list;
|
|
|
|
*audio_codec_list = vob_audio_list;
|
2005-06-27 20:41:55 +00:00
|
|
|
} else if (!strcmp (format_name, "flv")) {
|
|
|
|
static enum CodecID flv_video_list[] = { CODEC_ID_FLV1, CODEC_ID_NONE };
|
|
|
|
static enum CodecID flv_audio_list[] = { CODEC_ID_MP3, CODEC_ID_NONE };
|
|
|
|
|
|
|
|
*video_codec_list = flv_video_list;
|
|
|
|
*audio_codec_list = flv_audio_list;
|
2006-10-09 13:31:55 +00:00
|
|
|
} else if (!strcmp (format_name, "asf")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID asf_video_list[] =
|
2007-06-05 16:33:39 +00:00
|
|
|
{ CODEC_ID_WMV1, CODEC_ID_WMV2, CODEC_ID_MSMPEG4V3, CODEC_ID_NONE };
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID asf_audio_list[] =
|
2007-06-05 16:33:39 +00:00
|
|
|
{ CODEC_ID_WMAV1, CODEC_ID_WMAV2, CODEC_ID_MP3, CODEC_ID_NONE };
|
2006-10-09 13:31:55 +00:00
|
|
|
|
|
|
|
*video_codec_list = asf_video_list;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
*audio_codec_list = asf_audio_list;
|
2006-10-13 13:13:08 +00:00
|
|
|
} else if (!strcmp (format_name, "dv")) {
|
|
|
|
static enum CodecID dv_video_list[] = { CODEC_ID_DVVIDEO, CODEC_ID_NONE };
|
|
|
|
static enum CodecID dv_audio_list[] = { CODEC_ID_PCM_S16LE, CODEC_ID_NONE };
|
|
|
|
|
|
|
|
*video_codec_list = dv_video_list;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
*audio_codec_list = dv_audio_list;
|
2006-10-13 13:13:08 +00:00
|
|
|
} else if (!strcmp (format_name, "mov")) {
|
|
|
|
static enum CodecID mov_video_list[] = {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
CODEC_ID_SVQ1, CODEC_ID_SVQ3, CODEC_ID_MPEG4,
|
2006-12-07 11:37:10 +00:00
|
|
|
CODEC_ID_H263, CODEC_ID_H263P,
|
2006-10-13 13:13:08 +00:00
|
|
|
CODEC_ID_H264, CODEC_ID_DVVIDEO,
|
2007-06-20 08:00:30 +00:00
|
|
|
CODEC_ID_MJPEG,
|
2006-10-13 13:13:08 +00:00
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID mov_audio_list[] = {
|
2006-10-13 13:13:08 +00:00
|
|
|
CODEC_ID_PCM_MULAW, CODEC_ID_PCM_ALAW, CODEC_ID_ADPCM_IMA_QT,
|
|
|
|
CODEC_ID_MACE3, CODEC_ID_MACE6, CODEC_ID_AAC,
|
|
|
|
CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE,
|
2006-10-13 13:13:08 +00:00
|
|
|
CODEC_ID_MP3, CODEC_ID_NONE
|
|
|
|
};
|
|
|
|
|
|
|
|
*video_codec_list = mov_video_list;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
*audio_codec_list = mov_audio_list;
|
|
|
|
} else if ((!strcmp (format_name, "3gp") || !strcmp (format_name, "3g2"))) {
|
2006-12-07 18:07:32 +00:00
|
|
|
static enum CodecID tgp_video_list[] = {
|
2008-01-25 11:39:59 +00:00
|
|
|
CODEC_ID_MPEG4, CODEC_ID_H263, CODEC_ID_H263P, CODEC_ID_H264,
|
2006-12-07 18:07:32 +00:00
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
|
|
|
static enum CodecID tgp_audio_list[] = {
|
2007-06-19 14:14:29 +00:00
|
|
|
CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
|
|
|
|
CODEC_ID_AAC,
|
2006-12-07 18:07:32 +00:00
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
|
|
|
|
|
|
|
*video_codec_list = tgp_video_list;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
*audio_codec_list = tgp_audio_list;
|
2006-11-14 12:34:20 +00:00
|
|
|
} else if (!strcmp (format_name, "mmf")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID mmf_audio_list[] = {
|
|
|
|
CODEC_ID_ADPCM_YAMAHA, CODEC_ID_NONE
|
|
|
|
};
|
2006-11-14 12:34:20 +00:00
|
|
|
*video_codec_list = NULL;
|
|
|
|
*audio_codec_list = mmf_audio_list;
|
2006-12-07 18:07:32 +00:00
|
|
|
} else if (!strcmp (format_name, "amr")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
static enum CodecID amr_audio_list[] = {
|
2006-12-07 18:07:32 +00:00
|
|
|
CODEC_ID_AMR_NB, CODEC_ID_AMR_WB,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
CODEC_ID_NONE
|
|
|
|
};
|
2006-12-07 18:07:32 +00:00
|
|
|
*video_codec_list = NULL;
|
|
|
|
*audio_codec_list = amr_audio_list;
|
2007-12-17 20:31:35 +00:00
|
|
|
} else if (!strcmp (format_name, "gif")) {
|
|
|
|
static enum CodecID gif_image_list[] = {
|
|
|
|
CODEC_ID_RAWVIDEO, CODEC_ID_NONE
|
|
|
|
};
|
|
|
|
*video_codec_list = gif_image_list;
|
|
|
|
*audio_codec_list = NULL;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
} else {
|
2006-05-26 12:42:06 +00:00
|
|
|
GST_LOG ("Format %s not found", format_name);
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2003-07-06 20:49:15 +00:00
|
|
|
/* Convert a GstCaps to a FFMPEG codec ID. Size et all
|
|
|
|
* are omitted, that can be queried by the user itself,
|
|
|
|
* we're not eating the GstCaps or anything
|
|
|
|
* A pointer to an allocated context is also needed for
|
2004-03-15 00:01:03 +00:00
|
|
|
* optional extra info
|
2003-07-06 20:49:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum CodecID
|
2004-03-29 16:39:18 +00:00
|
|
|
gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
2003-07-06 20:49:15 +00:00
|
|
|
{
|
|
|
|
enum CodecID id = CODEC_ID_NONE;
|
|
|
|
const gchar *mimetype;
|
2003-12-22 01:46:58 +00:00
|
|
|
const GstStructure *structure;
|
2004-03-29 16:39:18 +00:00
|
|
|
gboolean video = FALSE, audio = FALSE; /* we want to be sure! */
|
2003-07-06 20:49:15 +00:00
|
|
|
|
|
|
|
g_return_val_if_fail (caps != NULL, CODEC_ID_NONE);
|
2003-12-22 01:46:58 +00:00
|
|
|
g_return_val_if_fail (gst_caps_get_size (caps) == 1, CODEC_ID_NONE);
|
|
|
|
structure = gst_caps_get_structure (caps, 0);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
mimetype = gst_structure_get_name (structure);
|
2003-07-06 20:49:15 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (!strcmp (mimetype, "video/x-raw-rgb") ||
|
|
|
|
!strcmp (mimetype, "video/x-raw-yuv")) {
|
2003-11-28 20:06:18 +00:00
|
|
|
id = CODEC_ID_RAWVIDEO;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
video = TRUE;
|
2003-07-06 20:49:15 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-raw-int")) {
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gint depth, width, endianness;
|
|
|
|
gboolean signedness;
|
|
|
|
|
|
|
|
if (gst_structure_get_int (structure, "endianness", &endianness) &&
|
|
|
|
gst_structure_get_boolean (structure, "signed", &signedness) &&
|
|
|
|
gst_structure_get_int (structure, "width", &width) &&
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gst_structure_get_int (structure, "depth", &depth) && depth == width) {
|
2003-12-22 01:46:58 +00:00
|
|
|
switch (depth) {
|
2004-03-29 16:39:18 +00:00
|
|
|
case 8:
|
|
|
|
if (signedness) {
|
|
|
|
id = CODEC_ID_PCM_S8;
|
|
|
|
} else {
|
|
|
|
id = CODEC_ID_PCM_U8;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
switch (endianness) {
|
|
|
|
case G_BIG_ENDIAN:
|
|
|
|
if (signedness) {
|
|
|
|
id = CODEC_ID_PCM_S16BE;
|
|
|
|
} else {
|
|
|
|
id = CODEC_ID_PCM_U16BE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case G_LITTLE_ENDIAN:
|
|
|
|
if (signedness) {
|
|
|
|
id = CODEC_ID_PCM_S16LE;
|
|
|
|
} else {
|
|
|
|
id = CODEC_ID_PCM_U16LE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2003-12-22 01:46:58 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2004-03-29 16:39:18 +00:00
|
|
|
audio = TRUE;
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-mulaw")) {
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_PCM_MULAW;
|
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-alaw")) {
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_PCM_ALAW;
|
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-dv")) {
|
2005-01-06 10:28:18 +00:00
|
|
|
gboolean sys_strm;
|
|
|
|
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
|
2005-01-06 10:28:18 +00:00
|
|
|
!sys_strm) {
|
|
|
|
id = CODEC_ID_DVVIDEO;
|
|
|
|
video = TRUE;
|
|
|
|
}
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-dv")) { /* ??? */
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_DVAUDIO;
|
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-h263")) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
const gchar *h263version =
|
|
|
|
gst_structure_get_string (structure, "h263version");
|
2006-11-16 07:28:28 +00:00
|
|
|
if (h263version && !strcmp (h263version, "h263p"))
|
|
|
|
id = CODEC_ID_H263P;
|
|
|
|
else
|
|
|
|
id = CODEC_ID_H263;
|
2005-01-19 12:41:34 +00:00
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-intel-h263")) {
|
|
|
|
id = CODEC_ID_H263I;
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
2004-12-16 18:14:19 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-h261")) {
|
|
|
|
id = CODEC_ID_H261;
|
|
|
|
video = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/mpeg")) {
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gboolean sys_strm;
|
|
|
|
gint mpegversion;
|
2003-07-06 20:49:15 +00:00
|
|
|
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
if (gst_structure_get_boolean (structure, "systemstream", &sys_strm) &&
|
|
|
|
gst_structure_get_int (structure, "mpegversion", &mpegversion) &&
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
!sys_strm) {
|
2003-07-06 20:49:15 +00:00
|
|
|
switch (mpegversion) {
|
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_MPEG1VIDEO;
|
|
|
|
break;
|
2004-03-15 00:01:03 +00:00
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_MPEG2VIDEO;
|
|
|
|
break;
|
2003-07-06 20:49:15 +00:00
|
|
|
case 4:
|
|
|
|
id = CODEC_ID_MPEG4;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
2004-12-16 18:14:19 +00:00
|
|
|
} else if (!strcmp (mimetype, "image/jpeg")) {
|
2004-03-29 16:39:18 +00:00
|
|
|
id = CODEC_ID_MJPEG; /* A... B... */
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
2005-02-03 11:12:34 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-jpeg-b")) {
|
|
|
|
id = CODEC_ID_MJPEGB;
|
|
|
|
video = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-wmv")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint wmvversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "wmvversion", &wmvversion)) {
|
|
|
|
switch (wmvversion) {
|
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_WMV1;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_WMV2;
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
case 3:
|
2007-12-17 20:31:35 +00:00
|
|
|
{
|
|
|
|
guint32 fourcc;
|
|
|
|
|
|
|
|
if (gst_structure_get_fourcc (structure, "fourcc", &fourcc)) {
|
|
|
|
if (fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1'))
|
|
|
|
id = CODEC_ID_VC1;
|
|
|
|
} else
|
|
|
|
id = CODEC_ID_WMV3;
|
|
|
|
}
|
2005-04-21 19:01:36 +00:00
|
|
|
break;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
}
|
2003-12-22 01:46:58 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-12-22 01:46:58 +00:00
|
|
|
video = TRUE;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-vorbis")) {
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_VORBIS;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
audio = TRUE;
|
2005-10-23 16:07:46 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-qdm2")) {
|
|
|
|
id = CODEC_ID_QDM2;
|
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/mpeg")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint layer = 0;
|
|
|
|
gint mpegversion = 0;
|
2003-07-06 20:49:15 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
if (gst_structure_get_int (structure, "mpegversion", &mpegversion)) {
|
2003-12-18 09:31:48 +00:00
|
|
|
switch (mpegversion) {
|
2004-03-29 16:39:18 +00:00
|
|
|
case 2: /* ffmpeg uses faad for both... */
|
2003-12-18 09:31:48 +00:00
|
|
|
case 4:
|
ext/ffmpeg/gstffmpeg.c: Enable muxers (only mp4 muxer for now).
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
Enable muxers (only mp4 muxer for now).
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Fix a bunch of typos in codec-id lookup (false/true return value
mixup), add a codec-id list retrieval function (because ffmpeg
does not provide one). With that, we can make valid pad templates.
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_init),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_change_state), (gst_ffmpegmux_get_id_caps),
(gst_ffmpegmux_register):
Fix for whatever changed since I last tried this. Works for MP4
muxing.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_open),
(gst_ffmpegdata_peek), (gst_ffmpegdata_write),
(gst_ffmpegdata_seek), (gst_ffmpegdata_close):
Update obviously-untested write code...
2005-03-14 15:27:43 +00:00
|
|
|
id = CODEC_ID_AAC;
|
2003-07-06 20:49:15 +00:00
|
|
|
break;
|
2003-12-18 09:31:48 +00:00
|
|
|
case 1:
|
2003-12-22 01:46:58 +00:00
|
|
|
if (gst_structure_get_int (structure, "layer", &layer)) {
|
2003-12-18 09:31:48 +00:00
|
|
|
switch (layer) {
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_MP2;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
id = CODEC_ID_MP3;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-wma")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint wmaversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "wmaversion", &wmaversion)) {
|
|
|
|
switch (wmaversion) {
|
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_WMAV1;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_WMAV2;
|
|
|
|
break;
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-ac3")) {
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_AC3;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
audio = TRUE;
|
2007-12-17 12:43:06 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/atrac3")) {
|
|
|
|
id = CODEC_ID_ATRAC3;
|
|
|
|
audio = TRUE;
|
2006-05-07 01:18:46 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-dts")) {
|
|
|
|
id = CODEC_ID_DTS;
|
|
|
|
audio = TRUE;
|
2008-04-19 19:43:54 +00:00
|
|
|
} else if (!strcmp (mimetype, "application/x-ape")) {
|
|
|
|
id = CODEC_ID_APE;
|
|
|
|
audio = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-msmpeg")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint msmpegversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "msmpegversion", &msmpegversion)) {
|
|
|
|
switch (msmpegversion) {
|
|
|
|
case 41:
|
|
|
|
id = CODEC_ID_MSMPEG4V1;
|
|
|
|
break;
|
|
|
|
case 42:
|
|
|
|
id = CODEC_ID_MSMPEG4V2;
|
|
|
|
break;
|
|
|
|
case 43:
|
|
|
|
id = CODEC_ID_MSMPEG4V3;
|
|
|
|
break;
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
2004-03-29 16:39:18 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-svq")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint svqversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "svqversion", &svqversion)) {
|
|
|
|
switch (svqversion) {
|
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_SVQ1;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
id = CODEC_ID_SVQ3;
|
|
|
|
break;
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-huffyuv")) {
|
|
|
|
id = CODEC_ID_HUFFYUV;
|
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "audio/x-mace")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint maceversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "maceversion", &maceversion)) {
|
|
|
|
switch (maceversion) {
|
|
|
|
case 3:
|
|
|
|
id = CODEC_ID_MACE3;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
id = CODEC_ID_MACE6;
|
|
|
|
break;
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
audio = TRUE;
|
2004-03-15 00:01:03 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-theora")) {
|
|
|
|
id = CODEC_ID_THEORA;
|
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-vp3")) {
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_VP3;
|
|
|
|
video = TRUE;
|
2006-09-20 20:02:16 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-vp5")) {
|
|
|
|
id = CODEC_ID_VP5;
|
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-vp6")) {
|
|
|
|
id = CODEC_ID_VP6;
|
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-vp6-flash")) {
|
|
|
|
id = CODEC_ID_VP6F;
|
|
|
|
video = TRUE;
|
2007-12-17 12:43:06 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-vp6-alpha")) {
|
|
|
|
id = CODEC_ID_VP6A;
|
|
|
|
video = TRUE;
|
2006-09-23 12:00:15 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-flash-screen")) {
|
|
|
|
id = CODEC_ID_FLASHSV;
|
|
|
|
video = TRUE;
|
2003-07-06 20:49:15 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-indeo")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint indeoversion = 0;
|
|
|
|
|
2005-04-21 19:01:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "indeoversion", &indeoversion)) {
|
|
|
|
switch (indeoversion) {
|
|
|
|
case 3:
|
|
|
|
id = CODEC_ID_INDEO3;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_INDEO2;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (id != CODEC_ID_NONE)
|
|
|
|
video = TRUE;
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
|
|
|
} else if (!strcmp (mimetype, "video/x-divx")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint divxversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "divxversion", &divxversion)) {
|
|
|
|
switch (divxversion) {
|
|
|
|
case 3:
|
|
|
|
id = CODEC_ID_MSMPEG4V3;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
case 5:
|
|
|
|
id = CODEC_ID_MPEG4;
|
|
|
|
break;
|
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
configure.ac: Fix configure check for mpeg2enc. We need 1.6.1.93 instead of 1.6.1.92, since the pkg-config file of 1....
Original commit message from CVS:
2004-01-01 Ronald Bultje <rbultje@ronald.bitfreak.net>
* configure.ac:
Fix configure check for mpeg2enc. We need 1.6.1.93 instead of
1.6.1.92, since the pkg-config file of 1.6.1.92 is borked and
it therefore uses the wrong include paths. Too bad... Note
that 1.6.1.93 is not release yet. ;).
Also add a check for mplex, which is now using the lib'ified
mplex from mjpegtools, too.
* ext/ffmpeg/gstffmpegcodecmap.c:
Add codec_tag for 3ivx/xvid. For xvid, this should fix playback
issues. I don't think ffmpeg handles 3ivx correctly, so this
probably won't work. But it won't hurt either.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect),
(gst_ffmpegenc_chain_audio):
Fix memleak in audio encoding. Close codec if open fails, this
calls the cleanup routines so we can re-use the context.
* ext/mpeg2enc/gstmpeg2enc.cc:
Fix pad template names/types, fix memory issue with getcaps().
* ext/mpeg2enc/gstmpeg2encoder.cc:
* ext/mpeg2enc/gstmpeg2encoder.hh:
Fix compile issue with new caps system (const thingy).
* ext/mpeg2enc/gstmpeg2encpicturereader.cc:
* ext/mpeg2enc/gstmpeg2encpicturereader.hh:
We read a first frame right on initing, so that we have a caps
when we init the output. This caps is cached in padprivate and
read as first frame.
* ext/mplex/Makefile.am:
* ext/mplex/gstmplex.cc:
* ext/mplex/gstmplex.h:
* ext/mplex/gstmplex.hh:
* ext/mplex/gstmplexibitstream.cc:
* ext/mplex/gstmplexibitstream.hh:
* ext/mplex/gstmplexjob.cc:
* ext/mplex/gstmplexjob.hh:
* ext/mplex/gstmplexoutputstream.cc:
* ext/mplex/gstmplexoutputstream.hh:
We wrap mjpegtools mplex. So I rewrote the plugin. The old plugin
had issues, didn't do capsnego, supported only a subset of the
mplex features and required a mplex fork in our local CVS. Plus
that it worked agaist a very old mplex version. Rewriting was
faster than updating it.
* gst-libs/ext/Makefile.am:
* gst-libs/ext/mplex/INSTRUCT:
* gst-libs/ext/mplex/Makefile.am:
* gst-libs/ext/mplex/README:
* gst-libs/ext/mplex/TODO:
* gst-libs/ext/mplex/ac3strm_in.cc:
* gst-libs/ext/mplex/audiostrm.hh:
* gst-libs/ext/mplex/audiostrm_out.cc:
* gst-libs/ext/mplex/aunit.hh:
* gst-libs/ext/mplex/bits.cc:
* gst-libs/ext/mplex/bits.hh:
* gst-libs/ext/mplex/buffer.cc:
* gst-libs/ext/mplex/buffer.hh:
* gst-libs/ext/mplex/fastintfns.h:
* gst-libs/ext/mplex/format_codes.h:
* gst-libs/ext/mplex/inputstrm.cc:
* gst-libs/ext/mplex/inputstrm.hh:
* gst-libs/ext/mplex/lpcmstrm_in.cc:
* gst-libs/ext/mplex/mjpeg_logging.cc:
* gst-libs/ext/mplex/mjpeg_logging.h:
* gst-libs/ext/mplex/mjpeg_types.h:
* gst-libs/ext/mplex/mpastrm_in.cc:
* gst-libs/ext/mplex/mpegconsts.cc:
* gst-libs/ext/mplex/mpegconsts.h:
* gst-libs/ext/mplex/mplexconsts.hh:
* gst-libs/ext/mplex/multplex.cc:
* gst-libs/ext/mplex/outputstream.hh:
* gst-libs/ext/mplex/padstrm.cc:
* gst-libs/ext/mplex/padstrm.hh:
* gst-libs/ext/mplex/stillsstream.cc:
* gst-libs/ext/mplex/stillsstream.hh:
* gst-libs/ext/mplex/systems.cc:
* gst-libs/ext/mplex/systems.hh:
* gst-libs/ext/mplex/vector.cc:
* gst-libs/ext/mplex/vector.hh:
* gst-libs/ext/mplex/videostrm.hh:
* gst-libs/ext/mplex/videostrm_in.cc:
* gst-libs/ext/mplex/videostrm_out.cc:
* gst-libs/ext/mplex/yuv4mpeg.cc:
* gst-libs/ext/mplex/yuv4mpeg.h:
* gst-libs/ext/mplex/yuv4mpeg_intern.h:
* gst-libs/ext/mplex/yuv4mpeg_ratio.cc:
We don't fork mjpegtools' mplex in our CVS anymore.
* gst/avi/gstavidemux.c: (gst_avi_demux_src_getcaps),
(gst_avi_demux_add_stream):
* gst/avi/gstavidemux.h:
Add getcaps() function for proper caps nego. This makes some
parts of AVI playback/reading work.
* sys/ximage/ximagesink.c: (gst_ximagesink_sinkconnect):
Resize window on new capsnego. This is probably wrong, but
I'm still committing it because with current capsnego, the
first successfull capsnego is auto-fixated, therefore rounded
down to the lowest values in the caps. this results in a 16x16
XWindow that is not reized when real capsnego finishes.
Dave, I see more cases of this, do you know a proper solution?
* tools/gst-launch-ext.in:
Fix MPEG-4 AAC (Apple iPod/iTunes) file commandline.
2004-01-01 22:45:56 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-3ivx")) {
|
2003-07-06 20:49:15 +00:00
|
|
|
id = CODEC_ID_MPEG4;
|
|
|
|
video = TRUE;
|
configure.ac: Fix configure check for mpeg2enc. We need 1.6.1.93 instead of 1.6.1.92, since the pkg-config file of 1....
Original commit message from CVS:
2004-01-01 Ronald Bultje <rbultje@ronald.bitfreak.net>
* configure.ac:
Fix configure check for mpeg2enc. We need 1.6.1.93 instead of
1.6.1.92, since the pkg-config file of 1.6.1.92 is borked and
it therefore uses the wrong include paths. Too bad... Note
that 1.6.1.93 is not release yet. ;).
Also add a check for mplex, which is now using the lib'ified
mplex from mjpegtools, too.
* ext/ffmpeg/gstffmpegcodecmap.c:
Add codec_tag for 3ivx/xvid. For xvid, this should fix playback
issues. I don't think ffmpeg handles 3ivx correctly, so this
probably won't work. But it won't hurt either.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect),
(gst_ffmpegenc_chain_audio):
Fix memleak in audio encoding. Close codec if open fails, this
calls the cleanup routines so we can re-use the context.
* ext/mpeg2enc/gstmpeg2enc.cc:
Fix pad template names/types, fix memory issue with getcaps().
* ext/mpeg2enc/gstmpeg2encoder.cc:
* ext/mpeg2enc/gstmpeg2encoder.hh:
Fix compile issue with new caps system (const thingy).
* ext/mpeg2enc/gstmpeg2encpicturereader.cc:
* ext/mpeg2enc/gstmpeg2encpicturereader.hh:
We read a first frame right on initing, so that we have a caps
when we init the output. This caps is cached in padprivate and
read as first frame.
* ext/mplex/Makefile.am:
* ext/mplex/gstmplex.cc:
* ext/mplex/gstmplex.h:
* ext/mplex/gstmplex.hh:
* ext/mplex/gstmplexibitstream.cc:
* ext/mplex/gstmplexibitstream.hh:
* ext/mplex/gstmplexjob.cc:
* ext/mplex/gstmplexjob.hh:
* ext/mplex/gstmplexoutputstream.cc:
* ext/mplex/gstmplexoutputstream.hh:
We wrap mjpegtools mplex. So I rewrote the plugin. The old plugin
had issues, didn't do capsnego, supported only a subset of the
mplex features and required a mplex fork in our local CVS. Plus
that it worked agaist a very old mplex version. Rewriting was
faster than updating it.
* gst-libs/ext/Makefile.am:
* gst-libs/ext/mplex/INSTRUCT:
* gst-libs/ext/mplex/Makefile.am:
* gst-libs/ext/mplex/README:
* gst-libs/ext/mplex/TODO:
* gst-libs/ext/mplex/ac3strm_in.cc:
* gst-libs/ext/mplex/audiostrm.hh:
* gst-libs/ext/mplex/audiostrm_out.cc:
* gst-libs/ext/mplex/aunit.hh:
* gst-libs/ext/mplex/bits.cc:
* gst-libs/ext/mplex/bits.hh:
* gst-libs/ext/mplex/buffer.cc:
* gst-libs/ext/mplex/buffer.hh:
* gst-libs/ext/mplex/fastintfns.h:
* gst-libs/ext/mplex/format_codes.h:
* gst-libs/ext/mplex/inputstrm.cc:
* gst-libs/ext/mplex/inputstrm.hh:
* gst-libs/ext/mplex/lpcmstrm_in.cc:
* gst-libs/ext/mplex/mjpeg_logging.cc:
* gst-libs/ext/mplex/mjpeg_logging.h:
* gst-libs/ext/mplex/mjpeg_types.h:
* gst-libs/ext/mplex/mpastrm_in.cc:
* gst-libs/ext/mplex/mpegconsts.cc:
* gst-libs/ext/mplex/mpegconsts.h:
* gst-libs/ext/mplex/mplexconsts.hh:
* gst-libs/ext/mplex/multplex.cc:
* gst-libs/ext/mplex/outputstream.hh:
* gst-libs/ext/mplex/padstrm.cc:
* gst-libs/ext/mplex/padstrm.hh:
* gst-libs/ext/mplex/stillsstream.cc:
* gst-libs/ext/mplex/stillsstream.hh:
* gst-libs/ext/mplex/systems.cc:
* gst-libs/ext/mplex/systems.hh:
* gst-libs/ext/mplex/vector.cc:
* gst-libs/ext/mplex/vector.hh:
* gst-libs/ext/mplex/videostrm.hh:
* gst-libs/ext/mplex/videostrm_in.cc:
* gst-libs/ext/mplex/videostrm_out.cc:
* gst-libs/ext/mplex/yuv4mpeg.cc:
* gst-libs/ext/mplex/yuv4mpeg.h:
* gst-libs/ext/mplex/yuv4mpeg_intern.h:
* gst-libs/ext/mplex/yuv4mpeg_ratio.cc:
We don't fork mjpegtools' mplex in our CVS anymore.
* gst/avi/gstavidemux.c: (gst_avi_demux_src_getcaps),
(gst_avi_demux_add_stream):
* gst/avi/gstavidemux.h:
Add getcaps() function for proper caps nego. This makes some
parts of AVI playback/reading work.
* sys/ximage/ximagesink.c: (gst_ximagesink_sinkconnect):
Resize window on new capsnego. This is probably wrong, but
I'm still committing it because with current capsnego, the
first successfull capsnego is auto-fixated, therefore rounded
down to the lowest values in the caps. this results in a 16x16
XWindow that is not reized when real capsnego finishes.
Dave, I see more cases of this, do you know a proper solution?
* tools/gst-launch-ext.in:
Fix MPEG-4 AAC (Apple iPod/iTunes) file commandline.
2004-01-01 22:45:56 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-xvid")) {
|
|
|
|
id = CODEC_ID_MPEG4;
|
|
|
|
video = TRUE;
|
2003-07-06 20:49:15 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-ffv")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
gint ffvversion = 0;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "ffvversion", &ffvversion) &&
|
|
|
|
ffvversion == 1) {
|
|
|
|
id = CODEC_ID_FFV1;
|
2003-07-06 20:49:15 +00:00
|
|
|
video = TRUE;
|
|
|
|
}
|
2006-11-14 12:34:20 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-adpcm")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
const gchar *layout;
|
|
|
|
|
|
|
|
layout = gst_structure_get_string (structure, "layout");
|
|
|
|
if (layout == NULL) {
|
|
|
|
/* break */
|
|
|
|
} else if (!strcmp (layout, "quicktime")) {
|
|
|
|
id = CODEC_ID_ADPCM_IMA_QT;
|
|
|
|
} else if (!strcmp (layout, "microsoft")) {
|
|
|
|
id = CODEC_ID_ADPCM_MS;
|
2004-04-23 00:49:10 +00:00
|
|
|
} else if (!strcmp (layout, "dvi")) {
|
2003-12-22 01:46:58 +00:00
|
|
|
id = CODEC_ID_ADPCM_IMA_WAV;
|
|
|
|
} else if (!strcmp (layout, "4xm")) {
|
|
|
|
id = CODEC_ID_ADPCM_4XM;
|
2004-03-15 00:01:03 +00:00
|
|
|
} else if (!strcmp (layout, "smjpeg")) {
|
|
|
|
id = CODEC_ID_ADPCM_IMA_SMJPEG;
|
|
|
|
} else if (!strcmp (layout, "dk3")) {
|
|
|
|
id = CODEC_ID_ADPCM_IMA_DK3;
|
|
|
|
} else if (!strcmp (layout, "dk4")) {
|
|
|
|
id = CODEC_ID_ADPCM_IMA_DK4;
|
|
|
|
} else if (!strcmp (layout, "westwood")) {
|
|
|
|
id = CODEC_ID_ADPCM_IMA_WS;
|
|
|
|
} else if (!strcmp (layout, "xa")) {
|
|
|
|
id = CODEC_ID_ADPCM_XA;
|
|
|
|
} else if (!strcmp (layout, "adx")) {
|
|
|
|
id = CODEC_ID_ADPCM_ADX;
|
|
|
|
} else if (!strcmp (layout, "ea")) {
|
|
|
|
id = CODEC_ID_ADPCM_EA;
|
|
|
|
} else if (!strcmp (layout, "g726")) {
|
|
|
|
id = CODEC_ID_ADPCM_G726;
|
2004-12-16 18:14:19 +00:00
|
|
|
} else if (!strcmp (layout, "ct")) {
|
|
|
|
id = CODEC_ID_ADPCM_CT;
|
2005-04-21 19:01:36 +00:00
|
|
|
} else if (!strcmp (layout, "swf")) {
|
|
|
|
id = CODEC_ID_ADPCM_SWF;
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
} else if (!strcmp (layout, "yamaha")) {
|
|
|
|
id = CODEC_ID_ADPCM_YAMAHA;
|
2006-02-18 23:12:14 +00:00
|
|
|
} else if (!strcmp (layout, "sbpro2")) {
|
|
|
|
id = CODEC_ID_ADPCM_SBPRO_2;
|
|
|
|
} else if (!strcmp (layout, "sbpro3")) {
|
|
|
|
id = CODEC_ID_ADPCM_SBPRO_3;
|
|
|
|
} else if (!strcmp (layout, "sbpro4")) {
|
|
|
|
id = CODEC_ID_ADPCM_SBPRO_4;
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2003-07-06 20:49:15 +00:00
|
|
|
audio = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-4xm")) {
|
|
|
|
id = CODEC_ID_4XM;
|
|
|
|
video = TRUE;
|
2004-03-15 00:01:03 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-dpcm")) {
|
|
|
|
const gchar *layout;
|
|
|
|
|
|
|
|
layout = gst_structure_get_string (structure, "layout");
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (!layout) {
|
|
|
|
/* .. */
|
|
|
|
} else if (!strcmp (layout, "roq")) {
|
2004-03-15 00:01:03 +00:00
|
|
|
id = CODEC_ID_ROQ_DPCM;
|
|
|
|
} else if (!strcmp (layout, "interplay")) {
|
|
|
|
id = CODEC_ID_INTERPLAY_DPCM;
|
|
|
|
} else if (!strcmp (layout, "xan")) {
|
|
|
|
id = CODEC_ID_XAN_DPCM;
|
2004-12-16 18:14:19 +00:00
|
|
|
} else if (!strcmp (layout, "sol")) {
|
|
|
|
id = CODEC_ID_SOL_DPCM;
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2004-03-15 00:01:03 +00:00
|
|
|
audio = TRUE;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-flac")) {
|
2004-03-15 00:01:03 +00:00
|
|
|
id = CODEC_ID_FLAC;
|
|
|
|
audio = TRUE;
|
2005-04-21 19:01:36 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-shorten")) {
|
|
|
|
id = CODEC_ID_SHORTEN;
|
|
|
|
audio = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "audio/x-alac")) {
|
|
|
|
id = CODEC_ID_ALAC;
|
|
|
|
audio = TRUE;
|
2004-03-15 00:01:03 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-cinepak")) {
|
|
|
|
id = CODEC_ID_CINEPAK;
|
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "video/x-pn-realvideo")) {
|
|
|
|
gint rmversion;
|
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "rmversion", &rmversion)) {
|
|
|
|
switch (rmversion) {
|
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_RV10;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_RV20;
|
|
|
|
break;
|
2006-05-07 01:18:46 +00:00
|
|
|
case 4:
|
|
|
|
id = CODEC_ID_RV40;
|
|
|
|
break;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2004-03-15 00:01:03 +00:00
|
|
|
video = TRUE;
|
|
|
|
} else if (!strcmp (mimetype, "audio/x-pn-realaudio")) {
|
|
|
|
gint raversion;
|
2004-03-29 16:39:18 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (gst_structure_get_int (structure, "raversion", &raversion)) {
|
|
|
|
switch (raversion) {
|
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_RA_144;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
id = CODEC_ID_RA_288;
|
|
|
|
break;
|
2006-02-19 14:28:59 +00:00
|
|
|
case 8:
|
|
|
|
id = CODEC_ID_COOK;
|
|
|
|
break;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
}
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if (id != CODEC_ID_NONE)
|
2004-03-15 00:01:03 +00:00
|
|
|
audio = TRUE;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-rle")) {
|
|
|
|
const gchar *layout;
|
2004-03-15 00:01:03 +00:00
|
|
|
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
if ((layout = gst_structure_get_string (structure, "layout"))) {
|
|
|
|
if (!strcmp (layout, "microsoft")) {
|
|
|
|
id = CODEC_ID_MSRLE;
|
|
|
|
video = TRUE;
|
|
|
|
}
|
|
|
|
}
|
2004-10-02 20:26:10 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-xan")) {
|
|
|
|
gint wcversion = 0;
|
|
|
|
|
|
|
|
if ((gst_structure_get_int (structure, "wcversion", &wcversion))) {
|
|
|
|
switch (wcversion) {
|
|
|
|
case 3:
|
|
|
|
id = CODEC_ID_XAN_WC3;
|
|
|
|
video = TRUE;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
id = CODEC_ID_XAN_WC4;
|
|
|
|
video = TRUE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2006-10-25 17:20:25 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/AMR")) {
|
2005-01-28 10:45:37 +00:00
|
|
|
audio = TRUE;
|
|
|
|
id = CODEC_ID_AMR_NB;
|
2006-10-25 17:20:25 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/AMR-WB")) {
|
2005-01-28 10:45:37 +00:00
|
|
|
id = CODEC_ID_AMR_WB;
|
|
|
|
audio = TRUE;
|
2005-07-23 22:10:29 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-h264")) {
|
|
|
|
id = CODEC_ID_H264;
|
|
|
|
video = TRUE;
|
2006-09-08 15:25:51 +00:00
|
|
|
} else if (!strcmp (mimetype, "video/x-flash-video")) {
|
|
|
|
gint flvversion = 0;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-09-08 15:25:51 +00:00
|
|
|
if ((gst_structure_get_int (structure, "flvversion", &flvversion))) {
|
|
|
|
switch (flvversion) {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
case 1:
|
|
|
|
id = CODEC_ID_FLV1;
|
|
|
|
video = TRUE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2006-09-08 15:25:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-12-17 12:43:06 +00:00
|
|
|
} else if (!strcmp (mimetype, "audio/x-nellymoser")) {
|
|
|
|
id = CODEC_ID_NELLYMOSER;
|
|
|
|
audio = TRUE;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
} else if (!strncmp (mimetype, "audio/x-gst_ff-", 15)) {
|
2004-03-15 00:01:03 +00:00
|
|
|
gchar ext[16];
|
|
|
|
AVCodec *codec;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2004-03-15 00:01:03 +00:00
|
|
|
if (strlen (mimetype) <= 30 &&
|
2005-06-27 20:41:55 +00:00
|
|
|
sscanf (mimetype, "audio/x-gst_ff-%s", ext) == 1) {
|
2004-03-15 00:01:03 +00:00
|
|
|
if ((codec = avcodec_find_decoder_by_name (ext)) ||
|
|
|
|
(codec = avcodec_find_encoder_by_name (ext))) {
|
|
|
|
id = codec->id;
|
2005-12-06 19:57:08 +00:00
|
|
|
audio = TRUE;
|
2005-06-27 20:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (!strncmp (mimetype, "video/x-gst_ff-", 15)) {
|
|
|
|
gchar ext[16];
|
|
|
|
AVCodec *codec;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2005-06-27 20:41:55 +00:00
|
|
|
if (strlen (mimetype) <= 30 &&
|
|
|
|
sscanf (mimetype, "video/x-gst_ff-%s", ext) == 1) {
|
|
|
|
if ((codec = avcodec_find_decoder_by_name (ext)) ||
|
|
|
|
(codec = avcodec_find_encoder_by_name (ext))) {
|
|
|
|
id = codec->id;
|
|
|
|
video = TRUE;
|
2004-03-15 00:01:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2003-07-06 20:49:15 +00:00
|
|
|
|
|
|
|
if (context != NULL) {
|
|
|
|
if (video == TRUE) {
|
|
|
|
context->codec_type = CODEC_TYPE_VIDEO;
|
|
|
|
} else if (audio == TRUE) {
|
|
|
|
context->codec_type = CODEC_TYPE_AUDIO;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
} else {
|
|
|
|
context->codec_type = CODEC_TYPE_UNKNOWN;
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
|
|
|
context->codec_id = id;
|
ext/ffmpeg/gstffmpegcodecmap.*: Change some function names to reflect that they don't really _return_ something, but ...
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codectype),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegcodecmap.h:
Change some function names to reflect that they don't really
_return_ something, but rather _use_ something to fill a
AVCodecContext. s/to/with/. Restructure the extradata handling,
it's now not picking up the type from the caps but rather
using the type as provided in the function. This is a lot
cleaner. Implement MS RLE palette pickup.
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_connect):
Sync with the above function name changes.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
(gst_ffmpegdec_open), (gst_ffmpegdec_connect),
(gst_ffmpegdec_chain), (gst_ffmpegdec_change_state):
Add some hacks to convert palette-based raw image formats to
RGBA32. Ugly, but I don't know how else to handle palette-based
RGB, since img_convert() (and thus ffcolorspace) doesn't accept
a palette as argument.
2004-04-16 01:28:36 +00:00
|
|
|
gst_ffmpeg_caps_with_codecid (id, context->codec_type, caps, context);
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (id != CODEC_ID_NONE) {
|
2003-12-22 01:46:58 +00:00
|
|
|
char *str = gst_caps_to_string (caps);
|
2004-03-29 16:39:18 +00:00
|
|
|
|
2003-12-22 01:46:58 +00:00
|
|
|
GST_DEBUG ("The id=%d belongs to the caps %s", id, str);
|
2004-03-29 16:39:18 +00:00
|
|
|
g_free (str);
|
2006-09-08 15:25:51 +00:00
|
|
|
} else {
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
gchar *str = gst_caps_to_string (caps);
|
2006-09-08 15:25:51 +00:00
|
|
|
|
|
|
|
GST_WARNING ("Couldn't figure out the id for caps %s", str);
|
|
|
|
g_free (str);
|
2003-07-06 20:49:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return id;
|
|
|
|
}
|
2004-10-24 22:24:43 +00:00
|
|
|
|
|
|
|
G_CONST_RETURN gchar *
|
|
|
|
gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
|
|
|
|
{
|
|
|
|
const gchar *name = NULL;
|
|
|
|
|
|
|
|
switch (codec_id) {
|
|
|
|
case CODEC_ID_MPEG1VIDEO:
|
|
|
|
name = "MPEG-1 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MPEG2VIDEO:
|
|
|
|
name = "MPEG-2 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_H263:
|
|
|
|
name = "H.263 video";
|
|
|
|
break;
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_H261:
|
|
|
|
name = "H.261 video";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_RV10:
|
|
|
|
name = "Realvideo 1.0";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_RV20:
|
|
|
|
name = "Realvideo 2.0";
|
|
|
|
break;
|
2007-10-01 17:27:42 +00:00
|
|
|
case CODEC_ID_RV30:
|
|
|
|
name = "Realvideo 3.0";
|
|
|
|
break;
|
2006-05-07 01:18:46 +00:00
|
|
|
case CODEC_ID_RV40:
|
|
|
|
name = "Realvideo 4.0";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_MP2:
|
|
|
|
name = "MPEG-1 layer 2 audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MP3:
|
|
|
|
name = "MPEG-1 layer 3 audio";
|
2008-04-19 19:43:54 +00:00
|
|
|
break;
|
|
|
|
case CODEC_ID_APE:
|
|
|
|
name = "Monkey's Audio";
|
2004-10-24 22:24:43 +00:00
|
|
|
break;
|
|
|
|
case CODEC_ID_VORBIS:
|
|
|
|
name = "Vorbis audio";
|
|
|
|
break;
|
2005-10-23 16:07:46 +00:00
|
|
|
case CODEC_ID_QDM2:
|
|
|
|
name = "QDesign Music 2";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_AC3:
|
|
|
|
name = "AC-3 audio";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ATRAC3:
|
|
|
|
name = "Sony ATRAC-3";
|
|
|
|
break;
|
2006-05-07 01:18:46 +00:00
|
|
|
case CODEC_ID_DTS:
|
|
|
|
name = "DTS Audio";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_MJPEG:
|
|
|
|
name = "Motion-JPEG";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MJPEGB:
|
|
|
|
name = "Quicktime Motion-JPEG B";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_LJPEG:
|
|
|
|
name = "Lossless JPEG";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SP5X:
|
|
|
|
name = "Sp5x-like JPEG";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MPEG4:
|
|
|
|
name = "MPEG-4 compatible video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MSMPEG4V1:
|
|
|
|
name = "Microsoft MPEG-4 v1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MSMPEG4V2:
|
|
|
|
name = "Microsoft MPEG-4 v2";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MSMPEG4V3:
|
|
|
|
name = "Microsoft MPEG-4 v3";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WMV1:
|
|
|
|
name = "Windows Media Video v7";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WMV2:
|
|
|
|
name = "Windows Media Video v8";
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_WMV3:
|
|
|
|
name = "Windows Media Video v9";
|
|
|
|
break;
|
2006-09-20 19:24:59 +00:00
|
|
|
case CODEC_ID_VC1:
|
2005-04-21 19:01:36 +00:00
|
|
|
name = "Microsoft Video Codec v1";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_H263P:
|
|
|
|
name = "H.263 (P) video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_H263I:
|
2005-01-19 12:41:34 +00:00
|
|
|
name = "Intel H.263 video";
|
2004-10-24 22:24:43 +00:00
|
|
|
break;
|
|
|
|
case CODEC_ID_FLV1:
|
|
|
|
name = "FLV video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SVQ1:
|
|
|
|
name = "Sorensen-1 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SVQ3:
|
|
|
|
name = "Sorensen-3 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_DVVIDEO:
|
|
|
|
name = "Digital video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_DVAUDIO:
|
|
|
|
name = "Digital audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WMAV1:
|
|
|
|
name = "Windows Media Audio v7";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WMAV2:
|
2004-12-17 16:39:22 +00:00
|
|
|
name = "Windows Media Audio v8/9";
|
2004-10-24 22:24:43 +00:00
|
|
|
break;
|
|
|
|
case CODEC_ID_MACE3:
|
|
|
|
name = "MACE-3 audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MACE6:
|
|
|
|
name = "MACE-6 audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_HUFFYUV:
|
|
|
|
name = "Huffyuv lossless video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_CYUV:
|
|
|
|
name = "CYUV lossless video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_H264:
|
|
|
|
name = "H.264 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_INDEO3:
|
|
|
|
name = "Indeo-3 video";
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_INDEO2:
|
2007-03-17 12:58:48 +00:00
|
|
|
name = "Indeo-2 video";
|
2005-04-21 19:01:36 +00:00
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_VP3:
|
|
|
|
name = "VP3 video";
|
|
|
|
break;
|
2006-09-20 20:02:16 +00:00
|
|
|
case CODEC_ID_VP5:
|
|
|
|
name = "VP5 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_VP6:
|
|
|
|
name = "VP6 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_VP6F:
|
|
|
|
name = "VP6 Flash video";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_VP6A:
|
|
|
|
name = "VP6 Alpha video";
|
|
|
|
break;
|
2006-09-23 12:00:15 +00:00
|
|
|
case CODEC_ID_FLASHSV:
|
|
|
|
name = "Flash Screen Video";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_THEORA:
|
|
|
|
name = "Theora video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_AAC:
|
|
|
|
name = "MPEG-2/4 AAC audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ASV1:
|
|
|
|
name = "Asus video v1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ASV2:
|
|
|
|
name = "Asus video v2";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_FFV1:
|
|
|
|
name = "FFMpeg video v1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_4XM:
|
|
|
|
name = "4-XM video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_VCR1:
|
|
|
|
name = "ATI VCR-1 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_CLJR:
|
|
|
|
name = "Cirrus Logipak AccuPak video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MDEC:
|
|
|
|
name = "Playstation MDEC video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ROQ:
|
|
|
|
name = "ID/RoQ video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_INTERPLAY_VIDEO:
|
|
|
|
name = "Interplay video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_XAN_WC3:
|
|
|
|
name = "XAN Wing Commander 3 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_XAN_WC4:
|
|
|
|
name = "XAN Wing Commander 4 video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_RPZA:
|
|
|
|
name = "Apple RPZA video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_CINEPAK:
|
|
|
|
name = "Cinepak video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WS_VQA:
|
|
|
|
name = "Westwood VQA video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MSRLE:
|
|
|
|
name = "Microsoft RLE video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MSVIDEO1:
|
|
|
|
name = "Microsoft video v1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_IDCIN:
|
|
|
|
name = "ID Quake II CIN video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_8BPS:
|
|
|
|
name = "Quicktime planar 8bps video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SMC:
|
|
|
|
name = "Quicktime SMC graphics video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_FLIC:
|
|
|
|
name = "FLIC animation video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_TRUEMOTION1:
|
|
|
|
name = "Duck Truemotion video";
|
|
|
|
break;
|
2005-10-23 16:07:46 +00:00
|
|
|
case CODEC_ID_TRUEMOTION2:
|
|
|
|
name = "Duck Truemotion 2 video";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_VMDVIDEO:
|
|
|
|
name = "Sierra VMD video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_VMDAUDIO:
|
|
|
|
name = "Sierra VMD audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MSZH:
|
|
|
|
name = "Lossless MSZH video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ZLIB:
|
|
|
|
name = "Lossless zlib video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_QTRLE:
|
|
|
|
name = "Quicktime RLE animation video";
|
|
|
|
break;
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_SONIC:
|
|
|
|
name = "Sonic audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SONIC_LS:
|
|
|
|
name = "Sonic lossless audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_SNOW:
|
|
|
|
name = "Snow wave video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_TSCC:
|
|
|
|
name = "Techsmith Camtasia video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ULTI:
|
|
|
|
name = "Ultimotion video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_QDRAW:
|
2006-04-19 15:35:12 +00:00
|
|
|
name = "Apple Quickdraw video";
|
2004-12-16 18:14:19 +00:00
|
|
|
break;
|
|
|
|
case CODEC_ID_VIXL:
|
|
|
|
name = "Miro VideoXL";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_QPEG:
|
|
|
|
name = "QPEG video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_XVID:
|
|
|
|
name = "XviD video";
|
|
|
|
break;
|
2007-12-17 20:31:35 +00:00
|
|
|
case CODEC_ID_GIF:
|
|
|
|
name = "GIF image";
|
|
|
|
break;
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_PNG:
|
|
|
|
name = "PNG image";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PPM:
|
|
|
|
name = "PPM image";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PBM:
|
|
|
|
name = "PBM image";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PGM:
|
|
|
|
name = "PGM image";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PGMYUV:
|
|
|
|
name = "PGM-YUV image";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PAM:
|
|
|
|
name = "PAM image";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_FFVHUFF:
|
|
|
|
name = "FFMPEG non-compliant Huffyuv video";
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_LOCO:
|
|
|
|
name = "LOCO video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WNV1:
|
|
|
|
name = "Winnov video 1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_AASC:
|
|
|
|
name = "Autodesk RLE video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MP3ADU:
|
|
|
|
name = "ADU-formatted MPEG-1 layer 3 audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MP3ON4:
|
|
|
|
name = "MP3ON4";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_WESTWOOD_SND1:
|
|
|
|
name = "Westwood Sound-1";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_PCM_MULAW:
|
|
|
|
name = "Mu-law audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_PCM_ALAW:
|
|
|
|
name = "A-law audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_QT:
|
|
|
|
name = "IMA/Quicktime ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_WAV:
|
|
|
|
name = "IMA/DVI ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_DK3:
|
|
|
|
name = "IMA/DK3 ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_DK4:
|
|
|
|
name = "IMA/DK4 ADPCM";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_WS:
|
|
|
|
name = "IMA/Westwood ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_IMA_SMJPEG:
|
|
|
|
name = "IMA/SMJPEG ADPCM audio";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ADPCM_IMA_AMV:
|
|
|
|
name = "IMA/AMV ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_THP:
|
|
|
|
name = "Nintendo THP ADPCM audio";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_ADPCM_MS:
|
|
|
|
name = "Microsoft ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_4XM:
|
|
|
|
name = "4-XM ADPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_XA:
|
|
|
|
name = "CD-ROM XA ADPCM";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_ADX:
|
|
|
|
name = "ADX ADPCM";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_EA:
|
|
|
|
name = "Electronic Arts ADPCM";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_G726:
|
|
|
|
name = "G.726 ADPCM";
|
|
|
|
break;
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_ADPCM_CT:
|
|
|
|
name = "CT ADPCM";
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_ADPCM_SWF:
|
|
|
|
name = "Shockwave ADPCM";
|
|
|
|
break;
|
2006-02-18 23:12:14 +00:00
|
|
|
case CODEC_ID_ADPCM_SBPRO_2:
|
|
|
|
name = "SB-Pro ADPCM 2";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_3:
|
|
|
|
name = "SB-Pro ADPCM 3";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_SBPRO_4:
|
|
|
|
name = "SB-Pro ADPCM 4";
|
|
|
|
break;
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
case CODEC_ID_ADPCM_YAMAHA:
|
|
|
|
name = "Yamaha ADPCM";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_ADPCM_EA_R1:
|
|
|
|
name = "EA ADPCM R1";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_EA_R2:
|
|
|
|
name = "EA ADPCM R2";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ADPCM_EA_R3:
|
|
|
|
name = "EA ADPCM R3";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_RA_144:
|
|
|
|
name = "Realaudio 14k4bps";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_RA_288:
|
|
|
|
name = "Realaudio 28k8bps";
|
|
|
|
break;
|
2006-02-19 14:28:59 +00:00
|
|
|
case CODEC_ID_COOK:
|
|
|
|
name = "Realaudio G2 (Cook) audio";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_ROQ_DPCM:
|
|
|
|
name = "RoQ DPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_INTERPLAY_DPCM:
|
|
|
|
name = "Interplay DPCM audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_XAN_DPCM:
|
|
|
|
name = "XAN DPCM audio";
|
|
|
|
break;
|
2004-12-16 18:14:19 +00:00
|
|
|
case CODEC_ID_SOL_DPCM:
|
|
|
|
name = "SOL DPCM audio";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
case CODEC_ID_FLAC:
|
|
|
|
name = "FLAC lossless audio";
|
|
|
|
break;
|
2005-04-21 19:01:36 +00:00
|
|
|
case CODEC_ID_SHORTEN:
|
|
|
|
name = "Shorten lossless audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ALAC:
|
|
|
|
name = "Apple lossless audio";
|
|
|
|
break;
|
ext/: Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly some added codecs, some API changes, etc. Also add...
Original commit message from CVS:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_formatid_get_codecids),
(gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_negotiate),
(gst_ffmpegdec_frame), (gst_ffmpegdec_chain),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegdeinterlace.c:
(gst_ffmpegdeinterlace_getcaps), (gst_ffmpegdeinterlace_pad_link):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_src_event),
(gst_ffmpegdemux_src_format_list), (gst_ffmpegdemux_src_query),
(gst_ffmpegdemux_src_convert), (gst_ffmpegdemux_add),
(gst_ffmpegdemux_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_link), (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_chain_audio):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_request_new_pad),
(gst_ffmpegmux_connect), (gst_ffmpegmux_loop),
(gst_ffmpegmux_register):
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_write):
* ext/ffmpeg/gstffmpegscale.c: (gst_ffmpegscale_pad_link):
* ext/libpostproc/gstpostproc.c: (gst_postproc_chain):
Update to ffmpeg snapshot of Jul 20 2005 4:00 PM GMT. Mostly
some added codecs, some API changes, etc. Also adds a VOB muxer
for MPEG-2 video and adds h264 to .mp4 muxing.
2005-07-20 15:40:57 +00:00
|
|
|
case CODEC_ID_DVD_SUBTITLE:
|
|
|
|
name = "DVD subtitle";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_DVB_SUBTITLE:
|
|
|
|
name = "DVB subtitle";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_FRAPS:
|
|
|
|
name = "FRAPS video";
|
|
|
|
break;
|
2006-02-19 16:54:51 +00:00
|
|
|
case CODEC_ID_BMP:
|
|
|
|
name = "BMP bitmap";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_CSCD:
|
|
|
|
name = "CamStudio video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_MMVIDEO:
|
|
|
|
name = "American Laser Games MM Video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_ZMBV:
|
|
|
|
name = "Zip Motion Blocks Video";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_AVS:
|
|
|
|
name = "AVS Video";
|
|
|
|
break;
|
2006-09-20 20:02:16 +00:00
|
|
|
case CODEC_ID_CAVS:
|
|
|
|
name = "Chinese AVS Video";
|
|
|
|
break;
|
2006-02-19 16:54:51 +00:00
|
|
|
case CODEC_ID_TTA:
|
|
|
|
name = "Lossless True Audio";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_TRUESPEECH:
|
|
|
|
name = "DSP Group TrueSpeech Audio";
|
|
|
|
break;
|
2006-05-07 01:18:46 +00:00
|
|
|
case CODEC_ID_AMR_NB:
|
|
|
|
name = "3GPP AMR NarrowBand speech audio codec";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_AMR_WB:
|
|
|
|
name = "3GPP AMR WideBand speech audio codec";
|
|
|
|
break;
|
2007-12-17 12:43:06 +00:00
|
|
|
case CODEC_ID_KMVC:
|
|
|
|
name = "Karl Morton's video Codec";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_NUV:
|
|
|
|
name = "NuppelVideo codec";
|
|
|
|
break;
|
|
|
|
case CODEC_ID_NELLYMOSER:
|
|
|
|
name = "Nellymoser ASAO audio codec";
|
|
|
|
break;
|
2004-10-24 22:24:43 +00:00
|
|
|
default:
|
2006-05-26 12:42:06 +00:00
|
|
|
GST_LOG ("Unknown codecID 0x%x", codec_id);
|
2004-10-24 22:24:43 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return name;
|
|
|
|
}
|
2004-10-29 09:47:41 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fill in pointers to memory in a AVPicture, where
|
|
|
|
* everything is aligned by 4 (as required by X).
|
|
|
|
* This is mostly a copy from imgconvert.c with some
|
|
|
|
* small changes.
|
|
|
|
*/
|
|
|
|
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
#define FF_COLOR_RGB 0 /* RGB color space */
|
|
|
|
#define FF_COLOR_GRAY 1 /* gray color space */
|
|
|
|
#define FF_COLOR_YUV 2 /* YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
|
|
|
|
#define FF_COLOR_YUV_JPEG 3 /* YUV color space. 0 <= Y <= 255, 0 <= U, V <= 255 */
|
|
|
|
|
|
|
|
#define FF_PIXEL_PLANAR 0 /* each channel has one component in AVPicture */
|
|
|
|
#define FF_PIXEL_PACKED 1 /* only one components containing all the channels */
|
|
|
|
#define FF_PIXEL_PALETTE 2 /* one components containing indexes for a palette */
|
|
|
|
|
|
|
|
typedef struct PixFmtInfo
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
uint8_t nb_channels; /* number of channels (including alpha) */
|
|
|
|
uint8_t color_type; /* color type (see FF_COLOR_xxx constants) */
|
|
|
|
uint8_t pixel_type; /* pixel storage type (see FF_PIXEL_xxx constants) */
|
|
|
|
uint8_t is_alpha:1; /* true if alpha can be specified */
|
|
|
|
uint8_t x_chroma_shift; /* X chroma subsampling factor is 2 ^ shift */
|
|
|
|
uint8_t y_chroma_shift; /* Y chroma subsampling factor is 2 ^ shift */
|
|
|
|
uint8_t depth; /* bit depth of the color components */
|
2004-10-29 09:47:41 +00:00
|
|
|
} PixFmtInfo;
|
|
|
|
|
2006-09-06 15:15:05 +00:00
|
|
|
|
2004-10-29 09:47:41 +00:00
|
|
|
/* this table gives more information about formats */
|
2006-09-06 15:15:05 +00:00
|
|
|
static PixFmtInfo pix_fmt_info[PIX_FMT_NB];
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
void
|
|
|
|
gst_ffmpeg_init_pix_fmt_info ()
|
2006-09-06 15:15:05 +00:00
|
|
|
{
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
/* YUV formats */
|
2006-09-06 15:15:05 +00:00
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].name = g_strdup ("yuv420p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].color_type = FF_COLOR_YUV;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].depth = 8,
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].x_chroma_shift = 1,
|
|
|
|
pix_fmt_info[PIX_FMT_YUV420P].y_chroma_shift = 1;
|
2006-09-06 15:15:05 +00:00
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].name = g_strdup ("yuv422p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].color_type = FF_COLOR_YUV;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].x_chroma_shift = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422P].y_chroma_shift = 0;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-09-06 15:15:05 +00:00
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].name = g_strdup ("yuv444p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].color_type = FF_COLOR_YUV;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV444P].y_chroma_shift = 0;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-09-06 15:15:05 +00:00
|
|
|
pix_fmt_info[PIX_FMT_YUV422].name = g_strdup ("yuv422");
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422].nb_channels = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422].color_type = FF_COLOR_YUV;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422].pixel_type = FF_PIXEL_PACKED;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV422].x_chroma_shift = 1;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
pix_fmt_info[PIX_FMT_YUV422].y_chroma_shift = 0;
|
2006-09-06 15:15:05 +00:00
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].name = g_strdup ("yuv410p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].color_type = FF_COLOR_YUV;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].x_chroma_shift = 2;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV410P].y_chroma_shift = 2;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].name = g_strdup ("yuv411p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].color_type = FF_COLOR_YUV;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].x_chroma_shift = 2;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
pix_fmt_info[PIX_FMT_YUV411P].y_chroma_shift = 0;
|
2006-09-06 15:15:05 +00:00
|
|
|
|
|
|
|
/* JPEG YUV */
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].name = g_strdup ("yuvj420p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].color_type = FF_COLOR_YUV_JPEG;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].x_chroma_shift = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ420P].y_chroma_shift = 1;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].name = g_strdup ("yuvj422p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].color_type = FF_COLOR_YUV_JPEG;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].x_chroma_shift = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ422P].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].name = g_strdup ("yuvj444p");
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].color_type = FF_COLOR_YUV_JPEG;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_YUVJ444P].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
/* RGB formats */
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].name = g_strdup ("rgb24");
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].color_type = FF_COLOR_RGB;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].pixel_type = FF_PIXEL_PACKED;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB24].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].name = g_strdup ("bgr24");
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].color_type = FF_COLOR_RGB;
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].pixel_type = FF_PIXEL_PACKED;
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_BGR24].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].name = g_strdup ("rgba32");
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].nb_channels = 4;
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].is_alpha = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].color_type = FF_COLOR_RGB;
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].pixel_type = FF_PIXEL_PACKED;
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].depth = 8;
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_RGBA32].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].name = g_strdup ("rgb565");
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].nb_channels = 3;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].color_type = FF_COLOR_RGB;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].pixel_type = FF_PIXEL_PACKED;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].depth = 5;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB565].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].name = g_strdup ("rgb555");
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].nb_channels = 4;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].is_alpha = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].color_type = FF_COLOR_RGB;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].pixel_type = FF_PIXEL_PACKED;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].depth = 5;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].x_chroma_shift = 0;
|
|
|
|
pix_fmt_info[PIX_FMT_RGB555].y_chroma_shift = 0;
|
|
|
|
|
|
|
|
/* gray / mono formats */
|
|
|
|
pix_fmt_info[PIX_FMT_GRAY8].name = g_strdup ("gray");
|
|
|
|
pix_fmt_info[PIX_FMT_GRAY8].nb_channels = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_GRAY8].color_type = FF_COLOR_GRAY;
|
|
|
|
pix_fmt_info[PIX_FMT_GRAY8].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_GRAY8].depth = 8;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-09-06 15:15:05 +00:00
|
|
|
pix_fmt_info[PIX_FMT_MONOWHITE].name = g_strdup ("monow");
|
|
|
|
pix_fmt_info[PIX_FMT_MONOWHITE].nb_channels = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_MONOWHITE].color_type = FF_COLOR_GRAY;
|
|
|
|
pix_fmt_info[PIX_FMT_MONOWHITE].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_MONOWHITE].depth = 1;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
|
2006-09-06 15:15:05 +00:00
|
|
|
pix_fmt_info[PIX_FMT_MONOBLACK].name = g_strdup ("monob");
|
|
|
|
pix_fmt_info[PIX_FMT_MONOBLACK].nb_channels = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_MONOBLACK].color_type = FF_COLOR_GRAY;
|
|
|
|
pix_fmt_info[PIX_FMT_MONOBLACK].pixel_type = FF_PIXEL_PLANAR;
|
|
|
|
pix_fmt_info[PIX_FMT_MONOBLACK].depth = 1;
|
|
|
|
|
|
|
|
/* paletted formats */
|
|
|
|
pix_fmt_info[PIX_FMT_PAL8].name = g_strdup ("pal8");
|
|
|
|
pix_fmt_info[PIX_FMT_PAL8].nb_channels = 4;
|
|
|
|
pix_fmt_info[PIX_FMT_PAL8].is_alpha = 1;
|
|
|
|
pix_fmt_info[PIX_FMT_PAL8].color_type = FF_COLOR_RGB;
|
|
|
|
pix_fmt_info[PIX_FMT_PAL8].pixel_type = FF_PIXEL_PALETTE;
|
|
|
|
pix_fmt_info[PIX_FMT_PAL8].depth = 8;
|
2004-10-29 09:47:41 +00:00
|
|
|
};
|
|
|
|
|
2004-11-05 18:03:04 +00:00
|
|
|
int
|
|
|
|
gst_ffmpeg_avpicture_get_size (int pix_fmt, int width, int height)
|
|
|
|
{
|
|
|
|
AVPicture dummy_pict;
|
|
|
|
|
|
|
|
return gst_ffmpeg_avpicture_fill (&dummy_pict, NULL, pix_fmt, width, height);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define GEN_MASK(x) ((1<<(x))-1)
|
|
|
|
#define ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) & ~GEN_MASK(x))
|
|
|
|
#define ROUND_UP_2(x) ROUND_UP_X (x, 1)
|
|
|
|
#define ROUND_UP_4(x) ROUND_UP_X (x, 2)
|
|
|
|
#define ROUND_UP_8(x) ROUND_UP_X (x, 3)
|
|
|
|
#define DIV_ROUND_UP_X(v,x) (((v) + GEN_MASK(x)) >> (x))
|
2004-10-29 09:47:41 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
gst_ffmpeg_avpicture_fill (AVPicture * picture,
|
|
|
|
uint8_t * ptr, enum PixelFormat pix_fmt, int width, int height)
|
|
|
|
{
|
|
|
|
int size, w2, h2, size2;
|
|
|
|
int stride, stride2;
|
|
|
|
PixFmtInfo *pinfo;
|
|
|
|
|
|
|
|
pinfo = &pix_fmt_info[pix_fmt];
|
2004-12-16 18:14:19 +00:00
|
|
|
|
2004-10-29 09:47:41 +00:00
|
|
|
switch (pix_fmt) {
|
|
|
|
case PIX_FMT_YUV420P:
|
|
|
|
case PIX_FMT_YUV422P:
|
|
|
|
case PIX_FMT_YUV444P:
|
|
|
|
case PIX_FMT_YUV410P:
|
|
|
|
case PIX_FMT_YUV411P:
|
|
|
|
case PIX_FMT_YUVJ420P:
|
|
|
|
case PIX_FMT_YUVJ422P:
|
|
|
|
case PIX_FMT_YUVJ444P:
|
|
|
|
stride = ROUND_UP_4 (width);
|
2004-11-05 18:03:04 +00:00
|
|
|
h2 = ROUND_UP_X (height, pinfo->y_chroma_shift);
|
|
|
|
size = stride * h2;
|
|
|
|
w2 = DIV_ROUND_UP_X (width, pinfo->x_chroma_shift);
|
2004-10-29 09:47:41 +00:00
|
|
|
stride2 = ROUND_UP_4 (w2);
|
2004-11-05 18:03:04 +00:00
|
|
|
h2 = DIV_ROUND_UP_X (height, pinfo->y_chroma_shift);
|
2004-10-29 09:47:41 +00:00
|
|
|
size2 = stride2 * h2;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = picture->data[0] + size;
|
|
|
|
picture->data[2] = picture->data[1] + size2;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
picture->linesize[1] = stride2;
|
|
|
|
picture->linesize[2] = stride2;
|
|
|
|
return size + 2 * size2;
|
|
|
|
case PIX_FMT_RGB24:
|
|
|
|
case PIX_FMT_BGR24:
|
|
|
|
stride = ROUND_UP_4 (width * 3);
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
return size;
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
/*case PIX_FMT_AYUV4444:
|
|
|
|
case PIX_FMT_BGR32:
|
|
|
|
case PIX_FMT_BGRA32:
|
|
|
|
case PIX_FMT_RGB32: */
|
2004-10-29 09:47:41 +00:00
|
|
|
case PIX_FMT_RGBA32:
|
|
|
|
stride = width * 4;
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
return size;
|
|
|
|
case PIX_FMT_RGB555:
|
|
|
|
case PIX_FMT_RGB565:
|
|
|
|
case PIX_FMT_YUV422:
|
2004-12-16 18:14:19 +00:00
|
|
|
case PIX_FMT_UYVY422:
|
2004-10-29 09:47:41 +00:00
|
|
|
stride = ROUND_UP_4 (width * 2);
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
return size;
|
2004-12-16 18:14:19 +00:00
|
|
|
case PIX_FMT_UYVY411:
|
|
|
|
/* FIXME, probably not the right stride */
|
|
|
|
stride = ROUND_UP_4 (width);
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = width + width / 2;
|
|
|
|
return size + size / 2;
|
2004-10-29 09:47:41 +00:00
|
|
|
case PIX_FMT_GRAY8:
|
|
|
|
stride = ROUND_UP_4 (width);
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
return size;
|
|
|
|
case PIX_FMT_MONOWHITE:
|
|
|
|
case PIX_FMT_MONOBLACK:
|
|
|
|
stride = ROUND_UP_4 ((width + 7) >> 3);
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
return size;
|
|
|
|
case PIX_FMT_PAL8:
|
|
|
|
/* already forced to be with stride, so same result as other function */
|
|
|
|
stride = ROUND_UP_4 (width);
|
|
|
|
size = stride * height;
|
|
|
|
picture->data[0] = ptr;
|
|
|
|
picture->data[1] = ptr + size; /* palette is stored here as 256 32 bit words */
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->linesize[0] = stride;
|
|
|
|
picture->linesize[1] = 4;
|
|
|
|
return size + 256 * 4;
|
|
|
|
default:
|
|
|
|
picture->data[0] = NULL;
|
|
|
|
picture->data[1] = NULL;
|
|
|
|
picture->data[2] = NULL;
|
|
|
|
picture->data[3] = NULL;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2004-11-05 18:03:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Convert image 'src' to 'dst'.
|
|
|
|
*
|
|
|
|
* We use this code to copy two pictures between the same
|
|
|
|
* colorspaces, so this function is not realy used to do
|
|
|
|
* colorspace conversion.
|
|
|
|
* The ffmpeg code has a bug in it where odd sized frames were
|
|
|
|
* not copied completely. We adjust the input parameters for
|
|
|
|
* the original ffmpeg img_convert function here so that it
|
|
|
|
* still does the right thing.
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
gst_ffmpeg_img_convert (AVPicture * dst, int dst_pix_fmt,
|
|
|
|
const AVPicture * src, int src_pix_fmt, int src_width, int src_height)
|
|
|
|
{
|
|
|
|
PixFmtInfo *pf = &pix_fmt_info[src_pix_fmt];
|
|
|
|
|
|
|
|
pf = &pix_fmt_info[src_pix_fmt];
|
|
|
|
switch (pf->pixel_type) {
|
|
|
|
case FF_PIXEL_PACKED:
|
|
|
|
/* nothing wrong here */
|
|
|
|
break;
|
|
|
|
case FF_PIXEL_PLANAR:
|
|
|
|
/* patch up, so that img_copy copies all of the pixels */
|
|
|
|
src_width = ROUND_UP_X (src_width, pf->x_chroma_shift);
|
|
|
|
src_height = ROUND_UP_X (src_height, pf->y_chroma_shift);
|
|
|
|
break;
|
|
|
|
case FF_PIXEL_PALETTE:
|
|
|
|
/* nothing wrong here */
|
|
|
|
break;
|
|
|
|
}
|
ext/ffmpeg/: Use codecid as extra parameter when getting caps.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 14:59:34 +00:00
|
|
|
return img_convert (dst, dst_pix_fmt, src, src_pix_fmt, src_width,
|
|
|
|
src_height);
|
2004-11-05 18:03:04 +00:00
|
|
|
}
|