Michael Niedermayer a écrit :
> On Sat, Jul 10, 2010 at 07:38:01PM +0200, Sebastian Vater wrote:
>
>> --
>>
>> Best regards,
>> :-) Basty/CDGS (-:
>>
>>
>>
>>
>
>
>> allmixers.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 45 insertions(+)
>> 186ff20da896429b516bcdc699e201ca3a57c387 allmixers.c.patch
>> diff --git a/libavsequencer/allmixers.c b/libavsequencer/allmixers.c
>> new file mode 100644
>> index 0000000..a4040cd
>> --- /dev/null
>> +++ b/libavsequencer/allmixers.c
>> @@ -0,0 +1,45 @@
>> +/*
>> + * Provide registration of all mixers for the sequencer
>> + * Copyright (c) 2010 Sebastian Vater <[email protected]>
>> + *
>> + * This file is part of FFmpeg.
>> + *
>> + * FFmpeg is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * FFmpeg 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
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with FFmpeg; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
>> USA
>> + */
>> +
>> +/**
>> + * @file
>> + * Provide registration of all mixers for the sequencer.
>> + */
>> +
>> +#include "libavsequencer/avsequencer.h"
>> +
>> +#define REGISTER_MIXER(X,x) { \
>> + extern AVSequencerMixerContext x##_mixer; \
>> + if(CONFIG_##X##_MIXER) avseq_register(&x##_mixer); }
>> +
>> +void avseq_register_all(void)
>> +{
>> + static int initialized;
>> +
>> + if (initialized)
>> + return;
>> + initialized = 1;
>> +
>> + /* Mixers */
>> + REGISTER_MIXER (NULL, null);
>> + REGISTER_MIXER (LOW_QUALITY, lq);
>> + REGISTER_MIXER (HIGH_QUALITY, hq);
>>
>
> if there is nothing but 2 mixers, a simple
> int mixer_quality
> in an appropriate struct would provide a much simpler interface
>
Hi I have excellent news!
libavsequencer now flawlessly integrates into FFmpeg, just check out my
latest git. Please do a git pull --rebase, Stefano had problems without
using it.
Here are the allmixers.c, configure, common.mak, cmdutils.c, Makefile
and libavsequencer.v part of the BSS to review.
This version compiles perfectly.
--
Best regards,
:-) Basty/CDGS (-:
diff --git a/Makefile b/Makefile
index 9f1aa2f..45e6ee1 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ FFLIBS-$(CONFIG_AVCODEC) += avcodec
FFLIBS-$(CONFIG_POSTPROC) += postproc
FFLIBS-$(CONFIG_SWSCALE) += swscale
FFLIBS-$(CONFIG_AVCORE) += avcore
+FFLIBS-$(CONFIG_AVSEQUENCER) += avsequencer
FFLIBS := avutil
diff --git a/cmdutils.c b/cmdutils.c
index a79c38e..ab9a416 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -39,6 +39,7 @@
#include "libavutil/eval.h"
#include "libavcodec/opt.h"
#include "libavcore/avcore.h"
+#include "libavsequencer/avsequencer.h"
#include "cmdutils.h"
#include "version.h"
#if CONFIG_NETWORK
@@ -340,6 +341,7 @@ static void print_all_libs_info(FILE* outstream, int flags)
PRINT_LIB_INFO(outstream, avcore, AVCORE, flags);
PRINT_LIB_INFO(outstream, avcodec, AVCODEC, flags);
PRINT_LIB_INFO(outstream, avformat, AVFORMAT, flags);
+ PRINT_LIB_INFO(outstream, avsequencer, AVSEQUENCER, flags);
PRINT_LIB_INFO(outstream, avdevice, AVDEVICE, flags);
PRINT_LIB_INFO(outstream, avfilter, AVFILTER, flags);
PRINT_LIB_INFO(outstream, swscale, SWSCALE, flags);
diff --git a/common.mak b/common.mak
index 2c20f13..e317c75 100644
--- a/common.mak
+++ b/common.mak
@@ -31,7 +31,7 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
endif
-ALLFFLIBS = avcodec avcore avdevice avfilter avformat avutil postproc swscale
+ALLFFLIBS = avcodec avcore avdevice avfilter avformat avsequencer avutil postproc swscale
IFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
diff --git a/configure b/configure
index ccad596..18f6478 100755
--- a/configure
+++ b/configure
@@ -90,6 +90,7 @@ Configuration options:
--disable-avformat disable libavformat build
--disable-swscale disable libswscale build
--enable-postproc enable GPLed postprocessing support [no]
+ --disable-avsequencer disable libavsequencer build
--disable-avfilter disable video filter support [no]
--disable-pthreads disable pthreads [auto]
--enable-w32threads use Win32 threads [no]
@@ -146,6 +147,9 @@ Configuration options:
--enable-filter=NAME enable filter NAME
--disable-filter=NAME disable filter NAME
--disable-filters disable all filters
+ --enable-mixer=NAME enable mixer NAME
+ --disable-mixer=NAME disable mixer NAME
+ --disable-mixers disable all mixers
--list-decoders show all available decoders
--list-encoders show all available encoders
--list-hwaccels show all available hardware accelerators
@@ -157,6 +161,7 @@ Configuration options:
--list-indevs show all available input devices
--list-outdevs show all available output devices
--list-filters show all available filters
+ --list-mixers show all available mixers
External library support:
--enable-avisynth enable reading of AVISynth script files [no]
@@ -834,6 +839,7 @@ COMPONENT_LIST="
demuxers
encoders
filters
+ mixers
hwaccels
indevs
muxers
@@ -850,6 +856,7 @@ CONFIG_LIST="
avdevice
avfilter
avformat
+ avsequencer
avisynth
bzlib
dct
@@ -1534,6 +1541,7 @@ enable avcore
enable avdevice
enable avfilter
enable avformat
+enable avsequencer
enable avutil
enable asm
enable debug
@@ -1617,6 +1625,7 @@ OUTDEV_LIST=$(find_things outdev OUTDEV libavdevice/alldevices.c)
INDEV_LIST=$(find_things indev _IN libavdevice/alldevices.c)
PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
FILTER_LIST=$(find_things filter FILTER libavfilter/allfilters.c)
+MIXER_LIST=$(find_things mixer MIXER libavsequencer/allmixers.c)
find_tests(){
map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]')
@@ -2810,7 +2819,7 @@ enabled extra_warnings && check_cflags -Winline
# add some linker flags
check_ldflags -Wl,--warn-common
check_ldflags -Wl,--as-needed
-check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavcore -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
+check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavsequencer -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavcore -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
check_ldflags -Wl,-Bsymbolic
echo "X{};" > $TMPV
@@ -2887,6 +2896,7 @@ check_deps $CONFIG_LIST \
$DEMUXER_LIST \
$MUXER_LIST \
$FILTER_LIST \
+ $MIXER_LIST \
$INDEV_LIST \
$OUTDEV_LIST \
$PROTOCOL_LIST \
@@ -2950,6 +2960,7 @@ echo "static ${static-no}"
echo "shared ${shared-no}"
echo "postprocessing support ${postproc-no}"
echo "new filter support ${avfilter-no}"
+echo "new sequencer support ${avsequencer-no}"
echo "network support ${network-no}"
echo "threading support ${thread_type-no}"
echo "SDL support ${sdl-no}"
@@ -2977,7 +2988,7 @@ echo "zlib enabled ${zlib-no}"
echo "bzlib enabled ${bzlib-no}"
echo
-for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do
+for type in decoder encoder hwaccel parser demuxer muxer protocol filter mixer bsf indev outdev; do
echo "Enabled ${type}s:"
eval list=\$$(toupper $type)_LIST
print_enabled '_*' $list | sort | pr -3 -t
@@ -3009,6 +3020,7 @@ if enabled source_path_used; then
libavdevice
libavfilter
libavformat
+ libavsequencer
libavutil
libavutil/$arch
libpostproc
@@ -3028,6 +3040,7 @@ if enabled source_path_used; then
libavdevice/Makefile
libavfilter/Makefile
libavformat/Makefile
+ libavsequencer/Makefile
libavutil/Makefile
libpostproc/Makefile
libswscale/Makefile
@@ -3127,6 +3140,7 @@ get_version LIBAVCODEC libavcodec/avcodec.h
get_version LIBAVCORE libavcore/avcore.h
get_version LIBAVDEVICE libavdevice/avdevice.h
get_version LIBAVFORMAT libavformat/avformat.h
+get_version LIBAVSEQUENCER libavsequencer/avsequencer.h
get_version LIBAVUTIL libavutil/avutil.h
get_version LIBAVFILTER libavfilter/avfilter.h
@@ -3165,6 +3179,7 @@ print_config CONFIG_ $TMPH config.mak $CONFIG_LIST \
$DEMUXER_LIST \
$MUXER_LIST \
$FILTER_LIST \
+ $MIXER_LIST \
$PROTOCOL_LIST \
$INDEV_LIST \
$OUTDEV_LIST \
@@ -3248,5 +3263,6 @@ pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$ext
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavcore = $LIBAVCORE_VERSION"
+pkgconfig_generate libavsequencer "FFmpeg audio sequencer library" "$LIBAVSEQUENCER_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
diff --git a/libavsequencer/Makefile b/libavsequencer/Makefile
new file mode 100644
index 0000000..5dfb4fb
--- /dev/null
+++ b/libavsequencer/Makefile
@@ -0,0 +1,30 @@
+include $(SUBDIR)../config.mak
+
+NAME = avsequencer
+FFLIBS = avcodec avformat avutil
+
+HEADERS = avsequencer.h \
+ instr.h \
+ module.h \
+ order.h \
+ player.h \
+ sample.h \
+ song.h \
+ synth.h \
+ track.h \
+
+OBJS = allmixers.o \
+ avsequencer.o \
+ instr.o \
+ module.o \
+ order.o \
+ player.o \
+ sample.o \
+ song.o \
+ synth.o \
+ track.o \
+
+OBJS-$(CONFIG_LOW_QUALITY_MIXER) += lq_mixer.o
+OBJS-$(CONFIG_NULL_MIXER) += null_mixer.o
+
+include $(SUBDIR)../subdir.mak
diff --git a/libavsequencer/libavsequencer.v b/libavsequencer/libavsequencer.v
new file mode 100644
index 0000000..0153983
--- /dev/null
+++ b/libavsequencer/libavsequencer.v
@@ -0,0 +1,4 @@
+LIBAVSEQUENCER_$MAJOR {
+ global: avsequencer_*; avseq_*; ff_*;
+ local: *;
+};
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc