diff options
-rw-r--r-- | chrome/gpu/gpu_video_decoder.cc | 9 | ||||
-rw-r--r-- | chrome/gpu/gpu_video_decoder.h | 6 | ||||
-rw-r--r-- | chrome/gpu/gpu_video_decoder_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/gpu/media/fake_gl_video_decode_engine.cc | 2 | ||||
-rw-r--r-- | chrome/gpu/media/fake_gl_video_device.cc | 2 | ||||
-rw-r--r-- | chrome/gpu/media/fake_gl_video_device.h | 4 | ||||
-rw-r--r-- | chrome/gpu/media/gpu_video_device.h | 5 | ||||
-rw-r--r-- | chrome/gpu/media/mft_angle_video_device.cc | 2 | ||||
-rw-r--r-- | chrome/gpu/media/mft_angle_video_device.h | 4 | ||||
-rw-r--r-- | chrome/renderer/media/gles2_video_decode_context.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/media/gles2_video_decode_context.h | 8 | ||||
-rw-r--r-- | media/video/mft_h264_decode_engine.cc | 2 | ||||
-rw-r--r-- | media/video/mock_objects.h | 2 | ||||
-rw-r--r-- | media/video/video_decode_context.h | 6 |
14 files changed, 28 insertions, 28 deletions
diff --git a/chrome/gpu/gpu_video_decoder.cc b/chrome/gpu/gpu_video_decoder.cc index 27de22f..d16064c 100644 --- a/chrome/gpu/gpu_video_decoder.cc +++ b/chrome/gpu/gpu_video_decoder.cc @@ -199,9 +199,10 @@ void GpuVideoDecoder::ReleaseAllVideoFrames() { SendReleaseAllVideoFrames(); } -void GpuVideoDecoder::UploadToVideoFrame(void* buffer, - scoped_refptr<media::VideoFrame> frame, - Task* task) { +void GpuVideoDecoder::ConvertToVideoFrame( + void* buffer, + scoped_refptr<media::VideoFrame> frame, + Task* task) { // This method is called by VideoDecodeEngine to upload a buffer to a // VideoFrame. We should just delegate this to GpuVideoDevice which contains // the actual implementation. @@ -209,7 +210,7 @@ void GpuVideoDecoder::UploadToVideoFrame(void* buffer, DCHECK(ret) << "Failed to switch context"; // Actually doing the upload on the main thread. - ret = video_device_->UploadToVideoFrame(buffer, frame); + ret = video_device_->ConvertToVideoFrame(buffer, frame); DCHECK(ret) << "Failed to upload video content to a VideoFrame."; task->Run(); delete task; diff --git a/chrome/gpu/gpu_video_decoder.h b/chrome/gpu/gpu_video_decoder.h index 25885c8..79b9bdb 100644 --- a/chrome/gpu/gpu_video_decoder.h +++ b/chrome/gpu/gpu_video_decoder.h @@ -120,9 +120,9 @@ class GpuVideoDecoder int n, size_t width, size_t height, media::VideoFrame::Format format, std::vector<scoped_refptr<media::VideoFrame> >* frames, Task* task); virtual void ReleaseAllVideoFrames(); - virtual void UploadToVideoFrame(void* buffer, - scoped_refptr<media::VideoFrame> frame, - Task* task); + virtual void ConvertToVideoFrame(void* buffer, + scoped_refptr<media::VideoFrame> frame, + Task* task); virtual void Destroy(Task* task); // These methods are used in unit test only. diff --git a/chrome/gpu/gpu_video_decoder_unittest.cc b/chrome/gpu/gpu_video_decoder_unittest.cc index b1ea751..41e88d3 100644 --- a/chrome/gpu/gpu_video_decoder_unittest.cc +++ b/chrome/gpu/gpu_video_decoder_unittest.cc @@ -36,7 +36,7 @@ class MockGpuVideoDevice : public GpuVideoDevice { scoped_refptr<media::VideoFrame>*)); MOCK_METHOD1(ReleaseVideoFrame, void(const scoped_refptr<media::VideoFrame>& frame)); - MOCK_METHOD2(UploadToVideoFrame, + MOCK_METHOD2(ConvertToVideoFrame, bool(void* buffer, scoped_refptr<media::VideoFrame> frame)); private: diff --git a/chrome/gpu/media/fake_gl_video_decode_engine.cc b/chrome/gpu/media/fake_gl_video_decode_engine.cc index 532434b..db0f7a5 100644 --- a/chrome/gpu/media/fake_gl_video_decode_engine.cc +++ b/chrome/gpu/media/fake_gl_video_decode_engine.cc @@ -108,7 +108,7 @@ void FakeGlVideoDecodeEngine::ConsumeVideoSample( // After we have filled the content upload the internal frame to the // VideoFrame allocated through VideoDecodeContext. - context_->UploadToVideoFrame( + context_->ConvertToVideoFrame( internal_frame_, frame, NewRunnableMethod(this, &FakeGlVideoDecodeEngine::UploadCompleteTask, frame)); diff --git a/chrome/gpu/media/fake_gl_video_device.cc b/chrome/gpu/media/fake_gl_video_device.cc index 9e450ec..397b20f 100644 --- a/chrome/gpu/media/fake_gl_video_device.cc +++ b/chrome/gpu/media/fake_gl_video_device.cc @@ -37,7 +37,7 @@ void FakeGlVideoDevice::ReleaseVideoFrame( // for the VideoFrame(s) generated. } -bool FakeGlVideoDevice::UploadToVideoFrame( +bool FakeGlVideoDevice::ConvertToVideoFrame( void* buffer, scoped_refptr<media::VideoFrame> frame) { // Assume we are in the right context and then upload the content to the // texture. diff --git a/chrome/gpu/media/fake_gl_video_device.h b/chrome/gpu/media/fake_gl_video_device.h index 711c3ef..2075547 100644 --- a/chrome/gpu/media/fake_gl_video_device.h +++ b/chrome/gpu/media/fake_gl_video_device.h @@ -20,8 +20,8 @@ class FakeGlVideoDevice : public GpuVideoDevice { scoped_refptr<media::VideoFrame>* frame); virtual void ReleaseVideoFrame( const scoped_refptr<media::VideoFrame>& frame); - virtual bool UploadToVideoFrame(void* buffer, - scoped_refptr<media::VideoFrame> frame); + virtual bool ConvertToVideoFrame(void* buffer, + scoped_refptr<media::VideoFrame> frame); }; #endif // CHROME_GPU_MEDIA_FAKE_GL_VIDEO_DEVICE_H_ diff --git a/chrome/gpu/media/gpu_video_device.h b/chrome/gpu/media/gpu_video_device.h index 0556903..1ee4b6b 100644 --- a/chrome/gpu/media/gpu_video_device.h +++ b/chrome/gpu/media/gpu_video_device.h @@ -49,9 +49,8 @@ class GpuVideoDevice { // the GPU process. // // Return true if successful. - // TODO(hclam): Rename this to ConvertToVideoFrame(). - virtual bool UploadToVideoFrame(void* buffer, - scoped_refptr<media::VideoFrame> frame) = 0; + virtual bool ConvertToVideoFrame(void* buffer, + scoped_refptr<media::VideoFrame> frame) = 0; }; #endif // CHROME_GPU_MEDIA_GPU_VIDEO_DEVICE_H_ diff --git a/chrome/gpu/media/mft_angle_video_device.cc b/chrome/gpu/media/mft_angle_video_device.cc index 1faf9dc..56cb717 100644 --- a/chrome/gpu/media/mft_angle_video_device.cc +++ b/chrome/gpu/media/mft_angle_video_device.cc @@ -43,7 +43,7 @@ void MftAngleVideoDevice::ReleaseVideoFrame( // for the VideoFrame(s) generated. } -bool MftAngleVideoDevice::UploadToVideoFrame( +bool MftAngleVideoDevice::ConvertToVideoFrame( void* buffer, scoped_refptr<media::VideoFrame> frame) { gl::Context* context = (gl::Context*)eglGetCurrentContext(); // TODO(hclam): Connect ANGLE to upload the surface to texture when changes diff --git a/chrome/gpu/media/mft_angle_video_device.h b/chrome/gpu/media/mft_angle_video_device.h index fb1e0e8..0775a06 100644 --- a/chrome/gpu/media/mft_angle_video_device.h +++ b/chrome/gpu/media/mft_angle_video_device.h @@ -32,8 +32,8 @@ class MftAngleVideoDevice : public GpuVideoDevice { scoped_refptr<media::VideoFrame>* frame); virtual void ReleaseVideoFrame( const scoped_refptr<media::VideoFrame>& frame); - virtual bool UploadToVideoFrame(void* buffer, - scoped_refptr<media::VideoFrame> frame); + virtual bool ConvertToVideoFrame(void* buffer, + scoped_refptr<media::VideoFrame> frame); private: ScopedComPtr<IDirect3DDevice9, &IID_IDirect3DDevice9> device_; diff --git a/chrome/renderer/media/gles2_video_decode_context.cc b/chrome/renderer/media/gles2_video_decode_context.cc index e32e22b..9712313 100644 --- a/chrome/renderer/media/gles2_video_decode_context.cc +++ b/chrome/renderer/media/gles2_video_decode_context.cc @@ -98,7 +98,7 @@ void Gles2VideoDecodeContext::ReleaseAllVideoFrames() { frames_.clear(); } -void Gles2VideoDecodeContext::UploadToVideoFrame( +void Gles2VideoDecodeContext::ConvertToVideoFrame( void* buffer, scoped_refptr<media::VideoFrame> frame, Task* task) { DCHECK(memory_mapped_); // TODO(hclam): Implement. diff --git a/chrome/renderer/media/gles2_video_decode_context.h b/chrome/renderer/media/gles2_video_decode_context.h index 3b8c649..3fe9889 100644 --- a/chrome/renderer/media/gles2_video_decode_context.h +++ b/chrome/renderer/media/gles2_video_decode_context.h @@ -37,7 +37,7 @@ class Context; // bwith the GPU process). An additional step of uploading the content to // video memory is needed. Since VideoDecodeEngine is unaware of the video // memory, this upload operation is performed by calling -// UploadToVideoFrame(). +// ConvertToVideoFrame(). // // After the content is uploaded to video memory, WebKit will see the video // frame as textures and will perform the necessary operations for @@ -86,9 +86,9 @@ class Gles2VideoDecodeContext : public media::VideoDecodeContext { media::VideoFrame::Format format, std::vector<scoped_refptr<media::VideoFrame> >* frames_out, Task* task); virtual void ReleaseAllVideoFrames(); - virtual void UploadToVideoFrame(void* buffer, - scoped_refptr<media::VideoFrame> frame, - Task* task); + virtual void ConvertToVideoFrame(void* buffer, + scoped_refptr<media::VideoFrame> frame, + Task* task); virtual void Destroy(Task* task); // Accessor of the current mode of this decode context. diff --git a/media/video/mft_h264_decode_engine.cc b/media/video/mft_h264_decode_engine.cc index 9a5bdb0..5166b1f 100644 --- a/media/video/mft_h264_decode_engine.cc +++ b/media/video/mft_h264_decode_engine.cc @@ -650,7 +650,7 @@ bool MftH264DecodeEngine::DoDecode() { // TODO(imcheng): Detect error. output_frames_[0]->SetTimestamp(TimeDelta::FromMicroseconds(timestamp)); output_frames_[0]->SetDuration(TimeDelta::FromMicroseconds(duration)); - context_->UploadToVideoFrame( + context_->ConvertToVideoFrame( surface.get(), output_frames_[0], NewRunnableMethod(this, &MftH264DecodeEngine::OnUploadVideoFrameDone, surface, output_frames_[0])); diff --git a/media/video/mock_objects.h b/media/video/mock_objects.h index 24cd4d3..c0f3dd9 100644 --- a/media/video/mock_objects.h +++ b/media/video/mock_objects.h @@ -41,7 +41,7 @@ class MockVideoDecodeContext : public VideoDecodeContext { std::vector<scoped_refptr<VideoFrame> >* frames, Task* task)); MOCK_METHOD0(ReleaseAllVideoFrames, void()); - MOCK_METHOD3(UploadToVideoFrame, void( + MOCK_METHOD3(ConvertToVideoFrame, void( void* buffer, scoped_refptr<VideoFrame> frame, Task* task)); MOCK_METHOD1(Destroy, void(Task* task)); diff --git a/media/video/video_decode_context.h b/media/video/video_decode_context.h index 7bd6741..55740f7 100644 --- a/media/video/video_decode_context.h +++ b/media/video/video_decode_context.h @@ -67,9 +67,9 @@ class VideoDecodeContext { // Implementor should know how to handle it. // // |task| is executed if the operation was completed successfully. - // TODO(hclam): Rename this to ConvertToVideoFrame(). - virtual void UploadToVideoFrame(void* buffer, scoped_refptr<VideoFrame> frame, - Task* task) = 0; + virtual void ConvertToVideoFrame(void* buffer, + scoped_refptr<VideoFrame> frame, + Task* task) = 0; // Destroy this context asynchronously. When the operation is done |task| // is called. It is safe to delete this object only after |task| is called. |