summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-21 20:06:22 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-21 20:06:22 +0000
commit63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd (patch)
treec2a7e585f116b18204d49b0a779d2549485518a0 /libavfilter
parentd6e602536c049a952969e95bb8f3897f5d46b914 (diff)
downloadffmpeg-streaming-63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd.zip
ffmpeg-streaming-63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd.tar.gz
Use the new libavcore audio channel API.
This also allows to remove a linking dependency of libavfilter on libavcodec. Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/Makefile2
-rw-r--r--libavfilter/asrc_anullsrc.c10
-rw-r--r--libavfilter/avfilter.h4
-rw-r--r--libavfilter/defaults.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 6eecc33..56c95df 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -1,7 +1,7 @@
include $(SUBDIR)../config.mak
NAME = avfilter
-FFLIBS = avcodec avcore avutil
+FFLIBS = avcore avutil
FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
HEADERS = avfilter.h avfiltergraph.h
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index e1c6480..306e0a3 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -22,7 +22,7 @@
*/
#include "avfilter.h"
-#include "libavcodec/audioconvert.h"
+#include "libavcore/audioconvert.h"
typedef struct {
int64_t channel_layout;
@@ -35,7 +35,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
char channel_layout_str[128] = "";
priv->sample_rate = 44100;
- priv->channel_layout = CH_LAYOUT_STEREO;
+ priv->channel_layout = AV_CH_LAYOUT_STEREO;
if (args)
sscanf(args, "%"PRId64":%s", &priv->sample_rate, channel_layout_str);
@@ -46,7 +46,7 @@ static int init(AVFilterContext *ctx, const char *args, void *opaque)
}
if (*channel_layout_str)
- if (!(priv->channel_layout = avcodec_get_channel_layout(channel_layout_str))
+ if (!(priv->channel_layout = av_get_channel_layout(channel_layout_str))
&& sscanf(channel_layout_str, "%"PRId64, &priv->channel_layout) != 1) {
av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for channel layout\n",
channel_layout_str);
@@ -65,8 +65,8 @@ static int config_props(AVFilterLink *outlink)
outlink->sample_rate = priv->sample_rate;
outlink->channel_layout = priv->channel_layout;
- chans_nb = avcodec_channel_layout_num_channels(priv->channel_layout);
- avcodec_get_channel_layout_string(buf, sizeof(buf), chans_nb, priv->channel_layout);
+ chans_nb = av_get_channel_layout_nb_channels(priv->channel_layout);
+ av_get_channel_layout_string(buf, sizeof(buf), chans_nb, priv->channel_layout);
av_log(outlink->src, AV_LOG_INFO,
"sample_rate:%"PRId64 " channel_layout:%"PRId64 " channel_layout_description:'%s'\n",
priv->sample_rate, priv->channel_layout, buf);
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index f02a66a..d0ba93d 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -26,7 +26,7 @@
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 63
-#define LIBAVFILTER_VERSION_MICRO 0
+#define LIBAVFILTER_VERSION_MICRO 1
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
@@ -579,7 +579,7 @@ struct AVFilterLink {
int w; ///< agreed upon image width
int h; ///< agreed upon image height
/* These two parameters apply only to audio */
- int64_t channel_layout; ///< channel layout of current buffer (see avcodec.h)
+ int64_t channel_layout; ///< channel layout of current buffer (see libavcore/audioconvert.h)
int64_t sample_rate; ///< samples per second
int format; ///< agreed upon media format
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c
index 388d12c..c7b4b47 100644
--- a/libavfilter/defaults.c
+++ b/libavfilter/defaults.c
@@ -19,9 +19,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavcore/audioconvert.h"
#include "libavcore/imgutils.h"
#include "libavcore/samplefmt.h"
-#include "libavcodec/audioconvert.h"
#include "avfilter.h"
/* TODO: buffer pool. see comment for avfilter_default_get_video_buffer() */
@@ -111,7 +111,7 @@ AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int per
samples->free = avfilter_default_free_buffer;
sample_size = av_get_bits_per_sample_fmt(sample_fmt) >>3;
- chans_nb = avcodec_channel_layout_num_channels(channel_layout);
+ chans_nb = av_get_channel_layout_nb_channels(channel_layout);
per_channel_size = size/chans_nb;
ref->audio->samples_nb = per_channel_size/sample_size;
OpenPOWER on IntegriCloud