Skip to content

Commit cdcac49

Browse files
committed
feat: Read initial podcast fps from settings
Currently, the podcast recording is set to a fixed 10 fps. While there exists a setting to allow for customisation, it remains unused. This change takes the user setting into account from the start. The actual fps are determined by the activity on the board, so the value represents a maximum frame rate.
1 parent cd265bb commit cdcac49

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/podcast/UBPodcastController.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void UBPodcastController::openPodcastPreferencesDialog()
157157
settings->podcastVideoSize->reset().toString();
158158
}
159159
const QString podcastProfile = settings->podcastVideoSize->get().toString();
160-
mVideoFramesPerSecondAtStart = settings->podcastFramesPerSecond->get().toInt();
160+
const int frameRate = settings->podcastFramesPerSecond->get().toInt();
161161
const int fullBitRate = settings->podcastWindowsMediaBitsPerSecond->get().toInt();
162162
const QSize viewportSize = UBApplication::boardController->controlView()->size();
163163

@@ -173,7 +173,7 @@ void UBPodcastController::openPodcastPreferencesDialog()
173173
podcastAudioRecordingDevice,
174174
podcastProfileNames,
175175
podcastProfile,
176-
mVideoFramesPerSecondAtStart,
176+
frameRate,
177177
fullBitRate,
178178
podcastBitRateDivisors,
179179
podcastVerticalResolution,
@@ -198,11 +198,11 @@ void UBPodcastController::podcastPreferencesDialogAccepted()
198198
const QString podcastProfile = dialog->podcastProfile();
199199
settings->podcastVideoSize->set(podcastProfile);
200200

201-
mVideoBitsPerSecondAtStart = dialog->podcastBitRate();
202-
settings->podcastWindowsMediaBitsPerSecond->set(QVariant::fromValue(mVideoBitsPerSecondAtStart));
201+
const int fullBitRate = dialog->podcastBitRate();
202+
settings->podcastWindowsMediaBitsPerSecond->set(QVariant::fromValue(fullBitRate));
203203

204-
mVideoFramesPerSecondAtStart = dialog->podcastFrameRate();
205-
settings->podcastFramesPerSecond->set(mVideoFramesPerSecondAtStart);
204+
const int frameRate = dialog->podcastFrameRate();
205+
settings->podcastFramesPerSecond->set(frameRate);
206206

207207
const bool podcastPublishToIntranet = dialog->podcastPublishToIntranet();
208208
UBSettings::settings()->podcastPublishToIntranet->set(podcastPublishToIntranet);
@@ -310,6 +310,7 @@ void UBPodcastController::start()
310310
QSize recommendedSize(1024, 768);
311311

312312
UBSettings* settings = UBSettings::settings();
313+
mVideoFramesPerSecondAtStart = settings->podcastFramesPerSecond->get().toInt();
313314
int fullBitRate = settings->podcastWindowsMediaBitsPerSecond->get().toInt();
314315
QString podcastProfile = settings->podcastVideoSize->get().toString();
315316

0 commit comments

Comments
 (0)