Skip to content

Commit

Permalink
Increase preroll frames requested to 3 (#196)
Browse files Browse the repository at this point in the history
Summary: Increase frames requested before prerolling to speed up buffering of content after seek.
Type: Bug
Test Plan: Unittests, YtCert Progressive Test Suite (RIALTO-25, RIALTO-5)
Jira: RIALTO-372
  • Loading branch information
skyfroxl authored Oct 18, 2023
1 parent e4e4d68 commit 510eea1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion media/server/main/include/ShmUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace firebolt::rialto::server
{
constexpr std::uint32_t kPrerollNumFrames{1};
constexpr std::uint32_t kPrerollNumFrames{3};
constexpr std::uint32_t kMaxFrames{24};
constexpr std::uint32_t getMaxMetadataBytes()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/media/server/main/mediaPipeline/CallbackTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TEST_F(RialtoServerMediaPipelineCallbackTest, notifyNeedMediaDataInPrerollingSta
{
auto mediaSourceType = firebolt::rialto::MediaSourceType::VIDEO;
int sourceId = attachSource(mediaSourceType, "video/h264");
int numFrames{1};
int numFrames{3};

expectNotifyNeedData(mediaSourceType, sourceId, numFrames);

Expand Down
2 changes: 1 addition & 1 deletion tests/media/server/main/mediaPipeline/HaveDataTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using ::testing::Throw;
class RialtoServerMediaPipelineHaveDataTest : public MediaPipelineTestBase
{
protected:
const uint32_t m_kNumFrames{1};
const uint32_t m_kNumFrames{3};
const uint32_t m_kNeedDataRequestId{0};
const std::chrono::milliseconds m_kNeedMediaDataResendTimeout{100};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ TEST_F(RialtoServerMediaPipelineMiscellaneousFunctionsTest, SetPositionResetEos)
EXPECT_TRUE(m_mediaPipeline->setPosition(m_kPosition));

// Expect need data notified to client
expectNotifyNeedData(firebolt::rialto::MediaSourceType::VIDEO, videoSourceId, 1);
expectNotifyNeedData(firebolt::rialto::MediaSourceType::VIDEO, videoSourceId, 3);
m_gstPlayerCallback->notifyNeedMediaData(firebolt::rialto::MediaSourceType::VIDEO);

expectNotifyNeedData(firebolt::rialto::MediaSourceType::AUDIO, audioSourceId, 1);
expectNotifyNeedData(firebolt::rialto::MediaSourceType::AUDIO, audioSourceId, 3);
m_gstPlayerCallback->notifyNeedMediaData(firebolt::rialto::MediaSourceType::AUDIO);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ constexpr int kSourceId{1};
constexpr std::uint32_t kBufferLen{7 * 1024 * 1024};
constexpr std::uint32_t kMetadataOffset{1024};
constexpr int kRequestId{0};
constexpr int kPrerollingNumFrames{1};
constexpr int kPrerollingNumFrames{3};
constexpr int kMaxFrames{24};
constexpr int kMaxMetadataBytes{2500};
} // namespace
Expand Down

0 comments on commit 510eea1

Please sign in to comment.