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

Unified Diff: webkit/media/webmediaplayer_ms.cc

Issue 11198055: Fix media stream playback event as media element. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « webkit/media/webmediaplayer_ms.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_ms.cc
===================================================================
--- webkit/media/webmediaplayer_ms.cc (revision 162561)
+++ webkit/media/webmediaplayer_ms.cc (working copy)
@@ -45,7 +45,6 @@
client_(client),
delegate_(delegate),
media_stream_client_(media_stream_client),
- video_frame_provider_started_(false),
paused_(true),
pending_repaint_(false),
got_first_frame_(false),
@@ -93,8 +92,7 @@
GetClient()->sourceOpened();
GetClient()->setOpaque(true);
SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
- SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData);
- RepaintInternal();
+ video_frame_provider_->Start();
} else {
SetNetworkState(WebMediaPlayer::NetworkStateNetworkError);
}
@@ -108,15 +106,11 @@
DVLOG(1) << "WebMediaPlayerMS::play";
DCHECK(thread_checker_.CalledOnValidThread());
- paused_ = false;
- if (video_frame_provider_) {
- if (video_frame_provider_started_) {
- video_frame_provider_->Play();
- } else {
- video_frame_provider_started_ = true;
- video_frame_provider_->Start();
- }
+ if (video_frame_provider_ && paused_) {
+ video_frame_provider_->Play();
}
+ paused_ = false;
+
// TODO(wjia): add audio. See crbug.com/142988.
media_log_->AddEvent(media_log_->CreateEvent(media::MediaLogEvent::PLAY));
@@ -349,6 +343,9 @@
if (!got_first_frame_) {
got_first_frame_ = true;
start_time_ = frame->GetTimestamp();
+ paused_ = false;
scherkus (not reviewing) 2012/10/19 22:16:37 as discussed offline... you shouldn't set this
wjia(left Chromium) 2012/10/21 22:11:12 Done.
+ SetReadyState(WebMediaPlayer::ReadyStateHaveEnoughData);
+ RepaintInternal();
}
bool size_changed = !current_frame_ ||
current_frame_->natural_size() != frame->natural_size();
« no previous file with comments | « webkit/media/webmediaplayer_ms.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698