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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 1735803002: Implemented passing media track info from ffmpeg into blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wolenetz@ CR feedback + better track info extraction in ffmpeg Created 4 years, 10 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
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index e931c3fd72c3eb2fafa672cd51883c7a4825af0b..40daf2431a34027c5db72866a05c06f54f2f494a 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -549,6 +549,14 @@ ChunkDemuxer::Status ChunkDemuxer::AddId(const std::string& id,
return kOk;
}
+void ChunkDemuxer::SetTracksWatcher(
+ const std::string& id,
+ const MediaTracksUpdatedCB& tracks_updated_cb) {
+ base::AutoLock auto_lock(lock_);
+ CHECK(IsValidId(id));
+ source_state_map_[id]->SetTracksWatcher(tracks_updated_cb);
+}
+
void ChunkDemuxer::RemoveId(const std::string& id) {
base::AutoLock auto_lock(lock_);
CHECK(IsValidId(id));
@@ -596,19 +604,16 @@ bool ChunkDemuxer::EvictCodedFrames(const std::string& id,
return itr->second->EvictCodedFrames(media_time_dts, newDataSize);
}
-void ChunkDemuxer::AppendData(
- const std::string& id,
- const uint8_t* data,
- size_t length,
- TimeDelta append_window_start,
- TimeDelta append_window_end,
- TimeDelta* timestamp_offset,
- const MediaSourceState::InitSegmentReceivedCB& init_segment_received_cb) {
+void ChunkDemuxer::AppendData(const std::string& id,
+ const uint8_t* data,
+ size_t length,
+ TimeDelta append_window_start,
+ TimeDelta append_window_end,
+ TimeDelta* timestamp_offset) {
DVLOG(1) << "AppendData(" << id << ", " << length << ")";
DCHECK(!id.empty());
DCHECK(timestamp_offset);
- DCHECK(!init_segment_received_cb.is_null());
Ranges<TimeDelta> ranges;
@@ -629,11 +634,9 @@ void ChunkDemuxer::AppendData(
case INITIALIZING:
case INITIALIZED:
DCHECK(IsValidId(id));
- if (!source_state_map_[id]->Append(data, length,
- append_window_start,
+ if (!source_state_map_[id]->Append(data, length, append_window_start,
append_window_end,
- timestamp_offset,
- init_segment_received_cb)) {
+ timestamp_offset)) {
ReportError_Locked(PIPELINE_ERROR_DECODE);
return;
}
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698