2002-12-29 22:20:41 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-04 00:22:16 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2002-12-29 22:20:41 +00:00
|
|
|
*/
|
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
#ifndef __GST_FFMPEG_CODECMAP_H__
|
|
|
|
#define __GST_FFMPEG_CODECMAP_H__
|
2002-12-29 22:20:41 +00:00
|
|
|
|
2008-10-30 12:05:45 +00:00
|
|
|
#include <libavcodec/avcodec.h>
|
2002-12-29 22:20:41 +00:00
|
|
|
#include <gst/gst.h>
|
2012-01-10 09:37:50 +00:00
|
|
|
#include <gst/audio/audio.h>
|
2011-07-29 08:25:03 +00:00
|
|
|
#include <gst/video/video.h>
|
2008-12-13 07:55:40 +00:00
|
|
|
|
2013-10-14 20:50:57 +00:00
|
|
|
/**
|
|
|
|
* GstFFMpegCompliance:
|
|
|
|
* @GST_FFMPEG_VERY_STRICT: Strictly conform to an older
|
|
|
|
* more strict version of the spec or reference software
|
|
|
|
* @GST_FFMPEG_STRICT: Strictly conform to all the things
|
|
|
|
* in the spec no matter what consequences.
|
|
|
|
* @GST_FFMPEG_NORMAL:
|
|
|
|
* @GST_FFMPEG_UNOFFICIAL: Allow unofficial extensions
|
|
|
|
* @GST_FFMPEG_EXPERIMENTAL: Allow nonstandardized
|
|
|
|
* experimental things.
|
|
|
|
*
|
|
|
|
* This setting instructs libav on how strictly it should follow the
|
|
|
|
* associated standard.
|
|
|
|
*
|
|
|
|
* From avcodec.h:
|
|
|
|
* Setting this to STRICT or higher means the encoder and decoder will
|
|
|
|
* generally do stupid things, whereas setting it to unofficial or lower
|
|
|
|
* will mean the encoder might produce output that is not supported by all
|
|
|
|
* spec-compliant decoders. Decoders don't differentiate between normal,
|
|
|
|
* unofficial and experimental (that is, they always try to decode things
|
|
|
|
* when they can) unless they are explicitly asked to behave stupidly
|
|
|
|
* (=strictly conform to the specs)
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_FFMPEG_VERY_STRICT = FF_COMPLIANCE_VERY_STRICT,
|
|
|
|
GST_FFMPEG_STRICT = FF_COMPLIANCE_STRICT,
|
|
|
|
GST_FFMPEG_NORMAL = FF_COMPLIANCE_NORMAL,
|
|
|
|
GST_FFMPEG_UNOFFICIAL = FF_COMPLIANCE_UNOFFICIAL,
|
|
|
|
GST_FFMPEG_EXPERIMENTAL = FF_COMPLIANCE_EXPERIMENTAL,
|
|
|
|
} GstFFMpegCompliance;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* _compliance_get_type () Returns an enum type that can be
|
|
|
|
* used as a property to indicate desired FFMpeg adherence to
|
|
|
|
* an associated specification
|
|
|
|
*/
|
|
|
|
|
|
|
|
GType
|
|
|
|
gst_ffmpeg_compliance_get_type (void);
|
|
|
|
#define GST_TYPE_FFMPEG_COMPLIANCE (gst_ffmpeg_compliance_get_type ())
|
|
|
|
#define FFMPEG_DEFAULT_COMPLIANCE GST_FFMPEG_NORMAL
|
|
|
|
|
2017-03-20 16:49:47 +00:00
|
|
|
/*
|
|
|
|
* _codecid_is_image() returns TRUE for image formats
|
|
|
|
*/
|
|
|
|
gboolean
|
|
|
|
gst_ffmpeg_codecid_is_image (enum AVCodecID codec_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
|
|
|
/*
|
|
|
|
* _codecid_to_caps () gets the GstCaps that belongs to
|
2003-06-07 00:41:32 +00:00
|
|
|
* a certain CodecID for a pad with compressed data.
|
|
|
|
*/
|
|
|
|
|
2002-12-29 22:20:41 +00:00
|
|
|
GstCaps *
|
2014-01-03 15:28:44 +00:00
|
|
|
gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
|
2004-03-15 00:01:03 +00:00
|
|
|
AVCodecContext *context,
|
2005-12-06 19:57:08 +00:00
|
|
|
gboolean encode);
|
2002-12-29 22:20:41 +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
|
|
|
/*
|
|
|
|
* _codectype_to_caps () gets the GstCaps that belongs to
|
2011-04-19 17:29:57 +00:00
|
|
|
* a certain AVMediaType for a pad with uncompressed data.
|
2003-06-07 00:41:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
GstCaps *
|
2009-01-29 06:48:19 +00:00
|
|
|
gst_ffmpeg_codectype_to_audio_caps (AVCodecContext *context,
|
2014-01-03 15:28:44 +00:00
|
|
|
enum AVCodecID codec_id,
|
2009-01-29 06:48:19 +00:00
|
|
|
gboolean encode,
|
|
|
|
AVCodec *codec);
|
|
|
|
GstCaps *
|
|
|
|
gst_ffmpeg_codectype_to_video_caps (AVCodecContext *context,
|
2014-01-03 15:28:44 +00:00
|
|
|
enum AVCodecID codec_id,
|
2009-01-29 06:48:19 +00:00
|
|
|
gboolean encode,
|
|
|
|
AVCodec *codec);
|
2002-12-29 22:20:41 +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_to_codecid () transforms a GstCaps that belongs to
|
2003-06-17 11:44:11 +00:00
|
|
|
* a pad for compressed data to (optionally) a filled-in
|
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
|
|
|
* context and a codecID.
|
2003-06-17 11:44:11 +00:00
|
|
|
*/
|
|
|
|
|
2014-01-03 15:28:44 +00:00
|
|
|
enum AVCodecID
|
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_codecid (const GstCaps *caps,
|
2003-06-17 11:44:11 +00:00
|
|
|
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
|
|
|
/*
|
|
|
|
* caps_with_codecid () transforms a GstCaps for a known codec
|
|
|
|
* ID into a filled-in context.
|
2003-06-07 20:45:56 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
2014-01-03 15:28:44 +00:00
|
|
|
gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
|
2011-04-19 17:29:57 +00:00
|
|
|
enum AVMediaType codec_type,
|
2005-12-06 19:57:08 +00:00
|
|
|
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
|
|
|
|
|
|
|
/*
|
|
|
|
* caps_with_codectype () transforms a GstCaps that belongs to
|
|
|
|
* a pad for uncompressed data to a filled-in context.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
2011-04-19 17:29:57 +00:00
|
|
|
gst_ffmpeg_caps_with_codectype (enum AVMediaType type,
|
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
|
|
|
const GstCaps *caps,
|
|
|
|
AVCodecContext *context);
|
2003-06-07 20:45:56 +00:00
|
|
|
|
2012-04-24 09:31:44 +00:00
|
|
|
void
|
|
|
|
gst_ffmpeg_videoinfo_to_context (GstVideoInfo *info,
|
|
|
|
AVCodecContext *context);
|
|
|
|
|
2012-11-20 09:36:29 +00:00
|
|
|
void
|
|
|
|
gst_ffmpeg_audioinfo_to_context (GstAudioInfo *info,
|
|
|
|
AVCodecContext *context);
|
|
|
|
|
2015-11-04 20:18:56 +00:00
|
|
|
GstVideoFormat gst_ffmpeg_pixfmt_to_videoformat (enum AVPixelFormat pixfmt);
|
|
|
|
enum AVPixelFormat gst_ffmpeg_videoformat_to_pixfmt (GstVideoFormat format);
|
2012-04-24 09:31:44 +00:00
|
|
|
|
2018-07-23 13:16:10 +00:00
|
|
|
GstAudioFormat gst_ffmpeg_smpfmt_to_audioformat (enum AVSampleFormat sample_fmt,
|
|
|
|
GstAudioLayout * layout);
|
2012-11-19 11:57:19 +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
|
|
|
/*
|
|
|
|
* _formatid_to_caps () is meant for muxers/demuxers, it
|
2003-06-08 13:30:10 +00:00
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
GstCaps *
|
|
|
|
gst_ffmpeg_formatid_to_caps (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
|
|
|
/*
|
|
|
|
* _formatid_get_codecids () can be used to get the codecIDs
|
2018-04-30 19:54:44 +00:00
|
|
|
* (AV_CODEC_ID_NONE-terminated list) that fit that specific
|
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
|
|
|
* output format.
|
|
|
|
*/
|
|
|
|
|
|
|
|
gboolean
|
|
|
|
gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
|
2014-01-03 15:28:44 +00:00
|
|
|
enum AVCodecID ** video_codec_list,
|
|
|
|
enum AVCodecID ** audio_codec_list,
|
2009-02-27 08:40:03 +00:00
|
|
|
AVOutputFormat * plugin);
|
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
|
|
|
|
2004-11-05 18:03:04 +00:00
|
|
|
|
2012-01-10 09:37:50 +00:00
|
|
|
gboolean
|
2012-12-11 17:25:41 +00:00
|
|
|
gst_ffmpeg_channel_layout_to_gst (guint64 channel_layout, gint channels,
|
2012-01-10 09:37:50 +00:00
|
|
|
GstAudioChannelPosition * pos);
|
ext/ffmpeg/gstffmpegcodecmap.*: Add mapping for EAC3 and QCELP audio codecs.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new),
(gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_smpfmt),
(gst_ffmpeg_caps_to_codecid), (av_smp_format_depth):
* ext/ffmpeg/gstffmpegcodecmap.h:
Add mapping for EAC3 and QCELP audio codecs.
Add conversion functions for all available audo SampleFormat.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
(gst_ffmpegdec_setcaps), (gst_ffmpegdec_negotiate),
(clip_audio_buffer), (gst_ffmpegdec_audio_frame):
Remove assumptions that we can only handle stereo 16bit signed integer
audio, and store the depth locally.
2008-12-17 12:05:12 +00:00
|
|
|
|
2003-06-07 00:41:32 +00:00
|
|
|
#endif /* __GST_FFMPEG_CODECMAP_H__ */
|