miscellaneous other changes to make audio rendering work
Many changes were made throughout the codebase to support audio, these are most of the small changes necessary. The audio support still is not perfect. I still need to write in resampling support. After that it should work correctly with all audio types.
This commit is contained in:
@@ -132,13 +132,12 @@ void PlaybackControls::SetTimebase(const rational &r)
|
||||
|
||||
void PlaybackControls::SetTime(const int64_t &r)
|
||||
{
|
||||
if (time_base_.isNull()) {
|
||||
return;
|
||||
}
|
||||
SetTimeLabelInternal(cur_tc_lbl_, r);
|
||||
}
|
||||
|
||||
cur_tc_lbl_->setText(olive::timestamp_to_timecode(r,
|
||||
time_base_,
|
||||
olive::CurrentTimecodeDisplay()));
|
||||
void PlaybackControls::SetEndTime(const int64_t &r)
|
||||
{
|
||||
SetTimeLabelInternal(end_tc_lbl_, r);
|
||||
}
|
||||
|
||||
void PlaybackControls::ShowPauseButton()
|
||||
@@ -170,3 +169,14 @@ void PlaybackControls::UpdateIcons()
|
||||
next_frame_btn_->setIcon(olive::icon::NextFrame);
|
||||
go_to_end_btn_->setIcon(olive::icon::GoToEnd);
|
||||
}
|
||||
|
||||
void PlaybackControls::SetTimeLabelInternal(QLabel* label, const int64_t& time)
|
||||
{
|
||||
if (time_base_.isNull()) {
|
||||
return;
|
||||
}
|
||||
|
||||
label->setText(olive::timestamp_to_timecode(time,
|
||||
time_base_,
|
||||
olive::CurrentTimecodeDisplay()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user