Commit e49c0699 authored by Sebastian Dröge's avatar Sebastian Dröge

Rename everything from gst-ffmpeg to gst-libav

Also change elements factory names to avenc_*, avdec_*,
avmux_* and avdemux_*. The actual filenames, type names,
function/variable names are not touched to make merging
with 0.10 easier at this point. Once 0.10 is not supported
anymore everything should be renamed.
parent 4964bd75
This diff is collapsed.
......@@ -4,7 +4,7 @@ GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj
# The name of the module, e.g. 'glib'.
#DOC_MODULE=gst-plugins-libs-@GST_API_VERSION@
MODULE=gst-ffmpeg
MODULE=gst-libav
DOC_MODULE=$(MODULE)-plugins
# for upload-doc.mak
......
This diff is collapsed.
SUBDIRS = ffmpeg libswscale
if !GST_FFMPEG_ENABLE_LGPL
if !GST_LIBAV_ENABLE_LGPL
SUBDIRS += libpostproc
endif
plugin_LTLIBRARIES = libgstffmpeg.la
plugin_LTLIBRARIES = libgstlibav.la
if HAVE_BZ2
BZ2_LIBS = -lbz2
......@@ -6,7 +6,7 @@ else
BZ2_LIBS =
endif
libgstffmpeg_la_SOURCES = gstffmpeg.c \
libgstlibav_la_SOURCES = gstffmpeg.c \
gstffmpegprotocol.c \
gstffmpegcodecmap.c \
gstffmpegutils.c \
......@@ -21,16 +21,16 @@ libgstffmpeg_la_SOURCES = gstffmpeg.c \
# \
# gstffmpegscale.c
libgstffmpeg_la_CFLAGS = $(FFMPEG_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_PLUGINS_BASE_LIBS) \
libgstlibav_la_CFLAGS = $(LIBAV_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
libgstlibav_la_LIBADD = $(LIBAV_LIBS) $(GST_PLUGINS_BASE_LIBS) \
-lgstaudio-$(GST_API_VERSION) -lgstvideo-$(GST_API_VERSION) \
-lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) \
$(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS)
libgstffmpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
libgstffmpeg_la_LIBTOOLFLAGS = --tag=disable-static
libgstlibav_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS)
libgstlibav_la_LIBTOOLFLAGS = --tag=disable-static
if HAVE_FFMPEG_UNINSTALLED
libgstffmpeg_la_DEPENDENCIES = $(FFMPEG_LIBS)
if HAVE_LIBAV_UNINSTALLED
libgstlibav_la_DEPENDENCIES = $(LIBAV_LIBS)
endif
......
......@@ -27,7 +27,7 @@
#include <stdio.h>
#include <string.h>
#include <gst/gst.h>
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#include <avformat.h>
#else
......@@ -128,7 +128,7 @@ gboolean _shut_up_I_am_probing = FALSE;
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (ffmpeg_debug, "ffmpeg", 0, "FFmpeg elements");
GST_DEBUG_CATEGORY_INIT (ffmpeg_debug, "libav", 0, "libav elements");
#ifndef GST_DISABLE_GST_DEBUG
av_log_set_callback (gst_ffmpeg_log_callback);
......@@ -160,12 +160,12 @@ plugin_init (GstPlugin * plugin)
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
ffmpeg,
"All FFmpeg codecs and formats (" FFMPEG_SOURCE ")",
libav,
"All libav codecs and formats (" LIBAV_SOURCE ")",
plugin_init, PACKAGE_VERSION,
#ifdef GST_FFMPEG_ENABLE_LGPL
#ifdef GST_LIBAV_ENABLE_LGPL
"LGPL",
#else
"GPL",
#endif
"FFmpeg", "http://ffmpeg.org/")
"libav", "http://www.libav.org")
......@@ -24,7 +24,7 @@
#ifndef __GST_FFMPEG_H__
#define __GST_FFMPEG_H__
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#include <avformat.h>
#else
......
......@@ -24,7 +24,7 @@
#include "config.h"
#endif
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#else
#include <libavcodec/avcodec.h>
......@@ -110,7 +110,7 @@ gst_ffmpegaudioresample_base_init (gpointer g_class)
gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_element_class_add_static_pad_template (element_class, &sink_factory);
gst_element_class_set_static_metadata (element_class,
"FFMPEG Audio resampling element", "Filter/Converter/Audio",
"libav Audio resampling element", "Filter/Converter/Audio",
"Converts audio from one samplerate to another",
"Edward Hervey <bilboed@bilboed.com>");
}
......@@ -306,6 +306,6 @@ gst_ffmpegaudioresample_transform (GstBaseTransform * trans, GstBuffer * inbuf,
gboolean
gst_ffmpegaudioresample_register (GstPlugin * plugin)
{
return gst_element_register (plugin, "ffaudioresample",
return gst_element_register (plugin, "avaudioresample",
GST_RANK_NONE, GST_TYPE_FFMPEGAUDIORESAMPLE);
}
......@@ -49,7 +49,7 @@ gst_ffmpeg_pass_get_type (void)
};
ffmpeg_pass_type =
g_enum_register_static ("GstFFMpegEncPass", ffmpeg_passes);
g_enum_register_static ("GstLibAVEncPass", ffmpeg_passes);
}
return ffmpeg_pass_type;
......@@ -71,7 +71,7 @@ gst_ffmpeg_lim_pass_get_type (void)
};
ffmpeg_lim_pass_type =
g_enum_register_static ("GstFFMpegEncLimPass", ffmpeg_lim_passes);
g_enum_register_static ("GstLibAVEncLimPass", ffmpeg_lim_passes);
}
return ffmpeg_lim_pass_type;
......@@ -94,7 +94,7 @@ gst_ffmpeg_mb_decision_get_type (void)
};
ffmpeg_mb_decision_type =
g_enum_register_static ("GstFFMpegEncMBDecision", ffmpeg_mb_decisions);
g_enum_register_static ("GstLibAVEncMBDecision", ffmpeg_mb_decisions);
}
return ffmpeg_mb_decision_type;
......@@ -129,7 +129,7 @@ gst_ffmpeg_mb_cmp_get_type (void)
};
ffmpeg_mb_cmp_type =
g_enum_register_static ("GstFFMpegCMPFunction", ffmpeg_mb_cmps);
g_enum_register_static ("GstLibAVCMPFunction", ffmpeg_mb_cmps);
}
return ffmpeg_mb_cmp_type;
......@@ -154,7 +154,7 @@ gst_ffmpeg_dct_algo_get_type (void)
};
ffmpeg_dct_algo_type =
g_enum_register_static ("GstFFMpegDCTAlgo", ffmpeg_dct_algos);
g_enum_register_static ("GstLibAVDCTAlgo", ffmpeg_dct_algos);
}
return ffmpeg_dct_algo_type;
......@@ -187,7 +187,7 @@ gst_ffmpeg_idct_algo_get_type (void)
};
ffmpeg_idct_algo_type =
g_enum_register_static ("GstFFMpegIDCTAlgo", ffmpeg_idct_algos);
g_enum_register_static ("GstLibAVIDCTAlgo", ffmpeg_idct_algos);
}
return ffmpeg_idct_algo_type;
......@@ -207,7 +207,7 @@ gst_ffmpeg_quant_type_get_type (void)
};
ffmpeg_quant_type_type =
g_enum_register_static ("GstFFMpegEncQuantTypes", ffmpeg_quant_types);
g_enum_register_static ("GstLibAVEncQuantTypes", ffmpeg_quant_types);
}
return ffmpeg_quant_type_type;
......@@ -228,7 +228,7 @@ gst_ffmpeg_pre_me_get_type (void)
};
ffmpeg_pre_me_type =
g_enum_register_static ("GstFFMpegEncPreME", ffmpeg_pre_mes);
g_enum_register_static ("GstLibAVEncPreME", ffmpeg_pre_mes);
}
return ffmpeg_pre_me_type;
......@@ -249,7 +249,7 @@ gst_ffmpeg_pred_method_get_type (void)
};
ffmpeg_pred_method =
g_enum_register_static ("GstFFMpegEncPredMethod", ffmpeg_pred_methods);
g_enum_register_static ("GstLibAVEncPredMethod", ffmpeg_pred_methods);
}
return ffmpeg_pred_method;
......@@ -293,8 +293,7 @@ gst_ffmpeg_flags_get_type (void)
{0, NULL, NULL},
};
ffmpeg_flags_type =
g_flags_register_static ("GstFFMpegFlags", ffmpeg_flags);
ffmpeg_flags_type = g_flags_register_static ("GstLibAVFlags", ffmpeg_flags);
}
return ffmpeg_flags_type;
......
......@@ -23,7 +23,7 @@
#include "config.h"
#endif
#include <gst/gst.h>
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#else
#include <libavcodec/avcodec.h>
......
......@@ -20,7 +20,7 @@
#ifndef __GST_FFMPEG_CODECMAP_H__
#define __GST_FFMPEG_CODECMAP_H__
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#else
#include <libavcodec/avcodec.h>
......
......@@ -24,7 +24,7 @@
#include <assert.h>
#include <string.h>
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#else
#include <libavcodec/avcodec.h>
......@@ -261,7 +261,7 @@ static void gst_ffmpegdec_release_buffer (AVCodecContext * context,
static void gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec);
#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("ffdec-params")
#define GST_FFDEC_PARAMS_QDATA g_quark_from_static_string("avdec-params")
static GstElementClass *parent_class = NULL;
......@@ -280,7 +280,7 @@ gst_ffmpegdec_lowres_get_type (void)
};
ffmpegdec_lowres_type =
g_enum_register_static ("GstFFMpegDecLowres", ffmpegdec_lowres);
g_enum_register_static ("GstLibAVDecLowres", ffmpegdec_lowres);
}
return ffmpegdec_lowres_type;
......@@ -302,7 +302,7 @@ gst_ffmpegdec_skipframe_get_type (void)
};
ffmpegdec_skipframe_type =
g_enum_register_static ("GstFFMpegDecSkipFrame", ffmpegdec_skipframe);
g_enum_register_static ("GstLibAVDecSkipFrame", ffmpegdec_skipframe);
}
return ffmpegdec_skipframe_type;
......@@ -323,10 +323,10 @@ gst_ffmpegdec_base_init (GstFFMpegDecClass * klass)
g_assert (in_plugin != NULL);
/* construct the element details struct */
longname = g_strdup_printf ("FFmpeg %s decoder", in_plugin->long_name);
longname = g_strdup_printf ("libav %s decoder", in_plugin->long_name);
classification = g_strdup_printf ("Codec/Decoder/%s",
(in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
description = g_strdup_printf ("FFmpeg %s decoder", in_plugin->name);
description = g_strdup_printf ("libav %s decoder", in_plugin->name);
gst_element_class_set_metadata (element_class, longname,
classification, description,
"Wim Taymans <wim.taymans@gmail.com>, "
......@@ -714,7 +714,7 @@ gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
could_not_open:
{
gst_ffmpegdec_close (ffmpegdec);
GST_DEBUG_OBJECT (ffmpegdec, "ffdec_%s: Failed to open FFMPEG codec",
GST_DEBUG_OBJECT (ffmpegdec, "avdec_%s: Failed to open FFMPEG codec",
oclass->in_plugin->name);
return FALSE;
}
......@@ -1353,19 +1353,19 @@ gst_ffmpegdec_video_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
/* ERRORS */
unknown_format:
{
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
/* using internal ffmpeg snapshot */
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
("Could not find GStreamer caps mapping for FFmpeg pixfmt %d.",
("Could not find GStreamer caps mapping for libav pixfmt %d.",
ffmpegdec->ctx_pix_fmt), (NULL));
#else
/* using external ffmpeg */
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
("Could not find GStreamer caps mapping for libav codec '%s', and "
"you are using an external libavcodec. This is most likely due to "
"a packaging problem and/or libavcodec having been upgraded to a "
"version that is not compatible with this version of "
"gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
"gstreamer-libav. Make sure your gstreamer-libav and libavcodec "
"packages come from the same source/repository.",
oclass->in_plugin->name), (NULL));
#endif
......@@ -1374,7 +1374,7 @@ unknown_format:
caps_failed:
{
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
("Could not set caps for ffmpeg decoder (%s), not fixed?",
("Could not set caps for libav decoder (%s), not fixed?",
oclass->in_plugin->name));
gst_caps_unref (caps);
......@@ -1461,19 +1461,19 @@ gst_ffmpegdec_audio_negotiate (GstFFMpegDec * ffmpegdec, gboolean force)
/* ERRORS */
no_caps:
{
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
/* using internal ffmpeg snapshot */
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
("Could not find GStreamer caps mapping for FFmpeg codec '%s'.",
("Could not find GStreamer caps mapping for libav codec '%s'.",
oclass->in_plugin->name), (NULL));
#else
/* using external ffmpeg */
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION,
("Could not find GStreamer caps mapping for FFmpeg codec '%s', and "
("Could not find GStreamer caps mapping for libav codec '%s', and "
"you are using an external libavcodec. This is most likely due to "
"a packaging problem and/or libavcodec having been upgraded to a "
"version that is not compatible with this version of "
"gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec "
"gstreamer-libav. Make sure your gstreamer-libav and libavcodec "
"packages come from the same source/repository.",
oclass->in_plugin->name), (NULL));
#endif
......@@ -1482,7 +1482,7 @@ no_caps:
caps_failed:
{
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
("Could not set caps for ffmpeg decoder (%s), not fixed?",
("Could not set caps for libav decoder (%s), not fixed?",
oclass->in_plugin->name));
gst_caps_unref (caps);
......@@ -2361,7 +2361,7 @@ gst_ffmpegdec_audio_frame (GstFFMpegDec * ffmpegdec,
if (len == -1 && (in_plugin->id == CODEC_ID_AAC
|| in_plugin->id == CODEC_ID_AAC_LATM)) {
GST_ELEMENT_ERROR (ffmpegdec, STREAM, DECODE, (NULL),
("Decoding of AAC stream by FFMPEG failed."));
("Decoding of AAC stream by libav failed."));
*ret = GST_FLOW_ERROR;
}
......@@ -2444,7 +2444,7 @@ gst_ffmpegdec_frame (GstFFMpegDec * ffmpegdec,
if (len < 0 || have_data < 0) {
GST_WARNING_OBJECT (ffmpegdec,
"ffdec_%s: decoding error (len: %d, have_data: %d)",
"avdec_%s: decoding error (len: %d, have_data: %d)",
oclass->in_plugin->name, len, have_data);
*got_data = 0;
goto beach;
......@@ -2504,7 +2504,7 @@ gst_ffmpegdec_drain (GstFFMpegDec * ffmpegdec)
gint have_data, len, try = 0;
GST_LOG_OBJECT (ffmpegdec,
"codec has delay capabilities, calling until ffmpeg has drained everything");
"codec has delay capabilities, calling until libav has drained everything");
do {
GstFlowReturn ret;
......@@ -3021,7 +3021,7 @@ not_negotiated:
{
oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
GST_ELEMENT_ERROR (ffmpegdec, CORE, NEGOTIATION, (NULL),
("ffdec_%s: input format was not set before data start",
("avdec_%s: input format was not set before data start",
oclass->in_plugin->name));
gst_buffer_unref (inbuf);
return GST_FLOW_NOT_NEGOTIATED;
......@@ -3177,14 +3177,14 @@ gst_ffmpegdec_register (GstPlugin * plugin)
* outside of ffmpeg. */
if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
GST_DEBUG
("Ignoring VDPAU decoder %s. We can't handle this outside of ffmpeg",
("Ignoring VDPAU decoder %s. We can't handle this outside of libav",
in_plugin->name);
goto next;
}
if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
GST_DEBUG
("Ignoring XVMC decoder %s. We can't handle this outside of ffmpeg",
("Ignoring XVMC decoder %s. We can't handle this outside of libav",
in_plugin->name);
goto next;
}
......@@ -3217,7 +3217,7 @@ gst_ffmpegdec_register (GstPlugin * plugin)
/* construct the type */
plugin_name = g_strdup ((gchar *) in_plugin->name);
g_strdelimit (plugin_name, NULL, '_');
type_name = g_strdup_printf ("ffdec_%s", plugin_name);
type_name = g_strdup_printf ("avdec_%s", plugin_name);
g_free (plugin_name);
type = g_type_from_name (type_name);
......
......@@ -24,7 +24,7 @@
# include "config.h"
#endif
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
# include <avcodec.h>
#else
# include <libavcodec/avcodec.h>
......@@ -73,7 +73,7 @@ gst_ffmpegdeinterlace_modes_get_type (void)
if (!deinterlace_modes_type) {
deinterlace_modes_type =
g_enum_register_static ("GstFFMpegDeinterlaceModes", modes_types);
g_enum_register_static ("GstLibAVDeinterlaceModes", modes_types);
}
return deinterlace_modes_type;
}
......@@ -169,7 +169,7 @@ gst_ffmpegdeinterlace_class_init (GstFFMpegDeinterlaceClass * klass)
gst_static_pad_template_get (&sink_factory));
gst_element_class_set_static_metadata (element_class,
"FFMPEG Deinterlace element", "Filter/Effect/Video/Deinterlace",
"libav Deinterlace element", "Filter/Effect/Video/Deinterlace",
"Deinterlace video", "Luca Ognibene <luogni@tin.it>");
}
......@@ -335,7 +335,7 @@ gst_ffmpegdeinterlace_chain (GstPad * pad, GstObject * parent,
gboolean
gst_ffmpegdeinterlace_register (GstPlugin * plugin)
{
return gst_element_register (plugin, "ffdeinterlace",
return gst_element_register (plugin, "avdeinterlace",
GST_RANK_NONE, GST_TYPE_FFMPEGDEINTERLACE);
}
......
......@@ -24,7 +24,7 @@
#endif
#include <string.h>
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avformat.h>
#ifdef HAVE_AVI_H
#include <avi.h>
......@@ -142,7 +142,7 @@ gst_ffmpegdemux_send_event (GstElement * element, GstEvent * event);
static GstStateChangeReturn
gst_ffmpegdemux_change_state (GstElement * element, GstStateChange transition);
#define GST_FFDEMUX_PARAMS_QDATA g_quark_from_static_string("ffdemux-params")
#define GST_FFDEMUX_PARAMS_QDATA g_quark_from_static_string("avdemux-params")
static GstElementClass *parent_class = NULL;
......@@ -200,8 +200,8 @@ gst_ffmpegdemux_base_init (GstFFMpegDemuxClass * klass)
}
/* construct the element details struct */
longname = g_strdup_printf ("FFmpeg %s demuxer", in_plugin->long_name);
description = g_strdup_printf ("FFmpeg %s demuxer", in_plugin->long_name);
longname = g_strdup_printf ("libav %s demuxer", in_plugin->long_name);
description = g_strdup_printf ("libav %s demuxer", in_plugin->long_name);
gst_element_class_set_metadata (element_class, longname,
"Codec/Demuxer", description,
"Wim Taymans <wim@fluendo.com>, "
......@@ -1290,7 +1290,7 @@ gst_ffmpegdemux_type_find (GstTypeFind * tf, gpointer priv)
sinkcaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
GST_LOG ("ffmpeg typefinder '%s' suggests %" GST_PTR_FORMAT ", p=%u%%",
GST_LOG ("libav typefinder '%s' suggests %" GST_PTR_FORMAT ", p=%u%%",
in_plugin->name, sinkcaps, res);
gst_type_find_suggest (tf, res, sinkcaps);
......@@ -1873,7 +1873,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
gint rank;
gboolean register_typefind_func = TRUE;
GST_LOG ("Attempting to handle ffmpeg demuxer plugin %s [%s]",
GST_LOG ("Attempting to handle libav demuxer plugin %s [%s]",
in_plugin->name, in_plugin->long_name);
/* no emulators */
......@@ -1994,7 +1994,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
}
/* construct the type */
type_name = g_strdup_printf ("ffdemux_%s", name);
type_name = g_strdup_printf ("avdemux_%s", name);
/* if it's already registered, drop it */
if (g_type_from_name (type_name)) {
......@@ -2002,7 +2002,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
goto next;
}
typefind_name = g_strdup_printf ("fftype_%s", name);
typefind_name = g_strdup_printf ("avtype_%s", name);
/* create the type now */
type = g_type_register_static (GST_TYPE_ELEMENT, type_name, &typeinfo, 0);
......@@ -2018,7 +2018,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!gst_type_find_register (plugin, typefind_name, rank,
gst_ffmpegdemux_type_find, extensions, NULL, in_plugin,
NULL))) {
g_warning ("Register of type ffdemux_%s failed", name);
g_warning ("Register of type avdemux_%s failed", name);
g_free (type_name);
g_free (typefind_name);
return FALSE;
......
......@@ -28,7 +28,7 @@
#include <glib/gstdio.h>
#include <errno.h>
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avcodec.h>
#else
#include <libavcodec/avcodec.h>
......@@ -85,7 +85,7 @@ gst_ffmpegenc_me_method_get_type (void)
};
if (!ffmpegenc_me_method_type) {
ffmpegenc_me_method_type =
g_enum_register_static ("GstFFMpegEncMeMethod", ffmpegenc_me_methods);
g_enum_register_static ("GstLibAVEncMeMethod", ffmpegenc_me_methods);
}
return ffmpegenc_me_method_type;
}
......@@ -118,7 +118,7 @@ static void gst_ffmpegenc_get_property (GObject * object,
static GstStateChangeReturn gst_ffmpegenc_change_state (GstElement * element,
GstStateChange transition);
#define GST_FFENC_PARAMS_QDATA g_quark_from_static_string("ffenc-params")
#define GST_FFENC_PARAMS_QDATA g_quark_from_static_string("avenc-params")
static GstElementClass *parent_class = NULL;
......@@ -139,10 +139,10 @@ gst_ffmpegenc_base_init (GstFFMpegEncClass * klass)
g_assert (in_plugin != NULL);
/* construct the element details struct */
longname = g_strdup_printf ("FFmpeg %s encoder", in_plugin->long_name);
longname = g_strdup_printf ("libav %s encoder", in_plugin->long_name);
classification = g_strdup_printf ("Codec/Encoder/%s",
(in_plugin->type == AVMEDIA_TYPE_VIDEO) ? "Video" : "Audio");
description = g_strdup_printf ("FFmpeg %s encoder", in_plugin->name);
description = g_strdup_printf ("libav %s encoder", in_plugin->name);
gst_element_class_set_metadata (element_class, longname,
classification, description,
"Wim Taymans <wim.taymans@gmail.com>, "
......@@ -676,7 +676,7 @@ gst_ffmpegenc_setcaps (GstFFMpegEnc * ffmpegenc, GstCaps * caps)
gst_ffmpeg_avcodec_close (ffmpegenc->context);
if (ffmpegenc->context->stats_in)
g_free (ffmpegenc->context->stats_in);
GST_DEBUG_OBJECT (ffmpegenc, "ffenc_%s: Failed to open FFMPEG codec",
GST_DEBUG_OBJECT (ffmpegenc, "avenc_%s: Failed to open libav codec",
oclass->in_plugin->name);
return FALSE;
}
......@@ -689,7 +689,7 @@ gst_ffmpegenc_setcaps (GstFFMpegEnc * ffmpegenc, GstCaps * caps)
if (pix_fmt != ffmpegenc->context->pix_fmt) {
gst_ffmpeg_avcodec_close (ffmpegenc->context);
GST_DEBUG_OBJECT (ffmpegenc,
"ffenc_%s: AV wants different colourspace (%d given, %d wanted)",
"avenc_%s: AV wants different colourspace (%d given, %d wanted)",
oclass->in_plugin->name, pix_fmt, ffmpegenc->context->pix_fmt);
return FALSE;
}
......@@ -697,7 +697,7 @@ gst_ffmpegenc_setcaps (GstFFMpegEnc * ffmpegenc, GstCaps * caps)
* and quite some codecs do not make up their own mind about that
* in any case, _NONE can never work out later on */
if (oclass->in_plugin->type == AVMEDIA_TYPE_VIDEO && pix_fmt == PIX_FMT_NONE) {
GST_DEBUG_OBJECT (ffmpegenc, "ffenc_%s: Failed to determine input format",
GST_DEBUG_OBJECT (ffmpegenc, "avenc_%s: Failed to determine input format",
oclass->in_plugin->name);
return FALSE;
}
......@@ -822,7 +822,7 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
GstFFMpegEncClass *oclass =
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
GST_ERROR_OBJECT (ffmpegenc,
"ffenc_%s: failed to encode buffer", oclass->in_plugin->name);
"avenc_%s: failed to encode buffer", oclass->in_plugin->name);
#endif /* GST_DISABLE_GST_DEBUG */
gst_buffer_unref (inbuf);
return GST_FLOW_OK;
......@@ -1135,7 +1135,7 @@ gst_ffmpegenc_flush_buffers (GstFFMpegEnc * ffmpegenc, gboolean send)
GstFFMpegEncClass *oclass =
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
GST_WARNING_OBJECT (ffmpegenc,
"ffenc_%s: failed to flush buffer", oclass->in_plugin->name);
"avenc_%s: failed to flush buffer", oclass->in_plugin->name);
#endif /* GST_DISABLE_GST_DEBUG */
break;
}
......@@ -1446,7 +1446,7 @@ gst_ffmpegenc_register (GstPlugin * plugin)
}
/* construct the type */
type_name = g_strdup_printf ("ffenc_%s", in_plugin->name);
type_name = g_strdup_printf ("avenc_%s", in_plugin->name);
type = g_type_from_name (type_name);
......
......@@ -22,7 +22,7 @@
#endif
#include <string.h>
#ifdef HAVE_FFMPEG_UNINSTALLED
#ifdef HAVE_LIBAV_UNINSTALLED
#include <avformat.h>
#else
#include <libavformat/avformat.h>
......@@ -132,7 +132,7 @@ static GstCaps *gst_ffmpegmux_get_id_caps (enum CodecID *id_list);
static void gst_ffmpeg_mux_simple_caps_set_int_list (GstCaps * caps,
const gchar * field, guint num, const gint * values);
#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("ffmux-params")
#define GST_FFMUX_PARAMS_QDATA g_quark_from_static_string("avmux-params")
static GstElementClass *parent_class = NULL;
......@@ -216,17 +216,17 @@ gst_ffmpegmux_base_init (gpointer g_class)
is_formatter = gst_ffmpegmux_is_formatter (in_plugin->name);
if (replacement != NULL) {
longname =
g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
g_strdup_printf ("libav %s %s (not recommended, use %s instead)",
in_plugin->long_name, is_formatter ? "formatter" : "muxer",
replacement);
description =
g_strdup_printf ("FFmpeg %s %s (not recommended, use %s instead)",
g_strdup_printf ("libav %s %s (not recommended, use %s instead)",
in_plugin->long_name, is_formatter ? "formatter" : "muxer",
replacement);
} else {
longname = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
longname = g_strdup_printf ("libav %s %s", in_plugin->long_name,
is_formatter ? "formatter" : "muxer");
description = g_strdup_printf ("FFmpeg %s %s", in_plugin->long_name,
description = g_strdup_printf ("libav %s %s", in_plugin->long_name,
is_formatter ? "formatter" : "muxer");
}
gst_element_class_set_metadata (element_class, longname,
......@@ -430,7 +430,7 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
type = AVMEDIA_TYPE_AUDIO;
bitrate = 285 * 1024;
} else {
g_warning ("ffmux: unknown pad template!");
g_warning ("avmux: unknown pad template!");
return NULL;
}
......@@ -458,7 +458,7 @@ gst_ffmpegmux_request_new_pad (GstElement * element,
/* we fill in codec during capsnego */
/* we love debug output (c) (tm) (r) */
GST_DEBUG ("Created %s pad for ffmux_%s element",
GST_DEBUG ("Created %s pad for avmux_%s element",
padname, ((GstFFMpegMuxClass *) klass)->in_plugin->name);
g_free (padname);
......@@ -655,7 +655,7 @@ gst_ffmpegmux_collected (GstCollectPads2 * pads, gpointer user_data)
if (url_fopen (&ffmpegmux->context->pb,
ffmpegmux->context->filename, open_flags) < 0) {
GST_ELEMENT_ERROR (ffmpegmux, LIBRARY, TOO_LAZY, (NULL),
("Failed to open stream context in ffmux"));
("Failed to open stream context in avmux"));
return GST_FLOW_ERROR;
}
......@@ -947,7 +947,7 @@ gst_ffmpegmux_register (GstPlugin * plugin)
* muxer type. */
/* construct the type */
type_name = g_strdup_printf ("ffmux_%s", in_plugin->name);
type_name = g_strdup_printf ("avmux_%s", in_plugin->name);
p = type_name;
......