Commit a0644c28 authored by Matt Wolenetz's avatar Matt Wolenetz Committed by Commit Bot

MSE: Remove unused SourceBufferRangeBy*::SeekAhead* methods

These 3 methods in each of SBRByPts and SBRByDts are not used by
anything, and are deleted by this change. I found these during
refactoring SBRByPts for PTS/DTS compliance, and split their deletion
into this CL to make compliance CL(s) smaller.

BUG=718641

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I2a50a6e618e6d3bcc2a799bec398ebe752dba690
Reviewed-on: https://chromium-review.googlesource.com/683154Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504210}
parent 1dbdf7e7
...@@ -145,14 +145,6 @@ bool SourceBufferRangeByDts::SameConfigThruRange(DecodeTimestamp start, ...@@ -145,14 +145,6 @@ bool SourceBufferRangeByDts::SameConfigThruRange(DecodeTimestamp start,
return true; return true;
} }
void SourceBufferRangeByDts::SeekAheadTo(DecodeTimestamp timestamp) {
SeekAhead(timestamp, false);
}
void SourceBufferRangeByDts::SeekAheadPast(DecodeTimestamp timestamp) {
SeekAhead(timestamp, true);
}
std::unique_ptr<SourceBufferRangeByDts> SourceBufferRangeByDts::SplitRange( std::unique_ptr<SourceBufferRangeByDts> SourceBufferRangeByDts::SplitRange(
DecodeTimestamp timestamp) { DecodeTimestamp timestamp) {
CHECK(!buffers_.empty()); CHECK(!buffers_.empty());
...@@ -494,23 +486,6 @@ bool SourceBufferRangeByDts::GetBuffersInRange(DecodeTimestamp start, ...@@ -494,23 +486,6 @@ bool SourceBufferRangeByDts::GetBuffersInRange(DecodeTimestamp start,
return previous_size < buffers->size(); return previous_size < buffers->size();
} }
void SourceBufferRangeByDts::SeekAhead(DecodeTimestamp timestamp,
bool skip_given_timestamp) {
DCHECK(!keyframe_map_.empty());
KeyframeMap::iterator result =
GetFirstKeyframeAt(timestamp, skip_given_timestamp);
// If there isn't a keyframe after |timestamp|, then seek to end and return
// kNoTimestamp to signal such.
if (result == keyframe_map_.end()) {
next_buffer_index_ = -1;
return;
}
next_buffer_index_ = result->second - keyframe_map_index_base_;
DCHECK_LT(next_buffer_index_, static_cast<int>(buffers_.size()));
}
SourceBufferRange::BufferQueue::iterator SourceBufferRangeByDts::GetBufferItrAt( SourceBufferRange::BufferQueue::iterator SourceBufferRangeByDts::GetBufferItrAt(
DecodeTimestamp timestamp, DecodeTimestamp timestamp,
bool skip_given_timestamp) { bool skip_given_timestamp) {
......
...@@ -75,14 +75,6 @@ class MEDIA_EXPORT SourceBufferRangeByDts : public SourceBufferRange { ...@@ -75,14 +75,6 @@ class MEDIA_EXPORT SourceBufferRangeByDts : public SourceBufferRange {
// CanSeekTo(start) == CanSeekTo(end) == true. // CanSeekTo(start) == CanSeekTo(end) == true.
bool SameConfigThruRange(DecodeTimestamp start, DecodeTimestamp end); bool SameConfigThruRange(DecodeTimestamp start, DecodeTimestamp end);
// Updates |next_buffer_index_| to point to next keyframe after or equal to
// |timestamp|.
void SeekAheadTo(DecodeTimestamp timestamp);
// Updates |next_buffer_index_| to point to next keyframe strictly after
// |timestamp|.
void SeekAheadPast(DecodeTimestamp timestamp);
// Finds the next keyframe from |buffers_| starting at or after |timestamp| // Finds the next keyframe from |buffers_| starting at or after |timestamp|
// and creates and returns a new SourceBufferRangeByDts with the buffers from // and creates and returns a new SourceBufferRangeByDts with the buffers from
// that keyframe onward. The buffers in the new SourceBufferRangeByDts are // that keyframe onward. The buffers in the new SourceBufferRangeByDts are
...@@ -183,11 +175,6 @@ class MEDIA_EXPORT SourceBufferRangeByDts : public SourceBufferRange { ...@@ -183,11 +175,6 @@ class MEDIA_EXPORT SourceBufferRangeByDts : public SourceBufferRange {
bool TruncateAt(const BufferQueue::iterator& starting_point, bool TruncateAt(const BufferQueue::iterator& starting_point,
BufferQueue* deleted_buffers) override; BufferQueue* deleted_buffers) override;
// Seeks the range to the next keyframe after |timestamp|. If
// |skip_given_timestamp| is true, the seek will go to a keyframe with a
// timestamp strictly greater than |timestamp|.
void SeekAhead(DecodeTimestamp timestamp, bool skip_given_timestamp);
// Returns an iterator in |buffers_| pointing to the buffer at |timestamp|. // Returns an iterator in |buffers_| pointing to the buffer at |timestamp|.
// If |skip_given_timestamp| is true, this returns the first buffer with // If |skip_given_timestamp| is true, this returns the first buffer with
// timestamp greater than |timestamp|. // timestamp greater than |timestamp|.
......
...@@ -145,14 +145,6 @@ bool SourceBufferRangeByPts::SameConfigThruRange(DecodeTimestamp start, ...@@ -145,14 +145,6 @@ bool SourceBufferRangeByPts::SameConfigThruRange(DecodeTimestamp start,
return true; return true;
} }
void SourceBufferRangeByPts::SeekAheadTo(DecodeTimestamp timestamp) {
SeekAhead(timestamp, false);
}
void SourceBufferRangeByPts::SeekAheadPast(DecodeTimestamp timestamp) {
SeekAhead(timestamp, true);
}
std::unique_ptr<SourceBufferRangeByPts> SourceBufferRangeByPts::SplitRange( std::unique_ptr<SourceBufferRangeByPts> SourceBufferRangeByPts::SplitRange(
DecodeTimestamp timestamp) { DecodeTimestamp timestamp) {
CHECK(!buffers_.empty()); CHECK(!buffers_.empty());
...@@ -494,23 +486,6 @@ bool SourceBufferRangeByPts::GetBuffersInRange(DecodeTimestamp start, ...@@ -494,23 +486,6 @@ bool SourceBufferRangeByPts::GetBuffersInRange(DecodeTimestamp start,
return previous_size < buffers->size(); return previous_size < buffers->size();
} }
void SourceBufferRangeByPts::SeekAhead(DecodeTimestamp timestamp,
bool skip_given_timestamp) {
DCHECK(!keyframe_map_.empty());
KeyframeMap::iterator result =
GetFirstKeyframeAt(timestamp, skip_given_timestamp);
// If there isn't a keyframe after |timestamp|, then seek to end and return
// kNoTimestamp to signal such.
if (result == keyframe_map_.end()) {
next_buffer_index_ = -1;
return;
}
next_buffer_index_ = result->second - keyframe_map_index_base_;
DCHECK_LT(next_buffer_index_, static_cast<int>(buffers_.size()));
}
SourceBufferRange::BufferQueue::iterator SourceBufferRangeByPts::GetBufferItrAt( SourceBufferRange::BufferQueue::iterator SourceBufferRangeByPts::GetBufferItrAt(
DecodeTimestamp timestamp, DecodeTimestamp timestamp,
bool skip_given_timestamp) { bool skip_given_timestamp) {
......
...@@ -71,14 +71,6 @@ class MEDIA_EXPORT SourceBufferRangeByPts : public SourceBufferRange { ...@@ -71,14 +71,6 @@ class MEDIA_EXPORT SourceBufferRangeByPts : public SourceBufferRange {
// CanSeekTo(start) == CanSeekTo(end) == true. // CanSeekTo(start) == CanSeekTo(end) == true.
bool SameConfigThruRange(DecodeTimestamp start, DecodeTimestamp end); bool SameConfigThruRange(DecodeTimestamp start, DecodeTimestamp end);
// Updates |next_buffer_index_| to point to next keyframe after or equal to
// |timestamp|.
void SeekAheadTo(DecodeTimestamp timestamp);
// Updates |next_buffer_index_| to point to next keyframe strictly after
// |timestamp|.
void SeekAheadPast(DecodeTimestamp timestamp);
// Finds the next keyframe from |buffers_| starting at or after |timestamp| // Finds the next keyframe from |buffers_| starting at or after |timestamp|
// and creates and returns a new SourceBufferRangeByPts with the buffers from // and creates and returns a new SourceBufferRangeByPts with the buffers from
// that keyframe onward. The buffers in the new SourceBufferRangeByPts are // that keyframe onward. The buffers in the new SourceBufferRangeByPts are
...@@ -179,11 +171,6 @@ class MEDIA_EXPORT SourceBufferRangeByPts : public SourceBufferRange { ...@@ -179,11 +171,6 @@ class MEDIA_EXPORT SourceBufferRangeByPts : public SourceBufferRange {
bool TruncateAt(const BufferQueue::iterator& starting_point, bool TruncateAt(const BufferQueue::iterator& starting_point,
BufferQueue* deleted_buffers) override; BufferQueue* deleted_buffers) override;
// Seeks the range to the next keyframe after |timestamp|. If
// |skip_given_timestamp| is true, the seek will go to a keyframe with a
// timestamp strictly greater than |timestamp|.
void SeekAhead(DecodeTimestamp timestamp, bool skip_given_timestamp);
// Returns an iterator in |buffers_| pointing to the buffer at |timestamp|. // Returns an iterator in |buffers_| pointing to the buffer at |timestamp|.
// If |skip_given_timestamp| is true, this returns the first buffer with // If |skip_given_timestamp| is true, this returns the first buffer with
// timestamp greater than |timestamp|. // timestamp greater than |timestamp|.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment