diff --git a/AudioFilter/FilterAudioSubscriber.cpp b/AudioFilter/FilterAudioSubscriber.cpp index 02c2555b1ede52b6ce19d323d80129dab0ccbaa0..a1e41c32e3c41c388d5f5279a329c4ff3cbb9f8c 100644 --- a/AudioFilter/FilterAudioSubscriber.cpp +++ b/AudioFilter/FilterAudioSubscriber.cpp @@ -111,7 +111,7 @@ FilterAudioSubscriber::getIRAVFrameInfos() return rAudioFormat; } rAudioFormat = AudioFormat(pFormatCtx_->streams[audioStream_]->codecpar->sample_rate, - pFormatCtx_->streams[audioStream_]->codecpar->channels, + pFormatCtx_->streams[audioStream_]->codecpar->ch_layout.nb_channels, static_cast<AVSampleFormat>( pFormatCtx_->streams[audioStream_]->codecpar->format)); @@ -183,7 +183,7 @@ FilterAudioSubscriber::update(Observable<AVFrame*>*, AVFrame* const& pluginFrame if (firstRun) { setFilterDescription(pluginFrame->sample_rate, pluginFrame->nb_samples); AudioFormat afmt_ = AudioFormat(pluginFrame->sample_rate, - pluginFrame->channels, + pluginFrame->ch_layout.nb_channels, static_cast<AVSampleFormat>(pluginFrame->format)); AudioFormat irfmt_ = getIRAVFrameInfos(); MediaStream ms_ = MediaStream("input", afmt_); @@ -198,7 +198,7 @@ FilterAudioSubscriber::update(Observable<AVFrame*>*, AVFrame* const& pluginFrame if (reverbFilter_.feedInput(pluginFrame, "input") == 0) { AVFrame* filteredFrame = reverbFilter_.readOutput(); - if (filteredFrame) { + if (filteredFrame && filteredFrame->nb_samples == pluginFrame->nb_samples) { moveFrom(pluginFrame, filteredFrame); av_frame_unref(filteredFrame); av_frame_free(&filteredFrame); diff --git a/AudioFilter/build.sh b/AudioFilter/build.sh index e620f66659fb78146c20c8e5b712805a0c2c664a..2fb19086c4f93bdc79a9ee3e86f63892b57f3181 100755 --- a/AudioFilter/build.sh +++ b/AudioFilter/build.sh @@ -78,7 +78,7 @@ then if [ ${DEBUG} ]; then OUTPUT="${PLUGIN_NAME}" CLANG_OPTS="-g -fsanitize=address" - EXTRA_DEBUG_LIBRARIES="-lyaml-cpp -lvdpau -lX11 -lva-drm -lva-x11 -lmp3lame" + EXTRA_DEBUG_LIBRARIES="-lyaml-cpp -lvdpau -lX11 -lva-drm -lva-x11 -lmp3lame -llzma" EXTRA_DEFINES="-D__DEBUG__" else python3 ./../SDK/jplManipulation.py --preassemble --plugin=${PLUGIN_NAME} diff --git a/AudioFilter/ffmpeg/package.json b/AudioFilter/ffmpeg/package.json index ef1d7546dfabe2df6d2bd4ce17c634fc04e71d93..e7071bb0cea1aa6b940aeab262cf9cf9c32b9de0 100644 --- a/AudioFilter/ffmpeg/package.json +++ b/AudioFilter/ffmpeg/package.json @@ -1,6 +1,6 @@ { "name": "ffmpeg", - "version": "n5.0", + "version": "n6.0", "url": "https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/__VERSION__.tar.gz", "deps": [ "mp3lame", @@ -17,13 +17,12 @@ "libopusdec-enable-FEC.patch", "windows-configure.patch", "windows-configure-ffnvcodec.patch", - "windows-configure-libmfx.patch", "windows-configure-mp3lame.patch" ], "win_patches": [ ], "project_paths": [], - "with_env" : "10.0.16299.0", + "with_env" : "", "custom_scripts": { "pre_build": [], "build": [ diff --git a/AudioFilter/ffmpeg/rules.mak b/AudioFilter/ffmpeg/rules.mak index eda60ece000aa8cd97604cd56b25835e6f4e2270..4a6a4589c17d011c9a236115817c5b3e873e7e40 100644 --- a/AudioFilter/ffmpeg/rules.mak +++ b/AudioFilter/ffmpeg/rules.mak @@ -1,4 +1,4 @@ -FFMPEG_HASH := n5.0 +FFMPEG_HASH := n6.0 FFMPEG_URL := https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/$(FFMPEG_HASH).tar.gz PKGS+=ffmpeg @@ -157,21 +157,6 @@ FFMPEGCONF += \ --enable-decoder=pcm_u16be \ --enable-decoder=pcm_u16le -#encoders/decoders for images -FFMPEGCONF += \ - --enable-encoder=gif \ - --enable-decoder=gif \ - --enable-encoder=jpegls \ - --enable-decoder=jpegls \ - --enable-encoder=ljpeg \ - --enable-decoder=jpeg2000 \ - --enable-encoder=png \ - --enable-decoder=png \ - --enable-encoder=bmp \ - --enable-decoder=bmp \ - --enable-encoder=tiff \ - --enable-decoder=tiff - #filters FFMPEGCONF += \ --enable-filter=aresample \ @@ -343,7 +328,7 @@ $(TARBALLS)/ffmpeg-$(FFMPEG_HASH).tar.gz: ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.gz rm -Rf $@ $@-$(FFMPEG_HASH) mkdir -p $@-$(FFMPEG_HASH) - (cd $@-$(FFMPEG_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f ../$<) + (cd $@-$(FFMPEG_HASH) && tar x $(if ${BATCH_MODE},,-v) --strip-components=1 -f $<) $(APPLY) $(SRC)/ffmpeg/remove-mjpeg-log.patch $(APPLY) $(SRC)/ffmpeg/change-RTCP-ratio.patch $(APPLY) $(SRC)/ffmpeg/rtp_ext_abs_send_time.patch diff --git a/AudioFilter/ffmpeg/windows-configure-make.sh b/AudioFilter/ffmpeg/windows-configure-make.sh index cf4fa01c743db82811b11beefd10b4c81499b1e5..af3a329102b27e7013d6d1eba579465750e777c7 100644 --- a/AudioFilter/ffmpeg/windows-configure-make.sh +++ b/AudioFilter/ffmpeg/windows-configure-make.sh @@ -14,7 +14,8 @@ FFMPEGCONF+=' --disable-d3d11va --disable-dxva2 --disable-postproc - --disable-filters' + --disable-filters + --disable-zlib' FFMPEGCONF+=' --enable-cross-compile @@ -121,16 +122,8 @@ FFMPEGCONF+=' #filters FFMPEGCONF+=' - --enable-filter=scale - --enable-filter=overlay - --enable-filter=amix - --enable-filter=amerge --enable-filter=aresample - --enable-filter=format --enable-filter=aformat - --enable-filter=fps - --enable-filter=transpose - --enable-filter=pad --enable-filter=afir' if [ "$1" == "uwp" ]; then diff --git a/GreenScreen/build.sh b/GreenScreen/build.sh index 8df21c8c3336dfc45de7a649beca7b8c8cebcd15..ec593f97c3f2a2aa90872a91916637521243c91c 100755 --- a/GreenScreen/build.sh +++ b/GreenScreen/build.sh @@ -136,8 +136,6 @@ then -l:libavformat.a \ -l:libavcodec.a \ -l:libavutil.a \ - -l:libvpx.a \ - -l:libx264.a \ -lopencv_imgproc \ -lopencv_core \ -lvpx \ diff --git a/GreenScreen/ffmpeg/package.json b/GreenScreen/ffmpeg/package.json index 5740af35ba8c36253273690505898bb165f0fcdc..b28235510551ba79a9884a350d1e63b8323f5620 100644 --- a/GreenScreen/ffmpeg/package.json +++ b/GreenScreen/ffmpeg/package.json @@ -1,6 +1,6 @@ { "name": "ffmpeg", - "version": "n5.0", + "version": "n6.0", "url": "https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/__VERSION__.tar.gz", "deps": [ "zlib", @@ -16,13 +16,12 @@ "libopusenc-reload-packet-loss-at-encode.patch", "libopusdec-enable-FEC.patch", "windows-configure.patch", - "windows-configure-ffnvcodec.patch", - "windows-configure-libmfx.patch" + "windows-configure-ffnvcodec.patch" ], "win_patches": [ ], "project_paths": [], - "with_env" : "10.0.16299.0", + "with_env" : "", "custom_scripts": { "pre_build": [], "build": [ diff --git a/GreenScreen/ffmpeg/rules.mak b/GreenScreen/ffmpeg/rules.mak index 86b58a80952106f0a278e330d9b9bfda6b5bc659..45e02050f49ca6c26ed499144759d6ecb6b6467e 100644 --- a/GreenScreen/ffmpeg/rules.mak +++ b/GreenScreen/ffmpeg/rules.mak @@ -1,4 +1,4 @@ -FFMPEG_HASH := n5.0 +FFMPEG_HASH := n6.0 FFMPEG_URL := https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/$(FFMPEG_HASH).tar.gz PKGS+=ffmpeg diff --git a/WaterMark/build.sh b/WaterMark/build.sh index 7df63f2b9928ee300a0ff0e7fbbb9b2647ad7336..4ad07d95702e94f1bdf0b2682a3735698e02eaa3 100755 --- a/WaterMark/build.sh +++ b/WaterMark/build.sh @@ -110,8 +110,6 @@ then -l:libavformat.a \ -l:libavcodec.a \ -l:libavutil.a \ - -l:libvpx.a \ - -l:libx264.a \ -lfreetype \ -lvpx \ -lx264 \ diff --git a/WaterMark/ffmpeg/package.json b/WaterMark/ffmpeg/package.json index 112a56eed6e317128e1613235baf3438b0d6a548..646ef8184b92b8e520d974b351f625b0685b2579 100644 --- a/WaterMark/ffmpeg/package.json +++ b/WaterMark/ffmpeg/package.json @@ -1,6 +1,6 @@ { "name": "ffmpeg", - "version": "n5.0", + "version": "n6.0", "url": "https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/__VERSION__.tar.gz", "deps": [ "zlib", @@ -17,13 +17,12 @@ "libopusenc-reload-packet-loss-at-encode.patch", "libopusdec-enable-FEC.patch", "windows-configure.patch", - "windows-configure-ffnvcodec.patch", - "windows-configure-libmfx.patch" + "windows-configure-ffnvcodec.patch" ], "win_patches": [ ], "project_paths": [], - "with_env" : "10.0.16299.0", + "with_env" : "", "custom_scripts": { "pre_build": [], "build": [ diff --git a/WaterMark/ffmpeg/rules.mak b/WaterMark/ffmpeg/rules.mak index 52da737f8d7cd0baea657236f9f23d34c6a7e015..dd3bc45f6a7b743958920149e0f5c82867e2fbd7 100644 --- a/WaterMark/ffmpeg/rules.mak +++ b/WaterMark/ffmpeg/rules.mak @@ -1,4 +1,4 @@ -FFMPEG_HASH := n5.0 +FFMPEG_HASH := n6.0 FFMPEG_URL := https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/$(FFMPEG_HASH).tar.gz PKGS+=ffmpeg diff --git a/WaterMark/testPreferences.yml b/WaterMark/testPreferences.yml index 6e9e89a9ed5a4f2c1a520f1c2574b90373d9a800..ee335801716e8e8d05b9da36133214e55b5e93c7 100644 --- a/WaterMark/testPreferences.yml +++ b/WaterMark/testPreferences.yml @@ -6,7 +6,7 @@ logosize: "0.25" markbackground: "black@0.0" showinfos: "1" showlogo: "1" -mark: "jamiwhite.png" +mark: "sample.gif" date: "1" dateformat: "%x" time: "1" diff --git a/build-plugin.py b/build-plugin.py index 36a70efe38cc7f3caf205c9ee1b116162d2d614a..f85cf3337f2f6a4b33970bb51865654d593017b5 100755 --- a/build-plugin.py +++ b/build-plugin.py @@ -38,11 +38,6 @@ ANDROID_DISTRIBUTION_NAME = "android" WIN32_DISTRIBUTION_NAME = "win32" UBUNTU_DISTRIBUTION_NAME = "ubuntu" -# vs vars -win_sdk_default = '10.0.16299.0' -win_toolset_default = 'v142' - - def parse(): parser = argparse.ArgumentParser(description='Builds Plugins projects') parser.add_argument('--projects', type=str, @@ -55,11 +50,6 @@ def parse(): dist = choose_distribution() - if dist == WIN32_DISTRIBUTION_NAME: - parser.add_argument('--toolset', default=win_toolset_default, type=str, - help='Windows use only, specify Visual Studio toolset version') - parser.add_argument('--sdk', default=win_sdk_default, type=str, - help='Windows use only, specify Windows SDK version') args = parser.parse_args() args.projects = args.projects.split(',') @@ -75,9 +65,6 @@ def parse(): validate_args(args) - if dist != WIN32_DISTRIBUTION_NAME: - args.toolset = '' - args.sdk = '' return args @@ -126,7 +113,7 @@ def choose_distribution(): return 'Unknown' -def buildPlugin(pluginPath, processor, distribution, toolset='', sdk='', buildOptions=''): +def buildPlugin(pluginPath, processor, distribution, buildOptions=''): if distribution == WIN32_DISTRIBUTION_NAME: if (buildOptions): with open(f"{pluginPath}/package.json") as f: @@ -143,8 +130,6 @@ def buildPlugin(pluginPath, processor, distribution, toolset='', sdk='', buildOp sys.executable, os.path.join( os.getcwd(), "../../daemon/compat/msvc/winmake.py"), "-P", - "--toolset", toolset, - "--sdk", sdk, "-fb", pluginPath.split('/')[-1] ], check=True) if (buildOptions): @@ -181,8 +166,6 @@ def main(): currentDir + "/" + plugin, args.processor[i], args.distribution, - args.toolset, - args.sdk, args.buildOptions) diff --git a/contrib/freetype/package.json b/contrib/freetype/package.json index 61dd4b9eab2abafbfd1499f05eba5e0446745f5b..10f2e49f804ec1963742d3309a605d63108796d8 100644 --- a/contrib/freetype/package.json +++ b/contrib/freetype/package.json @@ -6,7 +6,7 @@ "patches": [], "win_patches": [], "project_paths": ["builds/windows/vc2010/freetype.vcxproj"], - "with_env" : "10.0.16299.0", + "with_env" : "", "custom_scripts": { "pre_build": ["copy %cd%\\\\..\\\\..\\\\src\\\\freetype\\\\freetype.vcxproj %cd%\\\\builds\\\\windows\\\\vc2010\\\\freetype.vcxproj /Y"], "build": [], diff --git a/lib/AVFrameIO.h b/lib/AVFrameIO.h index 98b3dd50ea6f5736c62860cec97a1ca8893ee85f..85d17c0dd29b9660c6d6f37e836a6ed1b018c66c 100644 --- a/lib/AVFrameIO.h +++ b/lib/AVFrameIO.h @@ -121,9 +121,8 @@ openEncoder(AVCodecContext*& encCodecCtx, if (mediaType == AVMEDIA_TYPE_AUDIO) { encCodecCtx->sample_rate = decCodecCtx->sample_rate; - encCodecCtx->channel_layout = decCodecCtx->channel_layout; - encCodecCtx->channels = decCodecCtx->channels; - encCodecCtx->channels = av_get_channel_layout_nb_channels(encCodecCtx->channel_layout); + encCodecCtx->ch_layout = decCodecCtx->ch_layout; + encCodecCtx->ch_layout.nb_channels = decCodecCtx->ch_layout.nb_channels; encCodecCtx->sample_fmt = decCodecCtx->sample_fmt; encCodecCtx->time_base = AVRational{1, encCodecCtx->sample_rate}; } else if (mediaType == AVMEDIA_TYPE_VIDEO) { @@ -214,7 +213,8 @@ readAndNotifyAVFrame(const std::string& file, jami::PublishObservable<AVFrame*>* // Read frames from decoder while (avcodec_receive_frame(decCodecCtx, pFrame) == 0) { // Publish frames for the plugin subscriber - pFrame->time_base = decCodecCtx->time_base; + pFrame->time_base.num = decCodecCtx->framerate.den; + pFrame->time_base.den = decCodecCtx->framerate.num; subject->publish(pFrame); // Send frame to encoder diff --git a/lib/frameFilter.cpp b/lib/frameFilter.cpp index dc571d46551f18bd4155ba69d29e76acb1fde8a2..4a06914687894bac105e3af8e159058440c139c6 100644 --- a/lib/frameFilter.cpp +++ b/lib/frameFilter.cpp @@ -187,7 +187,7 @@ FrameFilter::feedInput(AVFrame* frame, const std::string& inputName) if (ms.format != frame->format || (ms.isVideo && (ms.width != frame->width || ms.height != frame->height)) || (!ms.isVideo - && (ms.sampleRate != frame->sample_rate || ms.nbChannels != frame->channels))) { + && (ms.sampleRate != frame->sample_rate || ms.nbChannels != frame->ch_layout.nb_channels))) { ms.update(frame); if ((ret = reinitialize()) < 0) return fail("Failed to reinitialize filter with new input parameters", ret); @@ -283,7 +283,7 @@ FrameFilter::initInputFilter(AVFilterInOut* in, MediaStream msp) buffersrc = avfilter_get_by_name("buffer"); } else { params->sample_rate = msp.sampleRate; - params->channel_layout = av_get_default_channel_layout(msp.nbChannels); + av_channel_layout_default(&(params->ch_layout), msp.nbChannels); buffersrc = avfilter_get_by_name("abuffer"); } diff --git a/lib/mediaStream.h b/lib/mediaStream.h index d50295fb20b2dc875c7303608d452a3e711a2444..d764f53eb70f7f4fbd1e3c09e6fa4ff0caa85a5a 100644 --- a/lib/mediaStream.h +++ b/lib/mediaStream.h @@ -113,7 +113,7 @@ struct MediaStream format = c->sample_fmt; isVideo = false; sampleRate = c->sample_rate; - nbChannels = c->channels; + nbChannels = c->ch_layout.nb_channels; frameSize = c->frame_size; break; default: @@ -141,7 +141,7 @@ struct MediaStream height = f->height; } else { sampleRate = f->sample_rate; - nbChannels = f->channels; + nbChannels = f->ch_layout.nb_channels; timeBase = rational<int>(1, f->sample_rate); if (!frameSize) frameSize = f->nb_samples;