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

Side by Side Diff: content/renderer/media/android/media_source_delegate.cc

Issue 263333004: Add timelineOffset() support to WebMediaPlayerAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/android/media_source_delegate.h" 5 #include "content/renderer/media/android/media_source_delegate.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 base::Bind(&MediaSourceDelegate::StopDemuxer, 107 base::Bind(&MediaSourceDelegate::StopDemuxer,
108 base::Unretained(this))); 108 base::Unretained(this)));
109 } 109 }
110 110
111 bool MediaSourceDelegate::IsVideoEncrypted() { 111 bool MediaSourceDelegate::IsVideoEncrypted() {
112 DCHECK(main_loop_->BelongsToCurrentThread()); 112 DCHECK(main_loop_->BelongsToCurrentThread());
113 base::AutoLock auto_lock(is_video_encrypted_lock_); 113 base::AutoLock auto_lock(is_video_encrypted_lock_);
114 return is_video_encrypted_; 114 return is_video_encrypted_;
115 } 115 }
116 116
117 base::Time MediaSourceDelegate::GetTimelineOffset() const {
118 DCHECK(main_loop_->BelongsToCurrentThread());
119 if (!chunk_demuxer_)
120 return base::Time();
121
122 return chunk_demuxer_->GetTimelineOffset();
123 }
124
117 void MediaSourceDelegate::StopDemuxer() { 125 void MediaSourceDelegate::StopDemuxer() {
118 DCHECK(media_loop_->BelongsToCurrentThread()); 126 DCHECK(media_loop_->BelongsToCurrentThread());
119 DCHECK(chunk_demuxer_); 127 DCHECK(chunk_demuxer_);
120 128
121 demuxer_client_->RemoveDelegate(demuxer_client_id_); 129 demuxer_client_->RemoveDelegate(demuxer_client_id_);
122 demuxer_client_ = NULL; 130 demuxer_client_ = NULL;
123 131
124 audio_stream_ = NULL; 132 audio_stream_ = NULL;
125 video_stream_ = NULL; 133 video_stream_ = NULL;
126 // TODO(xhwang): Figure out if we need to Reset the DDSs after Seeking or 134 // TODO(xhwang): Figure out if we need to Reset the DDSs after Seeking or
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // current time have been garbage collected or removed by the web app, this is 764 // current time have been garbage collected or removed by the web app, this is
757 // unlikely. This may cause unexpected playback stall due to seek pending an 765 // unlikely. This may cause unexpected playback stall due to seek pending an
758 // append for a GOP prior to the last GOP demuxed. 766 // append for a GOP prior to the last GOP demuxed.
759 // TODO(wolenetz): Remove the possibility for this seek to cause unexpected 767 // TODO(wolenetz): Remove the possibility for this seek to cause unexpected
760 // player stall by replaying cached data since last keyframe in browser player 768 // player stall by replaying cached data since last keyframe in browser player
761 // rather than issuing browser seek. See http://crbug.com/304234. 769 // rather than issuing browser seek. See http://crbug.com/304234.
762 return seek_time; 770 return seek_time;
763 } 771 }
764 772
765 } // namespace content 773 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/media_source_delegate.h ('k') | content/renderer/media/android/webmediaplayer_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698