Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1286)

Unified Diff: media/filters/source_buffer_stream.cc

Issue 23702007: Render inband text tracks in the media pipeline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incorporate aaron's comments (10/16) Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/source_buffer_stream.cc
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc
index 8a797de81a08a6a8c8f368976208f9d8f60fef62..936603a2881e9780e20f3402e6c4c9a722401e01 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -350,6 +350,28 @@ SourceBufferStream::SourceBufferStream(const VideoDecoderConfig& video_config,
video_configs_.push_back(video_config);
}
+SourceBufferStream::SourceBufferStream(const TextTrackConfig& text_config,
+ const LogCB& log_cb)
+ : log_cb_(log_cb),
+ current_config_index_(0),
+ append_config_index_(0),
+ seek_pending_(false),
+ end_of_stream_(false),
+ seek_buffer_timestamp_(kNoTimestamp()),
+ selected_range_(NULL),
+ media_segment_start_time_(kNoTimestamp()),
+ range_for_next_append_(ranges_.end()),
+ new_media_segment_(false),
+ last_appended_buffer_timestamp_(kNoTimestamp()),
+ last_appended_buffer_is_keyframe_(false),
+ last_output_buffer_timestamp_(kNoTimestamp()),
+ max_interbuffer_distance_(kNoTimestamp()),
+ memory_limit_(kDefaultAudioMemoryLimit),
+ config_change_pending_(false) {
+ // TODO(matthewjheaney): does this need to be a vector?
+ text_track_config_ = text_config;
+}
+
SourceBufferStream::~SourceBufferStream() {
while (!ranges_.empty()) {
delete ranges_.front();
@@ -1231,6 +1253,10 @@ const VideoDecoderConfig& SourceBufferStream::GetCurrentVideoDecoderConfig() {
return video_configs_[current_config_index_];
}
+const TextTrackConfig& SourceBufferStream::GetCurrentTextTrackConfig() {
+ return text_track_config_;
+}
+
base::TimeDelta SourceBufferStream::GetMaxInterbufferDistance() const {
if (max_interbuffer_distance_ == kNoTimestamp())
return base::TimeDelta::FromMilliseconds(kDefaultBufferDurationInMs);

Powered by Google App Engine
This is Rietveld 408576698