From 62eb557832ab3018147f28b45111001a86cfa131 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 11 Aug 2024 23:46:44 +1000 Subject: [PATCH] MediaCapture: Warning fix --- src/core/settings.cpp | 2 +- src/util/media_capture.cpp | 21 +++++++++++---------- src/util/media_capture.h | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 5e256e938..8098b36e2 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -86,7 +86,7 @@ float SettingInfo::FloatStepValue() const #if defined(_WIN32) const MediaCaptureBackend Settings::DEFAULT_MEDIA_CAPTURE_BACKEND = MediaCaptureBackend::MediaFoundation; #elif !defined(__ANDROID__) -const MediaCaptureBackend Settings::DEFAULT_MEDIA_CAPTURE_BACKEND = MediaCaptureBackend::FFMPEG; +const MediaCaptureBackend Settings::DEFAULT_MEDIA_CAPTURE_BACKEND = MediaCaptureBackend::FFmpeg; #endif Settings::Settings() diff --git a/src/util/media_capture.cpp b/src/util/media_capture.cpp index 0a92db49a..fa94442f9 100644 --- a/src/util/media_capture.cpp +++ b/src/util/media_capture.cpp @@ -621,9 +621,9 @@ struct MediaFoundationCodec bool require_hardware; }; static constexpr const MediaFoundationCodec s_media_foundation_audio_codecs[] = { - {"aac", "Advanced Audio Coding", MFAudioFormat_AAC}, - {"mp3", "MPEG-2 Audio Layer III", MFAudioFormat_MP3}, - {"pcm", "Uncompressed PCM", MFAudioFormat_PCM}, + {"aac", "Advanced Audio Coding", MFAudioFormat_AAC, false}, + {"mp3", "MPEG-2 Audio Layer III", MFAudioFormat_MP3, false}, + {"pcm", "Uncompressed PCM", MFAudioFormat_PCM, false}, }; static constexpr const MediaFoundationCodec s_media_foundation_video_codecs[] = { {"h264", "H.264 with Software Encoding", MFVideoFormat_H264, false}, @@ -1609,8 +1609,8 @@ MediaCapture::ContainerList MediaCapture::GetContainerList(MediaCaptureBackend b break; #endif #ifndef __ANDROID__ - case MediaCaptureBackend::FFMPEG: - // ret = MediaCaptureFFMPEG::GetContainerList(); + case MediaCaptureBackend::FFmpeg: + // ret = MediaCaptureFFmpeg::GetContainerList(); break; #endif default: @@ -1630,8 +1630,8 @@ MediaCapture::CodecList MediaCapture::GetVideoCodecList(MediaCaptureBackend back break; #endif #ifndef __ANDROID__ - case MediaCaptureBackend::FFMPEG: - // ret = MediaCaptureFFMPEG::GetVideoCodecList(container); + case MediaCaptureBackend::FFmpeg: + // ret = MediaCaptureFFmpeg::GetVideoCodecList(container); break; #endif default: @@ -1651,8 +1651,8 @@ MediaCapture::CodecList MediaCapture::GetAudioCodecList(MediaCaptureBackend back break; #endif #ifndef __ANDROID__ - case MediaCaptureBackend::FFMPEG: - // ret = MediaCaptureFFMPEG::GetAudioCodecList(container); + case MediaCaptureBackend::FFmpeg: + // ret = MediaCaptureFFmpeg::GetAudioCodecList(container); break; #endif default: @@ -1670,7 +1670,8 @@ std::unique_ptr MediaCapture::Create(MediaCaptureBackend backend, return MediaCaptureMF::Create(error); #endif #ifndef __ANDROID__ - case MediaCaptureBackend::FFMPEG: + case MediaCaptureBackend::FFmpeg: + // return MediaCaptureFFmpeg::Create(error); return nullptr; #endif default: diff --git a/src/util/media_capture.h b/src/util/media_capture.h index cd9766994..7a3efe26e 100644 --- a/src/util/media_capture.h +++ b/src/util/media_capture.h @@ -20,7 +20,7 @@ enum class MediaCaptureBackend : u8 MediaFoundation, #endif #ifndef __ANDROID__ - FFMPEG, + FFmpeg, #endif MaxCount, };