diff --git a/Library/TeamTalkLib/avstream/AVFVideoInput.cpp b/Library/TeamTalkLib/avstream/AVFVideoInput.cpp index 78c3dfabd..d6492d3c4 100644 --- a/Library/TeamTalkLib/avstream/AVFVideoInput.cpp +++ b/Library/TeamTalkLib/avstream/AVFVideoInput.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2018, BearWare.dk - * + * * Contact Information: * * Bjoern D. Rasmussen @@ -32,7 +32,7 @@ extern "C" { using namespace vidcap; -bool AVFVideoInput::SetupInput(AVInputFormat *iformat, +bool AVFVideoInput::SetupInput(const AVInputFormat *iformat, AVDictionary *options, AVFormatContext*& fmt_ctx, AVCodecContext*& aud_dec_ctx, @@ -42,7 +42,7 @@ bool AVFVideoInput::SetupInput(AVInputFormat *iformat, { auto vidfmt = GetMediaOutput().video; - + iformat = av_find_input_format(m_dev.api.c_str()); int fps = 1; if (vidfmt.fps_denominator) @@ -67,4 +67,3 @@ bool AVFVideoInput::SetupInput(AVInputFormat *iformat, audio_stream_index, video_stream_index); } - diff --git a/Library/TeamTalkLib/avstream/AVFVideoInput.h b/Library/TeamTalkLib/avstream/AVFVideoInput.h index 97324a321..d461db991 100644 --- a/Library/TeamTalkLib/avstream/AVFVideoInput.h +++ b/Library/TeamTalkLib/avstream/AVFVideoInput.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2018, BearWare.dk - * + * * Contact Information: * * Bjoern D. Rasmussen @@ -32,9 +32,9 @@ namespace vidcap { const media::VideoFormat& fmt) : FFMpegVideoInput(viddevice, fmt) { } - + // FFMpegStreamer override - bool SetupInput(struct AVInputFormat *iformat, + bool SetupInput(const struct AVInputFormat *iformat, struct AVDictionary *options, struct AVFormatContext*& fmt_ctx, struct AVCodecContext*& aud_dec_ctx, diff --git a/Library/TeamTalkLib/avstream/FFMpegCapture.h b/Library/TeamTalkLib/avstream/FFMpegCapture.h index f9c54c095..040e336b4 100644 --- a/Library/TeamTalkLib/avstream/FFMpegCapture.h +++ b/Library/TeamTalkLib/avstream/FFMpegCapture.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2018, BearWare.dk - * + * * Contact Information: * * Bjoern D. Rasmussen @@ -55,7 +55,7 @@ namespace vidcap { const media::VideoFormat& fmt) = 0; ffmpegvideoinput_t m_videoinput; VideoCaptureCallback m_callback; - + public: FFmpegCapture(); virtual ~FFmpegCapture(); @@ -63,7 +63,7 @@ namespace vidcap { // VideoCapture interface bool InitVideoCapture(const ACE_TString& deviceid, const media::VideoFormat& vidfmt); - + bool StartVideoCapture(); void StopVideoCapture(); @@ -72,7 +72,7 @@ namespace vidcap { bool RegisterVideoFormat(VideoCaptureCallback callback, media::FourCC fcc); void UnregisterVideoFormat(media::FourCC fcc); - + // MediaStreamListener interface bool MediaStreamVideoCallback(media::VideoFrame& video_frame, ACE_Message_Block* mb_video); @@ -84,4 +84,3 @@ namespace vidcap { } #endif - diff --git a/Library/TeamTalkLib/avstream/FFMpegStreamer.cpp b/Library/TeamTalkLib/avstream/FFMpegStreamer.cpp index dd5047122..5bbbfca85 100644 --- a/Library/TeamTalkLib/avstream/FFMpegStreamer.cpp +++ b/Library/TeamTalkLib/avstream/FFMpegStreamer.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2018, BearWare.dk - * + * * Contact Information: * * Bjoern D. Rasmussen @@ -35,14 +35,15 @@ // FFMpeg type collides with AVFoundation, so keep in cpp file extern "C" { -#include #include #include -#include #include #include #include +#include +#include #include +#include } #define DEBUG_FFMPEG 0 @@ -60,21 +61,19 @@ void InitAVConv() if (!ready) { -#if defined(_DEBUG) && DEBUG_FFMPEG +#if DEBUG_FFMPEG av_log_set_level(AV_LOG_MAX_OFFSET); #else av_log_set_level(AV_LOG_QUIET); #endif avdevice_register_all(); - av_register_all(); - avfilter_register_all(); ready = true; } } } bool OpenInput(const ACE_TString& filename, - AVInputFormat *iformat, + const AVInputFormat *iformat, AVDictionary *options, AVFormatContext*& fmt_ctx, AVCodecContext*& aud_dec_ctx, @@ -82,14 +81,14 @@ bool OpenInput(const ACE_TString& filename, int& audio_stream_index, int& video_stream_index) { - AVCodec *aud_dec, *vid_dec; + const AVCodec *aud_dec, *vid_dec; if (avformat_open_input(&fmt_ctx, filename.c_str(), iformat, &options) < 0) { MYTRACE(ACE_TEXT("FFMpeg opened %s\n"), filename.c_str()); goto cleanup; } - + if (avformat_find_stream_info(fmt_ctx, NULL) < 0) { MYTRACE(ACE_TEXT("FFMpeg found stream info\n")); @@ -97,27 +96,60 @@ bool OpenInput(const ACE_TString& filename, } /* select the audio stream */ - audio_stream_index = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, + audio_stream_index = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &aud_dec, 0); if (audio_stream_index >= 0) { - aud_dec_ctx = fmt_ctx->streams[audio_stream_index]->codec; - /* init the audio decoder */ - if (avcodec_open2(aud_dec_ctx, aud_dec, NULL) < 0) { + const AVCodecParameters* audparms = fmt_ctx->streams[audio_stream_index]->codecpar; + const AVCodec *audcodec = avcodec_find_decoder(audparms->codec_id); + if (audcodec) + { + aud_dec_ctx = avcodec_alloc_context3(audcodec); + /* transfer audio codec parameters to context */ + if (avcodec_parameters_to_context(aud_dec_ctx, audparms) < 0) + { + MYTRACE(ACE_TEXT("Failed to transfer audio codec properties to decoder context\n")); + audio_stream_index = -1; + } + /* init the audio decoder */ + else if (avcodec_open2(aud_dec_ctx, aud_dec, NULL) < 0) + { + MYTRACE(ACE_TEXT("Failed to open FFmpeg audio decoder\n")); + audio_stream_index = -1; + } + } + else + { audio_stream_index = -1; } } /* select the video stream */ - video_stream_index = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, + video_stream_index = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &vid_dec, 0); if (video_stream_index >= 0) { - vid_dec_ctx = fmt_ctx->streams[video_stream_index]->codec; - - /* init the video decoder */ - if (avcodec_open2(vid_dec_ctx, vid_dec, NULL) < 0) { + const AVCodecParameters* vidparms = fmt_ctx->streams[video_stream_index]->codecpar; + const AVCodec *vidcodec = avcodec_find_decoder(vidparms->codec_id); + if (vidcodec) + { + vid_dec_ctx = avcodec_alloc_context3(vidcodec); + /* transfer video codec parameters to context */ + if (avcodec_parameters_to_context(vid_dec_ctx, vidparms) < 0) + { + MYTRACE(ACE_TEXT("Failed to transfer video codec properties to decoder context\n")); + video_stream_index = -1; + } + /* init the video decoder */ + else if (avcodec_open2(vid_dec_ctx, vid_dec, NULL) < 0) + { + video_stream_index = -1; + } + } + else + { video_stream_index = -1; } + } @@ -152,7 +184,7 @@ AVFilterGraph* createVideoFilterGraph(AVFormatContext *fmt_ctx, AVPixelFormat output_pixfmt); void FillMediaFileProp(AVFormatContext *fmt_ctx, - AVCodecContext *aud_dec_ctx, + AVCodecContext *aud_dec_ctx, AVCodecContext *vid_dec_ctx, MediaFileProp& out_prop) { @@ -196,7 +228,7 @@ bool GetAVMediaFileProp(const ACE_TString& filename, MediaFileProp& out_prop) AVCodecContext *aud_dec_ctx = NULL, *vid_dec_ctx = NULL; int audio_stream_index = -1, video_stream_index = -1; - if(!OpenInput(filename, NULL, NULL, fmt_ctx, aud_dec_ctx, vid_dec_ctx, + if(!OpenInput(filename, NULL, NULL, fmt_ctx, aud_dec_ctx, vid_dec_ctx, audio_stream_index, video_stream_index)) return false; @@ -227,7 +259,7 @@ FFMpegStreamer::~FFMpegStreamer() MYTRACE(ACE_TEXT("~FFMpegStreamer()\n")); } -bool FFMpegStreamer::SetupInput(AVInputFormat *iformat, +bool FFMpegStreamer::SetupInput(const AVInputFormat *iformat, AVDictionary *options, AVFormatContext*& fmt_ctx, AVCodecContext*& aud_dec_ctx, @@ -258,7 +290,7 @@ void FFMpegStreamer::Run() int ret; bool start = false; - if(!SetupInput(in_fmt, options, fmt_ctx, aud_dec_ctx, vid_dec_ctx, + if(!SetupInput(in_fmt, options, fmt_ctx, aud_dec_ctx, vid_dec_ctx, audio_stream_index, video_stream_index)) { MYTRACE("Failed to setup input: %s\n", m_media_in.filename.c_str()); @@ -295,7 +327,7 @@ void FFMpegStreamer::Run() audio_stream_index = -1; //disable audio processing m_media_out.audio = media::AudioFormat(); } - + if (m_media_out.video.fourcc != media::FOURCC_NONE && video_stream_index >= 0) { video_filter_graph = createVideoFilterGraph(fmt_ctx, vid_dec_ctx, @@ -326,7 +358,7 @@ void FFMpegStreamer::Run() m_open.set(true); InitBuffers(); - + //wait for start signal MYTRACE(ACE_TEXT("FFmpeg waiting to start streaming: %s\n"), m_media_in.filename.c_str()); m_run.get(start); @@ -336,7 +368,7 @@ void FFMpegStreamer::Run() MediaStreamStatus status; ACE_UINT32 start_time, start_offset, totalpausetime; int64_t curaudiotime, curvideotime; - + status = MEDIASTREAM_STARTED; start_time = GETTIMESTAMP(); start_offset = MEDIASTREAMER_OFFSET_IGNORE; @@ -345,7 +377,6 @@ void FFMpegStreamer::Run() /* read all packets */ AVPacket packet; - int got_frame; while (!m_stop) { @@ -359,7 +390,7 @@ void FFMpegStreamer::Run() if (start_offset != MEDIASTREAMER_OFFSET_IGNORE) m_media_in.elapsed_ms += start_offset; - + // check if we should pause if (m_pause) { @@ -389,13 +420,13 @@ void FFMpegStreamer::Run() offset_sec /= 1000.0; bool success = true; - + if (audio_stream_index >= 0) { auto aud_stream = fmt_ctx->streams[audio_stream_index]; double curaudio_sec = curaudiotime / 1000.0; double difftime_sec = (offset_sec > curaudio_sec)? offset_sec - curaudio_sec : curaudio_sec - offset_sec; - + if (av_seek_frame(fmt_ctx, audio_stream_index, difftime_sec / av_q2d(aud_stream->time_base), (offset_sec > curaudio_sec? 0 : AVSEEK_FLAG_BACKWARD)) < 0) { @@ -413,7 +444,7 @@ void FFMpegStreamer::Run() auto vid_stream = fmt_ctx->streams[video_stream_index]; double curvideo_sec = curvideotime / 1000.0; double difftime_sec = (offset_sec > curvideo_sec)? offset_sec - curvideo_sec : curvideo_sec - offset_sec; - + if (av_seek_frame(fmt_ctx, video_stream_index, difftime_sec / av_q2d(vid_stream->time_base), (offset_sec > curvideo_sec? 0 : AVSEEK_FLAG_BACKWARD)) < 0) { @@ -433,13 +464,13 @@ void FFMpegStreamer::Run() start_time = GETTIMESTAMP(); totalpausetime = 0; start_offset = MEDIASTREAMER_OFFSET_IGNORE; - + ClearBuffers(); status = MEDIASTREAM_STARTED; } } - + if (status != MEDIASTREAM_NONE) { if (m_statuscallback) @@ -447,21 +478,21 @@ void FFMpegStreamer::Run() status = MEDIASTREAM_NONE; } - + if (av_read_frame(fmt_ctx, &packet) < 0) break; if (packet.stream_index == audio_stream_index) { - got_frame = 0; - ret = avcodec_decode_audio4(aud_dec_ctx, aud_frame, &got_frame, &packet); + ret = avcodec_send_packet(aud_dec_ctx, &packet); if (ret < 0) { MYTRACE(ACE_TEXT("Error decoding audio\n")); continue; } - if (got_frame) + ret = avcodec_receive_frame(aud_dec_ctx, aud_frame); + if (ret == 0) { // cout << "Audio frame " << n_audframe++ << " at time " << (tm * av_q2d(aud_time_base)) << endl; @@ -478,18 +509,27 @@ void FFMpegStreamer::Run() { goto fail; } - } // got_frame + } + else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) + { + MYTRACE(ACE_TEXT("Cannot decode audio frame\n")); + } + else + { + MYTRACE(ACE_TEXT("Error decoding audio stream.\n")); + // should we just exit? + } } else if(packet.stream_index == video_stream_index) { - got_frame = 0; - ret = avcodec_decode_video2(vid_dec_ctx, vid_frame, &got_frame, &packet); + ret = avcodec_send_packet(vid_dec_ctx, &packet); if (ret < 0) { MYTRACE(ACE_TEXT("Error decoding video\n")); break; } - if (got_frame) + ret = avcodec_receive_frame(vid_dec_ctx, vid_frame); + if (ret == 0) { // vid_frame->pts = av_frame_get_best_effort_timestamp(vid_frame); @@ -500,15 +540,24 @@ void FFMpegStreamer::Run() break; } - curvideotime = ProcessVideoBuffer(vid_buffersink_ctx, filt_frame, + curvideotime = ProcessVideoBuffer(vid_buffersink_ctx, filt_frame, fmt_ctx->streams[video_stream_index], start_time, start_offset); if (curvideotime < 0) { goto fail; } - - } // got_frame + + } + else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) + { + MYTRACE(ACE_TEXT("Cannot decode video frame\n")); + } + else + { + MYTRACE(ACE_TEXT("Error decoding video stream.\n")); + // should we just exit? + } } // stream index av_packet_unref(&packet); @@ -570,11 +619,11 @@ int64_t FFMpegStreamer::ProcessAudioBuffer(AVFilterContext* aud_buffersink_ctx, int ret = av_buffersink_get_frame(aud_buffersink_ctx, filt_frame); if(ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) return 0; - + if(ret < 0) return -1; - int64_t frame_tm = av_frame_get_best_effort_timestamp(filt_frame); + int64_t frame_tm = filt_frame->best_effort_timestamp; double frame_sec = frame_tm * av_q2d(aud_stream->time_base); // initial frame may be -0.000072 MYTRACE_COND(frame_sec < 0., ACE_TEXT("Audio frame time is less than 0: %g\n"), frame_sec); @@ -600,7 +649,7 @@ int64_t FFMpegStreamer::ProcessAudioBuffer(AVFilterContext* aud_buffersink_ctx, assert(m_media_out.audio.channels == n_channels); media_frame.inputfmt = m_media_out.audio; QueueAudio(media_frame); - + av_frame_unref(filt_frame); return frame_timestamp; @@ -622,7 +671,7 @@ int64_t FFMpegStreamer::ProcessVideoBuffer(AVFilterContext* vid_buffersink_ctx, if (ret < 0) return -1; - int64_t frame_tm = av_frame_get_best_effort_timestamp(filt_frame); + int64_t frame_tm = filt_frame->best_effort_timestamp; double frame_sec = frame_tm * av_q2d(vid_stream->time_base); MYTRACE_COND(frame_sec < 0., ACE_TEXT("Video frame time is less than 0: %g\n"), frame_sec); frame_sec = std::max(0., frame_sec); @@ -673,7 +722,7 @@ int64_t FFMpegStreamer::ProcessVideoBuffer(AVFilterContext* vid_buffersink_ctx, assert(filt_frame->width == m_media_in.video.width); assert(filt_frame->height == m_media_in.video.height); - + QueueVideo(media_frame); av_frame_unref(filt_frame); @@ -699,13 +748,14 @@ AVFilterGraph* createAudioFilterGraph(AVFormatContext *fmt_ctx, AVFilterInOut *outputs = avfilter_inout_alloc(); //TODO: Free?? AVFilterInOut *inputs = avfilter_inout_alloc(); //TODO: Free?? const enum AVSampleFormat out_sample_fmts[] = { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE }; - int64_t out_channel_layouts[] = { (out_channels==1?AV_CH_LAYOUT_MONO:AV_CH_LAYOUT_STEREO), -1 }; + int64_t out_channel_layouts[] = { -1, -1 }; int out_sample_rates[] = { out_samplerate, -1 }; const AVFilterLink *outlink; - AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base; char args[512]; char filter_descr[100]; int ret; + AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base; + out_channel_layouts[0] = (out_channels == 1 ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO); filter_graph = avfilter_graph_alloc(); @@ -797,7 +847,7 @@ AVFilterGraph* createAudioFilterGraph(AVFormatContext *fmt_ctx, // avfilter_inout_free(&inputs); // avfilter_inout_free(&outputs); - return filter_graph; + return filter_graph; } @@ -886,4 +936,3 @@ AVFilterGraph* createVideoFilterGraph(AVFormatContext *fmt_ctx, return filter_graph; } - diff --git a/Library/TeamTalkLib/avstream/FFMpegStreamer.h b/Library/TeamTalkLib/avstream/FFMpegStreamer.h index 8c58781f4..c5ab82614 100644 --- a/Library/TeamTalkLib/avstream/FFMpegStreamer.h +++ b/Library/TeamTalkLib/avstream/FFMpegStreamer.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2018, BearWare.dk - * + * * Contact Information: * * Bjoern D. Rasmussen @@ -43,11 +43,11 @@ class FFMpegStreamer : public MediaFileStreamer public: FFMpegStreamer(const ACE_TString& filename, const MediaStreamOutput& out_prop); virtual ~FFMpegStreamer(); - + virtual bool IsSystemTime() const { return false; } protected: - virtual bool SetupInput(struct AVInputFormat *iformat, + virtual bool SetupInput(const struct AVInputFormat *iformat, struct AVDictionary *options, struct AVFormatContext*& fmt_ctx, struct AVCodecContext*& aud_dec_ctx, @@ -71,7 +71,7 @@ class FFMpegStreamer : public MediaFileStreamer }; bool OpenInput(const ACE_TString& filename, - AVInputFormat *iformat, + const AVInputFormat *iformat, AVDictionary *options, AVFormatContext*& fmt_ctx, AVCodecContext*& aud_dec_ctx, diff --git a/Library/TeamTalkLib/avstream/V4L2Capture.cpp b/Library/TeamTalkLib/avstream/V4L2Capture.cpp index c49fbc6cb..86eab4dd9 100644 --- a/Library/TeamTalkLib/avstream/V4L2Capture.cpp +++ b/Library/TeamTalkLib/avstream/V4L2Capture.cpp @@ -51,7 +51,7 @@ class V4L2Input : public FFMpegVideoInput : FFMpegVideoInput(viddevice, fmt) { } // FFMpegStreamer override - bool SetupInput(AVInputFormat *iformat, + bool SetupInput(const AVInputFormat *iformat, AVDictionary *options, AVFormatContext*& fmt_ctx, AVCodecContext*& aud_dec_ctx, @@ -113,7 +113,7 @@ vidcap_devices_t V4L2Capture::GetDevices() { vidcap_devices_t devs; - AVInputFormat* in_fmt = av_input_video_device_next(NULL), *indev_fmt = NULL; + const AVInputFormat* in_fmt = av_input_video_device_next(NULL), *indev_fmt = NULL; while(in_fmt) { if (av_match_name("v4l2", in_fmt->name)) { indev_fmt = in_fmt; diff --git a/Library/TeamTalkLib/avstream/V4L2Capture.h b/Library/TeamTalkLib/avstream/V4L2Capture.h index fbf4ed626..050b72baa 100644 --- a/Library/TeamTalkLib/avstream/V4L2Capture.h +++ b/Library/TeamTalkLib/avstream/V4L2Capture.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2005-2018, BearWare.dk - * + * * Contact Information: * * Bjoern D. Rasmussen @@ -45,4 +45,3 @@ namespace vidcap { } #endif - diff --git a/Library/TeamTalkLib/build/ffmpeg/CMakeLists.txt b/Library/TeamTalkLib/build/ffmpeg/CMakeLists.txt index ee67434d5..3fe6986f7 100644 --- a/Library/TeamTalkLib/build/ffmpeg/CMakeLists.txt +++ b/Library/TeamTalkLib/build/ffmpeg/CMakeLists.txt @@ -14,7 +14,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ExternalProject_Add(ffmpeg-arm64-src GIT_REPOSITORY https://github.com/FFmpeg/FFmpeg - GIT_TAG n4.3.8 + GIT_TAG n5.0 GIT_SHALLOW TRUE UPDATE_COMMAND "" PREFIX ${TOOLCHAIN_BUILD_PREFIX}/ffmpeg-arm64 @@ -41,9 +41,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") --disable-optimizations --disable-stripping --enable-debug=3 - --extra-cflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\ -arch\ arm64 - --extra-cxxflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\ -arch\ arm64 - --extra-ldexeflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\ -arch\ arm64 + --extra-cflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} + --extra-cxxflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} + --extra-ldexeflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} --pkg-config-flags=--static --enable-cross-compile --target-os=darwin --arch=arm64 BUILD_COMMAND make ${TOOLCHAIN_BUILD_MAKEJOBS} @@ -61,7 +61,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ExternalProject_Add(ffmpeg-intel-src GIT_REPOSITORY https://github.com/FFmpeg/FFmpeg - GIT_TAG n4.3.8 + GIT_TAG n5.0 GIT_SHALLOW TRUE UPDATE_COMMAND "" PREFIX ${TOOLCHAIN_BUILD_PREFIX}/ffmpeg-intel @@ -87,9 +87,9 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") --disable-optimizations --disable-stripping --enable-debug=3 - --extra-cflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\ -arch\ x86_64 - --extra-cxxflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\ -arch\ x86_64 - --extra-ldexeflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}\ -arch\ x86_64 + --extra-cflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} + --extra-cxxflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} + --extra-ldexeflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET} --pkg-config-flags=--static --enable-cross-compile --target-os=darwin --arch=x86_64 BUILD_COMMAND make ${TOOLCHAIN_BUILD_MAKEJOBS} @@ -270,7 +270,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "iOS") ExternalProject_Add(ffmpeg-src GIT_REPOSITORY https://github.com/FFmpeg/FFmpeg - GIT_TAG n4.3.8 + GIT_TAG n5.0 GIT_SHALLOW TRUE UPDATE_COMMAND "" PREFIX ${TOOLCHAIN_BUILD_PREFIX}/ffmpeg @@ -356,7 +356,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (TOOLCHAIN_BUILD_EXTERNALPROJECTS) ExternalProject_Add(ffmpeg-src GIT_REPOSITORY https://github.com/FFmpeg/FFmpeg - GIT_TAG n4.3.8 + GIT_TAG n5.0 GIT_SHALLOW TRUE UPDATE_COMMAND "" PREFIX ${TOOLCHAIN_BUILD_PREFIX}/ffmpeg @@ -513,7 +513,7 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Android") ExternalProject_Add(ffmpeg-src GIT_REPOSITORY https://github.com/FFmpeg/FFmpeg - GIT_TAG n4.3.8 + GIT_TAG n5.0 GIT_SHALLOW TRUE UPDATE_COMMAND "" PREFIX ${TOOLCHAIN_BUILD_PREFIX}/ffmpeg