diff options
-rw-r--r-- | media/filters/video_renderer_base.h | 10 | ||||
-rw-r--r-- | webkit/glue/media/video_renderer_impl.cc | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/media/filters/video_renderer_base.h b/media/filters/video_renderer_base.h index d18d6a1..e3af186 100644 --- a/media/filters/video_renderer_base.h +++ b/media/filters/video_renderer_base.h @@ -1,6 +1,6 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. // VideoRendererBase creates its own thread for the sole purpose of timing frame // presentation. It handles reading from the decoder and stores the results in @@ -73,6 +73,10 @@ class VideoRendererBase : public VideoRenderer, // Implementors should avoid doing any sort of heavy work in this method and // instead post a task to a common/worker thread to handle rendering. Slowing // down the video thread may result in losing synchronization with audio. + // + // IMPORTANT: This method is called on the video renderer thread, which is + // different from the thread OnInitialize(), OnStop(), and the rest of the + // class executes on. virtual void OnFrameAvailable() = 0; private: diff --git a/webkit/glue/media/video_renderer_impl.cc b/webkit/glue/media/video_renderer_impl.cc index 5ffd80e..9148baf 100644 --- a/webkit/glue/media/video_renderer_impl.cc +++ b/webkit/glue/media/video_renderer_impl.cc @@ -17,7 +17,7 @@ VideoRendererImpl::VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, pts_logging_(pts_logging) { // TODO(hclam): decide whether to do the following line in this thread or // in the render thread. - proxy->SetVideoRenderer(this); + proxy_->SetVideoRenderer(this); } // static @@ -55,13 +55,9 @@ bool VideoRendererImpl::OnInitialize(media::VideoDecoder* decoder) { } void VideoRendererImpl::OnStop() { - DCHECK(proxy_); - proxy_->SetVideoRenderer(NULL); - proxy_ = NULL; } void VideoRendererImpl::OnFrameAvailable() { - DCHECK(proxy_); proxy_->Repaint(); } |