Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ggarra13/tlRender
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Mar 29, 2024
2 parents 4c1b4ca + 28180e3 commit 654726f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
12 changes: 11 additions & 1 deletion lib/tlIO/OpenEXRRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <array>
#include <cstring>
#include <sstream>

namespace tl
{
Expand Down Expand Up @@ -495,12 +496,21 @@ namespace tl
{
io::Info out = File(fileName, memory, _channelGrouping, _ignoreDisplayWindow, _logSystem.lock()).getInfo();
float speed = _defaultSpeed;
const auto i = out.tags.find("Frame Per Second");
auto i = out.tags.find("Frame Per Second");
if (i != out.tags.end())
{
locale::SetAndRestore saved;
speed = std::stof(i->second);
}
i = out.tags.find("FramesPerSecond");
if (i != out.tags.end())
{
int num = 1;
int den = 24;
std::stringstream s(i->second);
s >> num >> den;
speed = static_cast<double>(num) / static_cast<double>(den);
}
out.videoTime = otime::TimeRange::range_from_start_end_time_inclusive(
otime::RationalTime(_startFrame, speed),
otime::RationalTime(_endFrame, speed));
Expand Down
4 changes: 3 additions & 1 deletion lib/tlQtWidget/TimelineWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ namespace tl

QSize TimelineWidget::minimumSizeHint() const
{
return QSize(150, 150);
//! \bug Hard-coded vertical size hint.
//return QSize(100, 113);
return QSize(100, 188);
}

void TimelineWidget::setEditable(bool value)
Expand Down
4 changes: 3 additions & 1 deletion lib/tlTimelineUI/TimelineWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ namespace tl
TLRENDER_P();
const int sa = event.style->getSizeRole(ui::SizeRole::ScrollArea, _displayScale);
_sizeHint.w = sa;
_sizeHint.h = sa * 2;
//! \bug Hard-coded vertical size hint.
//_sizeHint.h = 226;
_sizeHint.h = 376;
}

void TimelineWidget::mouseMoveEvent(ui::MouseMoveEvent& event)
Expand Down

0 comments on commit 654726f

Please sign in to comment.