Skip to content

Commit

Permalink
feat(mediaplayer): get bLowLatency from demuxer
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Jun 19, 2020
1 parent 589c07c commit 65da9a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework/demuxer/IDemuxer.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ namespace Cicada {
return 0;
}

virtual bool isLowLatency()
{
return false;
}

protected:
demuxer_callback_read mReadCb{nullptr};
demuxer_callback_seek mSeekCb{nullptr};
Expand Down
4 changes: 4 additions & 0 deletions mediaPlayer/SuperMediaPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3226,6 +3226,10 @@ namespace Cicada {
}
}

if (!mSet.bLowLatency) {
mSet.bLowLatency = mDemuxerService->getDemuxerHandle()->isLowLatency();
}

if (mSet.bLowLatency) {
// artp disable b frame to reduce delay at present
decFlag |= DECFLAG_OUTPUT_FRAME_ASAP;
Expand Down

0 comments on commit 65da9a7

Please sign in to comment.