MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / onCaptureContainerChanged

Method onCaptureContainerChanged

pcsx2-qt/Settings/GraphicsSettingsWidget.cpp:886–918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884}
885
886void GraphicsSettingsWidget::onCaptureContainerChanged()
887{
888 const std::string container(
889 dialog()->getEffectiveStringValue("EmuCore/GS", "CaptureContainer", Pcsx2Config::GSOptions::DEFAULT_CAPTURE_CONTAINER));
890
891 QObject::disconnect(m_capture.videoCaptureCodec, &QComboBox::currentIndexChanged, nullptr, nullptr);
892 m_capture.videoCaptureCodec->clear();
893 //: This string refers to a default codec, whether it's an audio codec or a video codec.
894 m_capture.videoCaptureCodec->addItem(tr("Default"), QString());
895 for (const auto& [format, name] : GSCapture::GetVideoCodecList(container.c_str()))
896 {
897 const QString qformat(QString::fromStdString(format));
898 const QString qname(QString::fromStdString(name));
899 m_capture.videoCaptureCodec->addItem(QStringLiteral("%1 [%2]").arg(qformat).arg(qname), qformat);
900 }
901
902 SettingWidgetBinder::BindWidgetToStringSetting(
903 dialog()->getSettingsInterface(), m_capture.videoCaptureCodec, "EmuCore/GS", "VideoCaptureCodec");
904 connect(m_capture.videoCaptureCodec, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onCaptureCodecChanged);
905
906 QObject::disconnect(m_capture.audioCaptureCodec, &QComboBox::currentIndexChanged, nullptr, nullptr);
907 m_capture.audioCaptureCodec->clear();
908 m_capture.audioCaptureCodec->addItem(tr("Default"), QString());
909 for (const auto& [format, name] : GSCapture::GetAudioCodecList(container.c_str()))
910 {
911 const QString qformat(QString::fromStdString(format));
912 const QString qname(QString::fromStdString(name));
913 m_capture.audioCaptureCodec->addItem(QStringLiteral("%1 [%2]").arg(qformat).arg(qname), qformat);
914 }
915
916 SettingWidgetBinder::BindWidgetToStringSetting(
917 dialog()->getSettingsInterface(), m_capture.audioCaptureCodec, "EmuCore/GS", "AudioCaptureCodec");
918}
919
920void GraphicsSettingsWidget::GraphicsSettingsWidget::onCaptureCodecChanged()
921{

Callers

nothing calls this directly

Calls 6

argMethod · 0.80
getSettingsInterfaceMethod · 0.80
clearMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected