Skip to content

Commit

Permalink
MediaCapture: Warning fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Aug 11, 2024
1 parent af47eb6 commit 62eb557
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/core/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
21 changes: 11 additions & 10 deletions src/util/media_capture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -1670,7 +1670,8 @@ std::unique_ptr<MediaCapture> 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:
Expand Down
2 changes: 1 addition & 1 deletion src/util/media_capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ enum class MediaCaptureBackend : u8
MediaFoundation,
#endif
#ifndef __ANDROID__
FFMPEG,
FFmpeg,
#endif
MaxCount,
};
Expand Down

0 comments on commit 62eb557

Please sign in to comment.