mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-15 11:55:32 +00:00
Update ffmpeg/swscale snapshot to the latest revision and adjust to API changes. Fixes bug #556405.
Original commit message from CVS: Based on a patch by: Alexis Ballier <aballier at gentoo dot org> * configure.ac: * ext/ffmpeg/gstffmpeg.c: * ext/ffmpeg/gstffmpeg.h: * ext/ffmpeg/gstffmpegaudioresample.c: * ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_flags_get_type), (gst_ffmpeg_cfg_init): * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codecid): * ext/ffmpeg/gstffmpegcodecmap.h: * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps), (gst_ffmpegdec_register): * ext/ffmpeg/gstffmpegdeinterlace.c: * ext/ffmpeg/gstffmpegdemux.c: * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps), (gst_ffmpegenc_setcaps), (gst_ffmpegenc_register): * ext/ffmpeg/gstffmpegmux.c: * ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_seek): * ext/libpostproc/gstpostproc.c: * ffmpegrev: Update ffmpeg/swscale snapshot to the latest revision and adjust to API changes. Fixes bug #556405. Require libavutil for swscale too when building with an external ffmpeg and fix includes for external ffmpeg.
This commit is contained in:
parent
e6425e766d
commit
42cf6d213f
17 changed files with 118 additions and 89 deletions
29
ChangeLog
29
ChangeLog
|
@ -1,3 +1,32 @@
|
|||
2008-10-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
Based on a patch by: Alexis Ballier <aballier at gentoo dot org>
|
||||
|
||||
* configure.ac:
|
||||
* ext/ffmpeg/gstffmpeg.c:
|
||||
* ext/ffmpeg/gstffmpeg.h:
|
||||
* ext/ffmpeg/gstffmpegaudioresample.c:
|
||||
* ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_flags_get_type),
|
||||
(gst_ffmpeg_cfg_init):
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
|
||||
(gst_ffmpeg_caps_to_pixfmt), (gst_ffmpeg_caps_with_codecid):
|
||||
* ext/ffmpeg/gstffmpegcodecmap.h:
|
||||
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_setcaps),
|
||||
(gst_ffmpegdec_register):
|
||||
* ext/ffmpeg/gstffmpegdeinterlace.c:
|
||||
* ext/ffmpeg/gstffmpegdemux.c:
|
||||
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
|
||||
(gst_ffmpegenc_setcaps), (gst_ffmpegenc_register):
|
||||
* ext/ffmpeg/gstffmpegmux.c:
|
||||
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_seek):
|
||||
* ext/libpostproc/gstpostproc.c:
|
||||
* ffmpegrev:
|
||||
Update ffmpeg/swscale snapshot to the latest revision and adjust
|
||||
to API changes. Fixes bug #556405.
|
||||
|
||||
Require libavutil for swscale too when building with an external
|
||||
ffmpeg and fix includes for external ffmpeg.
|
||||
|
||||
2008-10-15 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
Patch by: Robin Stocker <robin at nibor dot org>
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 46eefd2f8474ee748864c59635be87b5a29317d1
|
||||
Subproject commit 2802bb17517a6cfbbb1be6da61ec19151be0750b
|
|
@ -211,7 +211,7 @@ AC_ARG_WITH(system-ffmpeg,
|
|||
|
||||
if test "x$with_system_ffmpeg" = "xyes"; then
|
||||
PKG_CHECK_MODULES(FFMPEG, libavutil libavcodec libavformat)
|
||||
PKG_CHECK_MODULES(POSTPROC, libavcodec libpostproc)
|
||||
PKG_CHECK_MODULES(POSTPROC, libavutil libavcodec libpostproc)
|
||||
PKG_CHECK_MODULES(SWSCALE, libavutil libswcale)
|
||||
saved_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
#include <avcodec.h>
|
||||
#include <avformat.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <ffmpeg/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#endif
|
||||
|
||||
#include "gstffmpeg.h"
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include <avcodec.h>
|
||||
#include <avformat.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <ffmpeg/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avcodec.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
|
|
@ -272,7 +272,6 @@ gst_ffmpeg_flags_get_type (void)
|
|||
{CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
|
||||
{CODEC_FLAG_NORMALIZE_AQP,
|
||||
"Normalize Adaptive Quantization (masking, etc)", "aqp"},
|
||||
{CODEC_FLAG_TRELLIS_QUANT, "Trellis Quantization", "trellis"},
|
||||
{CODEC_FLAG_GLOBAL_HEADER,
|
||||
"Global headers in extradata instead of every keyframe",
|
||||
"global-headers"},
|
||||
|
@ -669,6 +668,9 @@ gst_ffmpeg_cfg_init ()
|
|||
"Prediction Method",
|
||||
GST_TYPE_FFMPEG_PRED_METHOD, FF_PRED_LEFT, G_PARAM_READWRITE);
|
||||
gst_ffmpeg_add_pspec (pspec, config.prediction_method, FALSE, huffyuv, NULL);
|
||||
pspec = g_param_spec_int ("trellis", "Trellis Quantization",
|
||||
"Trellis RD quantization", 0, 1, 1, G_PARAM_READWRITE);
|
||||
gst_ffmpeg_add_pspec (pspec, config.trellis, FALSE, mpeg, NULL);
|
||||
}
|
||||
|
||||
/* ==== END CONFIGURATION SECTION ==== */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avcodec.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
|
@ -456,7 +456,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"depth", G_TYPE_INT, context->bits_per_sample, NULL);
|
||||
"depth", G_TYPE_INT, context->bits_per_coded_sample, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -636,7 +636,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-huffyuv", NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"bpp", G_TYPE_INT, context->bits_per_sample, NULL);
|
||||
"bpp", G_TYPE_INT, context->bits_per_coded_sample, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -752,7 +752,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
"layout", G_TYPE_STRING, "microsoft", NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
|
||||
"depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
|
||||
} else {
|
||||
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
"layout", G_TYPE_STRING, "quicktime", NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
|
||||
"depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
|
||||
} else {
|
||||
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 1, 64, NULL);
|
||||
}
|
||||
|
@ -813,7 +813,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-camtasia", NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"depth", G_TYPE_INT, (gint) context->bits_per_sample, NULL);
|
||||
"depth", G_TYPE_INT, (gint) context->bits_per_coded_sample, NULL);
|
||||
} else {
|
||||
gst_caps_set_simple (caps, "depth", GST_TYPE_INT_RANGE, 8, 32, NULL);
|
||||
}
|
||||
|
@ -851,21 +851,22 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-qdrw", NULL);
|
||||
break;
|
||||
|
||||
case CODEC_ID_DNXHD:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dnxhd", NULL);
|
||||
break;
|
||||
case CODEC_ID_DNXHD:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-dnxhd", NULL);
|
||||
break;
|
||||
|
||||
case CODEC_ID_MIMIC:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mimic", NULL);
|
||||
break;
|
||||
case CODEC_ID_MIMIC:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-mimic", NULL);
|
||||
break;
|
||||
|
||||
case CODEC_ID_VMNC:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vmnc", NULL);
|
||||
break;
|
||||
case CODEC_ID_VMNC:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vmnc", NULL);
|
||||
break;
|
||||
|
||||
case CODEC_ID_TRUESPEECH:
|
||||
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-truespeech", NULL);
|
||||
break;
|
||||
caps =
|
||||
gst_ff_aud_caps_new (context, codec_id, "audio/x-truespeech", NULL);
|
||||
break;
|
||||
|
||||
case CODEC_ID_WS_VQA:
|
||||
case CODEC_ID_IDCIN:
|
||||
|
@ -1166,7 +1167,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-alac", NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
|
||||
"samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1189,7 +1190,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-tta", NULL);
|
||||
if (context) {
|
||||
gst_caps_set_simple (caps,
|
||||
"samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
|
||||
"samplesize", G_TYPE_INT, context->bits_per_coded_sample, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -1354,25 +1355,24 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context,
|
|||
if (caps == NULL) {
|
||||
if (bpp != 0) {
|
||||
if (r_mask != 0) {
|
||||
if (a_mask) {
|
||||
if (a_mask) {
|
||||
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,
|
||||
"alpha_mask", G_TYPE_INT, a_mask,
|
||||
"endianness", G_TYPE_INT, endianness, NULL);
|
||||
}
|
||||
else {
|
||||
"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,
|
||||
"alpha_mask", G_TYPE_INT, a_mask,
|
||||
"endianness", G_TYPE_INT, endianness, NULL);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
"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);
|
||||
}
|
||||
} else {
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-raw-rgb",
|
||||
"bpp", G_TYPE_INT, bpp,
|
||||
|
@ -1462,8 +1462,7 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
|
|||
switch (codec_type) {
|
||||
case CODEC_TYPE_VIDEO:
|
||||
if (context) {
|
||||
caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt,
|
||||
context, codec_id);
|
||||
caps = gst_ffmpeg_pixfmt_to_caps (context->pix_fmt, context, codec_id);
|
||||
} else {
|
||||
GstCaps *temp;
|
||||
enum PixelFormat i;
|
||||
|
@ -1567,7 +1566,7 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
|
|||
|
||||
gst_structure_get_int (structure, "width", &context->width);
|
||||
gst_structure_get_int (structure, "height", &context->height);
|
||||
gst_structure_get_int (structure, "bpp", &context->bits_per_sample);
|
||||
gst_structure_get_int (structure, "bpp", &context->bits_per_coded_sample);
|
||||
|
||||
fps = gst_structure_get_value (structure, "framerate");
|
||||
if (fps != NULL && GST_VALUE_HOLDS_FRACTION (fps)) {
|
||||
|
@ -1710,7 +1709,7 @@ gst_ffmpeg_caps_with_codectype (enum CodecType type,
|
|||
}
|
||||
|
||||
static void
|
||||
nal_escape (guint8 *dst, guint8 *src, guint size, guint *destsize)
|
||||
nal_escape (guint8 * dst, guint8 * src, guint size, guint * destsize)
|
||||
{
|
||||
guint8 *dstp = dst;
|
||||
guint8 *srcp = src;
|
||||
|
@ -1718,7 +1717,7 @@ nal_escape (guint8 *dst, guint8 *src, guint size, guint *destsize)
|
|||
gint count = 0;
|
||||
|
||||
while (srcp < end) {
|
||||
if (count == 2 && *srcp <= 0x03 ) {
|
||||
if (count == 2 && *srcp <= 0x03) {
|
||||
GST_DEBUG ("added escape code");
|
||||
*dstp++ = 0x03;
|
||||
count = 0;
|
||||
|
@ -1737,7 +1736,7 @@ nal_escape (guint8 *dst, guint8 *src, guint size, guint *destsize)
|
|||
/* copy the config, escaping NAL units as we iterate them, if something fails we
|
||||
* copy everything and hope for the best. */
|
||||
static void
|
||||
copy_config (guint8 *dst, guint8 *src, guint size, guint *destsize)
|
||||
copy_config (guint8 * dst, guint8 * src, guint size, guint * destsize)
|
||||
{
|
||||
guint8 *dstp = dst;
|
||||
guint8 *srcp = src;
|
||||
|
@ -1748,11 +1747,11 @@ copy_config (guint8 *dst, guint8 *src, guint size, guint *destsize)
|
|||
if (size < 7)
|
||||
goto full_copy;
|
||||
|
||||
/* check version */
|
||||
/* check version */
|
||||
if (*srcp != 1)
|
||||
goto full_copy;
|
||||
|
||||
cnt = *(srcp + 5) & 0x1f; /* Number of sps */
|
||||
cnt = *(srcp + 5) & 0x1f; /* Number of sps */
|
||||
|
||||
GST_DEBUG ("num SPS %d", cnt);
|
||||
|
||||
|
@ -1770,7 +1769,7 @@ copy_config (guint8 *dst, guint8 *src, guint size, guint *destsize)
|
|||
srcp += nalsize + 2;
|
||||
}
|
||||
|
||||
cnt = *(dstp++) = *(srcp++); /* Number of pps */
|
||||
cnt = *(dstp++) = *(srcp++); /* Number of pps */
|
||||
|
||||
GST_DEBUG ("num PPS %d", cnt);
|
||||
|
||||
|
@ -1837,12 +1836,12 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
|||
* reason for this but let's just escape it for now. Start by allocating
|
||||
* enough space, x2 is more than enough. */
|
||||
context->extradata =
|
||||
av_mallocz (GST_ROUND_UP_16 (size * 2 + FF_INPUT_BUFFER_PADDING_SIZE));
|
||||
av_mallocz (GST_ROUND_UP_16 (size * 2 +
|
||||
FF_INPUT_BUFFER_PADDING_SIZE));
|
||||
copy_config (context->extradata, data, size, &extrasize);
|
||||
GST_DEBUG ("escaped size: %d", extrasize);
|
||||
context->extradata_size = extrasize;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
/* allocate with enough padding */
|
||||
GST_DEBUG ("copy codec_data");
|
||||
context->extradata =
|
||||
|
@ -1921,7 +1920,7 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
|||
gint depth;
|
||||
|
||||
if (gst_structure_get_int (str, "depth", &depth)) {
|
||||
context->bits_per_sample = depth;
|
||||
context->bits_per_coded_sample = depth;
|
||||
} else {
|
||||
GST_WARNING ("No depth field in caps %" GST_PTR_FORMAT, caps);
|
||||
}
|
||||
|
@ -1954,7 +1953,8 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
|||
context->bit_rate = bitrate;
|
||||
}
|
||||
case CODEC_ID_ALAC:
|
||||
gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
|
||||
gst_structure_get_int (str, "samplesize",
|
||||
&context->bits_per_coded_sample);
|
||||
break;
|
||||
|
||||
case CODEC_ID_DVVIDEO:
|
||||
|
@ -2110,7 +2110,7 @@ gst_ffmpeg_formatid_get_codecids (const gchar * format_name,
|
|||
CODEC_ID_NONE
|
||||
};
|
||||
static enum CodecID mp4_audio_list[] = {
|
||||
CODEC_ID_AAC, CODEC_ID_MP3,
|
||||
CODEC_ID_AAC, CODEC_ID_MP3,
|
||||
CODEC_ID_NONE
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avcodec.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#endif
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avcodec.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
@ -697,7 +697,7 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
|
|||
|
||||
/* workaround encoder bugs */
|
||||
ffmpegdec->context->workaround_bugs |= FF_BUG_AUTODETECT;
|
||||
ffmpegdec->context->error_resilience = 1;
|
||||
ffmpegdec->context->error_recognition = 1;
|
||||
|
||||
/* for slow cpus */
|
||||
ffmpegdec->context->lowres = ffmpegdec->lowres;
|
||||
|
@ -2449,7 +2449,7 @@ gst_ffmpegdec_register (GstPlugin * plugin)
|
|||
AVCodec *in_plugin;
|
||||
gint rank;
|
||||
|
||||
in_plugin = first_avcodec;
|
||||
in_plugin = av_codec_next (NULL);
|
||||
|
||||
GST_LOG ("Registering decoders");
|
||||
|
||||
|
@ -2559,7 +2559,7 @@ gst_ffmpegdec_register (GstPlugin * plugin)
|
|||
gst_caps_unref (sinkcaps);
|
||||
if (srccaps)
|
||||
gst_caps_unref (srccaps);
|
||||
in_plugin = in_plugin->next;
|
||||
in_plugin = av_codec_next (in_plugin);
|
||||
}
|
||||
|
||||
GST_LOG ("Finished Registering decoders");
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
# include <avcodec.h>
|
||||
#else
|
||||
# include <ffmpeg/avcodec.h>
|
||||
# include <libavcodec/avcodec.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <avi.h>
|
||||
#endif
|
||||
#else
|
||||
#include <ffmpeg/avformat.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#ifdef HAVE_AVI_H
|
||||
#include <ffmpeg/avi.h>
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avcodec.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
@ -132,7 +132,7 @@ gst_ffmpegenc_base_init (GstFFMpegEncClass * klass)
|
|||
|
||||
/* construct the element details struct */
|
||||
details.longname = g_strdup_printf ("FFMPEG %s encoder",
|
||||
params->in_plugin->long_name);
|
||||
params->in_plugin->long_name);
|
||||
details.klass = g_strdup_printf ("Codec/Encoder/%s",
|
||||
(params->in_plugin->type == CODEC_TYPE_VIDEO) ? "Video" : "Audio");
|
||||
details.description = g_strdup_printf ("FFMPEG %s encoder",
|
||||
|
@ -294,7 +294,8 @@ gst_ffmpegenc_getcaps (GstPad * pad)
|
|||
if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
|
||||
caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||
|
||||
GST_DEBUG_OBJECT (ffmpegenc, "audio caps, return template %"GST_PTR_FORMAT, caps);
|
||||
GST_DEBUG_OBJECT (ffmpegenc, "audio caps, return template %" GST_PTR_FORMAT,
|
||||
caps);
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
@ -302,7 +303,7 @@ gst_ffmpegenc_getcaps (GstPad * pad)
|
|||
/* cached */
|
||||
if (oclass->sinkcaps) {
|
||||
caps = gst_caps_copy (oclass->sinkcaps);
|
||||
GST_DEBUG_OBJECT (ffmpegenc, "return cached caps %"GST_PTR_FORMAT, caps);
|
||||
GST_DEBUG_OBJECT (ffmpegenc, "return cached caps %" GST_PTR_FORMAT, caps);
|
||||
return caps;
|
||||
}
|
||||
|
||||
|
@ -343,8 +344,8 @@ gst_ffmpegenc_getcaps (GstPad * pad)
|
|||
/* set some default properties */
|
||||
ctx->width = DEFAULT_WIDTH;
|
||||
ctx->height = DEFAULT_HEIGHT;
|
||||
ctx->time_base.num = DEFAULT_FRAME_RATE_BASE;
|
||||
ctx->time_base.den = 25 * DEFAULT_FRAME_RATE_BASE;
|
||||
ctx->time_base.num = 1;
|
||||
ctx->time_base.den = 25;
|
||||
ctx->bit_rate = DEFAULT_VIDEO_BITRATE;
|
||||
/* makes it silent */
|
||||
ctx->strict_std_compliance = -1;
|
||||
|
@ -381,7 +382,7 @@ gst_ffmpegenc_getcaps (GstPad * pad)
|
|||
return caps;
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (ffmpegenc, "probed caps gave %"GST_PTR_FORMAT, caps);
|
||||
GST_DEBUG_OBJECT (ffmpegenc, "probed caps gave %" GST_PTR_FORMAT, caps);
|
||||
oclass->sinkcaps = gst_caps_copy (caps);
|
||||
|
||||
return caps;
|
||||
|
@ -420,7 +421,6 @@ gst_ffmpegenc_setcaps (GstPad * pad, GstCaps * caps)
|
|||
|
||||
/* RTP payload used for GOB production (for Asterisk) */
|
||||
if (ffmpegenc->rtp_payload_size) {
|
||||
ffmpegenc->context->rtp_mode = 1;
|
||||
ffmpegenc->context->rtp_payload_size = ffmpegenc->rtp_payload_size;
|
||||
}
|
||||
|
||||
|
@ -985,13 +985,13 @@ gst_ffmpegenc_register (GstPlugin * plugin)
|
|||
GType type;
|
||||
AVCodec *in_plugin;
|
||||
|
||||
in_plugin = first_avcodec;
|
||||
|
||||
GST_LOG ("Registering encoders");
|
||||
|
||||
/* build global ffmpeg param/property info */
|
||||
gst_ffmpeg_cfg_init ();
|
||||
|
||||
in_plugin = av_codec_next (NULL);
|
||||
while (in_plugin) {
|
||||
gchar *type_name;
|
||||
GstCaps *srccaps = NULL, *sinkcaps = NULL;
|
||||
|
@ -1010,8 +1010,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
|
|||
goto next;
|
||||
}
|
||||
|
||||
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name,
|
||||
in_plugin->long_name);
|
||||
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
|
||||
|
||||
/* no codecs for which we're GUARANTEED to have better alternatives */
|
||||
if (!strcmp (in_plugin->name, "vorbis") ||
|
||||
|
@ -1034,8 +1033,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
|
|||
in_plugin->id, TRUE);
|
||||
}
|
||||
if (!sinkcaps) {
|
||||
GST_WARNING ("Couldn't get sink caps for encoder %s",
|
||||
in_plugin->name);
|
||||
GST_WARNING ("Couldn't get sink caps for encoder %s", in_plugin->name);
|
||||
goto next;
|
||||
}
|
||||
/* construct the type */
|
||||
|
@ -1068,7 +1066,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
|
|||
gst_caps_unref (sinkcaps);
|
||||
if (srccaps)
|
||||
gst_caps_unref (srccaps);
|
||||
in_plugin = in_plugin->next;
|
||||
in_plugin = av_codec_next (in_plugin);
|
||||
}
|
||||
|
||||
GST_LOG ("Finished registering encoders");
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avformat.h>
|
||||
#else
|
||||
#include <ffmpeg/avformat.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
@ -570,7 +570,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
|
|||
if (GST_BUFFER_DURATION_IS_VALID (buf))
|
||||
pkt.duration =
|
||||
gst_ffmpeg_time_gst_to_ff (GST_BUFFER_DURATION (buf),
|
||||
ffmpegmux->context->streams[best_pad->padnum]->time_base);
|
||||
ffmpegmux->context->streams[best_pad->padnum]->time_base);
|
||||
else
|
||||
pkt.duration = 0;
|
||||
av_write_frame (ffmpegmux->context, &pkt);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifdef HAVE_FFMPEG_UNINSTALLED
|
||||
#include <avformat.h>
|
||||
#else
|
||||
#include <ffmpeg/avformat.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
@ -175,8 +175,8 @@ gst_ffmpegdata_write (URLContext * h, unsigned char *buf, int size)
|
|||
return size;
|
||||
}
|
||||
|
||||
static offset_t
|
||||
gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence)
|
||||
static int64_t
|
||||
gst_ffmpegdata_seek (URLContext * h, int64_t pos, int whence)
|
||||
{
|
||||
GstProtocolInfo *info;
|
||||
guint64 newpos;
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
#include <avcodec.h>
|
||||
#include <postprocess.h>
|
||||
#else
|
||||
#include <ffmpeg/avcodec.h>
|
||||
#include <postproc/postprocess.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libpostproc/postprocess.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
FFMPEG_REVISION=15004
|
||||
FFMPEG_REVISION=15750
|
||||
FFMPEG_CO_DIR=gst-libs/ext/ffmpeg
|
||||
FFMPEG_SVN=svn://svn.mplayerhq.hu/ffmpeg/trunk
|
||||
# Because ffmpeg checks out libswscale via an svn:externals, checking
|
||||
# out an old ffmpeg does not check out a corresponding libswscale.
|
||||
# Keep the swscale checkout manually synchronized, then. Update this
|
||||
# when you update FFMPEG_REVISION.
|
||||
FFMPEG_EXTERNALS_UPDATE="cd $FFMPEG_CO_DIR/libswscale && svn up -r '{2008-08-28 00:07:21 +0200}'"
|
||||
FFMPEG_EXTERNALS_UPDATE="cd $FFMPEG_CO_DIR/libswscale && svn up -r '{2008-10-30 12:29:00 +0100}'"
|
||||
|
|
Loading…
Reference in a new issue