Commit 5312e1f7 authored by Michal Benes's avatar Michal Benes Committed by Edward Hervey

ext/ffmpeg/: Port of FFMpeg muxers to 0.10.

Original commit message from CVS:
Patch by: Michal Benes  <michal dot benes at xeris dot cz>
* ext/ffmpeg/Makefile.am:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init),
(gst_ffmpegmux_init), (gst_ffmpegmux_finalize),
(gst_ffmpegmux_request_new_pad), (gst_ffmpegmux_setcaps),
(gst_ffmpegmux_collected), (gst_ffmpegmux_change_state),
(gst_ffmpegmux_register):
Port of FFMpeg muxers to 0.10.
Still needs some loving in gstffmpegcodecmap to have them all supported
with correct input formats.
Closes #332339
parent df305f76
2006-09-08 Edward Hervey <edward@fluendo.com>
Patch by: Michal Benes <michal dot benes at xeris dot cz>
* ext/ffmpeg/Makefile.am:
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_codecid):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init),
(gst_ffmpegmux_init), (gst_ffmpegmux_finalize),
(gst_ffmpegmux_request_new_pad), (gst_ffmpegmux_setcaps),
(gst_ffmpegmux_collected), (gst_ffmpegmux_change_state),
(gst_ffmpegmux_register):
Port of FFMpeg muxers to 0.10.
Still needs some loving in gstffmpegcodecmap to have them all supported
with correct input formats.
Closes #332339
2006-09-06 Wim Taymans <wim@fluendo.com>
Patch by: Sebastien Moutte <sebastien at moutte dot net>
......
......@@ -7,9 +7,9 @@ libgstffmpeg_la_SOURCES = gstffmpeg.c \
gstffmpegdec.c \
gstffmpegcfg.c \
gstffmpegdemux.c \
gstffmpegmux.c \
gstffmpegdeinterlace.c \
gstffmpegscale.c
# gstffmpegmux.c
libgstffmpeg_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
-I $(top_srcdir)/gst-libs/ext/ffmpeg/libavformat \
......
......@@ -114,10 +114,10 @@ plugin_init (GstPlugin * plugin)
gst_ffmpegenc_register (plugin);
gst_ffmpegdec_register (plugin);
gst_ffmpegdemux_register (plugin);
gst_ffmpegmux_register (plugin);
gst_ffmpegdeinterlace_register (plugin);
gst_ffmpegscale_register (plugin);
#if 0
gst_ffmpegmux_register (plugin);
gst_ffmpegcsp_register (plugin);
#endif
......
......@@ -2110,6 +2110,20 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
} else if (!strcmp (mimetype, "video/x-h264")) {
id = CODEC_ID_H264;
video = TRUE;
} else if (!strcmp (mimetype, "video/x-flash-video")) {
gint flvversion = 0;
if ((gst_structure_get_int (structure, "flvversion", &flvversion))) {
switch (flvversion) {
case 1:
id = CODEC_ID_FLV1;
video = TRUE;
break;
default:
break;
}
}
} else if (!strncmp (mimetype, "audio/x-gst_ff-", 15) ) {
gchar ext[16];
AVCodec *codec;
......@@ -2151,6 +2165,11 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
GST_DEBUG ("The id=%d belongs to the caps %s", id, str);
g_free (str);
} else {
gchar * str = gst_caps_to_string (caps);
GST_WARNING ("Couldn't figure out the id for caps %s", str);
g_free (str);
}
return id;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment