diff options
22 files changed, 29 insertions, 33 deletions
diff --git a/content/common/gpu/client/command_buffer_proxy.h b/content/common/gpu/client/command_buffer_proxy.h index 311d05a..661a75f 100644 --- a/content/common/gpu/client/command_buffer_proxy.h +++ b/content/common/gpu/client/command_buffer_proxy.h @@ -67,7 +67,7 @@ class CommandBufferProxy : public gpu::CommandBuffer { // the GPU process, even if this returns non-NULL. In this case the client is // notified of an error later. virtual scoped_refptr<GpuVideoDecodeAcceleratorHost> CreateVideoDecoder( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) = 0; virtual void SetOnConsoleMessageCallback( diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc index fa6c25f..1a23eac 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.cc +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc @@ -424,7 +424,7 @@ void CommandBufferProxyImpl::SetNotifyRepaintTask(const base::Closure& task) { scoped_refptr<GpuVideoDecodeAcceleratorHost> CommandBufferProxyImpl::CreateVideoDecoder( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) { int decoder_route_id; if (!Send(new GpuCommandBufferMsg_CreateVideoDecoder(route_id_, profile, diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h index aaa0fcf..c5e64fe 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.h +++ b/content/common/gpu/client/command_buffer_proxy_impl.h @@ -63,7 +63,7 @@ class CommandBufferProxyImpl : virtual void SetChannelErrorCallback(const base::Closure& callback) OVERRIDE; virtual void SetNotifyRepaintTask(const base::Closure& callback) OVERRIDE; virtual scoped_refptr<GpuVideoDecodeAcceleratorHost> CreateVideoDecoder( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) OVERRIDE; virtual void SetOnConsoleMessageCallback( const GpuConsoleMessageCallback& callback) OVERRIDE; diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc index 0c9156b..2aac8c7 100644 --- a/content/common/gpu/client/gpu_channel_host.cc +++ b/content/common/gpu/client/gpu_channel_host.cc @@ -218,7 +218,7 @@ CommandBufferProxy* GpuChannelHost::CreateViewCommandBuffer( GpuVideoDecodeAcceleratorHost* GpuChannelHost::CreateVideoDecoder( int command_buffer_route_id, - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) { AutoLock lock(context_lock_); ProxyMap::iterator it = proxies_.find(command_buffer_route_id); diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h index 0a4e178..d6536f5 100644 --- a/content/common/gpu/client/gpu_channel_host.h +++ b/content/common/gpu/client/gpu_channel_host.h @@ -126,7 +126,7 @@ class GpuChannelHost : public IPC::Message::Sender, // Returned pointer is owned by the CommandBufferProxy for |route_id|. GpuVideoDecodeAcceleratorHost* CreateVideoDecoder( int command_buffer_route_id, - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client); // Destroy a command buffer created by this channel. diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc index c3ddcc8..59ff3a1 100644 --- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc +++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc @@ -56,7 +56,8 @@ bool GpuVideoDecodeAcceleratorHost::OnMessageReceived(const IPC::Message& msg) { return handled; } -bool GpuVideoDecodeAcceleratorHost::Initialize(Profile profile) { +bool GpuVideoDecodeAcceleratorHost::Initialize( + media::VideoCodecProfile profile) { NOTREACHED(); return true; } diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.h b/content/common/gpu/client/gpu_video_decode_accelerator_host.h index 396c6eb..c1479b8 100644 --- a/content/common/gpu/client/gpu_video_decode_accelerator_host.h +++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.h @@ -33,7 +33,7 @@ class GpuVideoDecodeAcceleratorHost virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // media::VideoDecodeAccelerator implementation. - virtual bool Initialize(Profile profile) OVERRIDE; + virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; virtual void AssignPictureBuffers( const std::vector<media::PictureBuffer>& buffers) OVERRIDE; diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 6d92774..e988685 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -549,7 +549,7 @@ void GpuCommandBufferStub::ReportState() { } void GpuCommandBufferStub::OnCreateVideoDecoder( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, IPC::Message* reply_message) { int decoder_route_id = channel_->GenerateRouteID(); GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams( diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index b9ed99e..4f08818 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -189,7 +189,7 @@ class GpuCommandBufferStub void OnGetTransferBuffer(int32 id, IPC::Message* reply_message); void OnCreateVideoDecoder( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, IPC::Message* reply_message); void OnDestroyVideoDecoder(int32 decoder_route_id); diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h index fe05f08..bd6ce94 100644 --- a/content/common/gpu/gpu_messages.h +++ b/content/common/gpu/gpu_messages.h @@ -144,7 +144,7 @@ IPC_ENUM_TRAITS(content::CauseForGpuLaunch) IPC_ENUM_TRAITS(gfx::GpuPreference) IPC_ENUM_TRAITS(gpu::error::ContextLostReason) -IPC_ENUM_TRAITS(media::VideoDecodeAccelerator::Profile) +IPC_ENUM_TRAITS(media::VideoCodecProfile) //------------------------------------------------------------------------------ // GPU Messages @@ -405,7 +405,7 @@ IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, // Create and initialize a hardware video decoder, returning its new route_id. IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, - media::VideoDecodeAccelerator::Profile /* profile */, + media::VideoCodecProfile /* profile */, int /* route_id */) // Release all resources held by the named hardware video decoder. diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.cc b/content/common/gpu/media/dxva_video_decode_accelerator.cc index 7e2c6b2..10f5237 100644 --- a/content/common/gpu/media/dxva_video_decode_accelerator.cc +++ b/content/common/gpu/media/dxva_video_decode_accelerator.cc @@ -522,7 +522,7 @@ DXVAVideoDecodeAccelerator::~DXVAVideoDecodeAccelerator() { client_ = NULL; } -bool DXVAVideoDecodeAccelerator::Initialize(Profile) { +bool DXVAVideoDecodeAccelerator::Initialize(media::VideoCodecProfile) { DCHECK(CalledOnValidThread()); RETURN_AND_NOTIFY_ON_FAILURE(pre_sandbox_init_done_, @@ -1039,4 +1039,3 @@ void DXVAVideoDecodeAccelerator::NotifyPictureReady( if (state_ != kUninitialized && client_) client_->PictureReady(picture); } - diff --git a/content/common/gpu/media/dxva_video_decode_accelerator.h b/content/common/gpu/media/dxva_video_decode_accelerator.h index e3770c6..9c7469e 100644 --- a/content/common/gpu/media/dxva_video_decode_accelerator.h +++ b/content/common/gpu/media/dxva_video_decode_accelerator.h @@ -45,7 +45,7 @@ class CONTENT_EXPORT DXVAVideoDecodeAccelerator virtual ~DXVAVideoDecodeAccelerator(); // media::VideoDecodeAccelerator implementation. - virtual bool Initialize(Profile) OVERRIDE; + virtual bool Initialize(media::VideoCodecProfile) OVERRIDE; virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; virtual void AssignPictureBuffers( const std::vector<media::PictureBuffer>& buffers) OVERRIDE; @@ -210,4 +210,3 @@ class CONTENT_EXPORT DXVAVideoDecodeAccelerator }; #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ - diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc index 5f9444f..224ba3a 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc @@ -115,7 +115,7 @@ void GpuVideoDecodeAccelerator::NotifyError( } void GpuVideoDecodeAccelerator::Initialize( - const media::VideoDecodeAccelerator::Profile profile, + const media::VideoCodecProfile profile, IPC::Message* init_done_msg, base::ProcessHandle renderer_process) { DCHECK(!video_decode_accelerator_.get()); diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.h b/content/common/gpu/media/gpu_video_decode_accelerator.h index c6a8d3e..430dda8 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.h +++ b/content/common/gpu/media/gpu_video_decode_accelerator.h @@ -46,7 +46,7 @@ class GpuVideoDecodeAccelerator // |init_done_msg| when done. // The renderer process handle is valid as long as we have a channel between // GPU process and the renderer. - void Initialize(const media::VideoDecodeAccelerator::Profile profile, + void Initialize(const media::VideoCodecProfile profile, IPC::Message* init_done_msg, base::ProcessHandle renderer_process); diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc index 0c46b42..da73e34 100644 --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc @@ -667,9 +667,9 @@ void EglRenderingVDAClient::CreateDecoder() { return; // Configure the decoder. - media::VideoDecodeAccelerator::Profile profile = media::H264PROFILE_BASELINE; + media::VideoCodecProfile profile = media::H264PROFILE_BASELINE; if (profile_ != -1) - profile = static_cast<media::VideoDecodeAccelerator::Profile>(profile_); + profile = static_cast<media::VideoCodecProfile>(profile_); CHECK(decoder_->Initialize(profile)); } diff --git a/content/renderer/media/pepper_platform_video_decoder_impl.cc b/content/renderer/media/pepper_platform_video_decoder_impl.cc index 65ed487..503cd43 100644 --- a/content/renderer/media/pepper_platform_video_decoder_impl.cc +++ b/content/renderer/media/pepper_platform_video_decoder_impl.cc @@ -24,7 +24,7 @@ PlatformVideoDecoderImpl::PlatformVideoDecoderImpl( PlatformVideoDecoderImpl::~PlatformVideoDecoderImpl() {} -bool PlatformVideoDecoderImpl::Initialize(Profile profile) { +bool PlatformVideoDecoderImpl::Initialize(media::VideoCodecProfile profile) { // TODO(vrk): Support multiple decoders. if (decoder_) return true; diff --git a/content/renderer/media/pepper_platform_video_decoder_impl.h b/content/renderer/media/pepper_platform_video_decoder_impl.h index ac7c02a..2927277 100644 --- a/content/renderer/media/pepper_platform_video_decoder_impl.h +++ b/content/renderer/media/pepper_platform_video_decoder_impl.h @@ -21,7 +21,7 @@ class PlatformVideoDecoderImpl int32 command_buffer_route_id); // PlatformVideoDecoder (a.k.a. VideoDecodeAccelerator) implementation. - virtual bool Initialize(Profile profile) OVERRIDE; + virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; virtual void Decode( const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; virtual void AssignPictureBuffers( diff --git a/content/renderer/media/renderer_gpu_video_decoder_factories.cc b/content/renderer/media/renderer_gpu_video_decoder_factories.cc index 5f940b53..9125666 100644 --- a/content/renderer/media/renderer_gpu_video_decoder_factories.cc +++ b/content/renderer/media/renderer_gpu_video_decoder_factories.cc @@ -44,7 +44,7 @@ void RendererGpuVideoDecoderFactories::AsyncGetContext( media::VideoDecodeAccelerator* RendererGpuVideoDecoderFactories::CreateVideoDecodeAccelerator( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) { DCHECK_NE(MessageLoop::current(), message_loop_); media::VideoDecodeAccelerator* vda = NULL; @@ -57,7 +57,7 @@ RendererGpuVideoDecoderFactories::CreateVideoDecodeAccelerator( } void RendererGpuVideoDecoderFactories::AsyncCreateVideoDecodeAccelerator( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client, media::VideoDecodeAccelerator** vda, base::WaitableEvent* waiter) { diff --git a/content/renderer/media/renderer_gpu_video_decoder_factories.h b/content/renderer/media/renderer_gpu_video_decoder_factories.h index 5924a20..1999418 100644 --- a/content/renderer/media/renderer_gpu_video_decoder_factories.h +++ b/content/renderer/media/renderer_gpu_video_decoder_factories.h @@ -41,7 +41,7 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories WebGraphicsContext3DCommandBufferImpl* wgc3dcbi); virtual media::VideoDecodeAccelerator* CreateVideoDecodeAccelerator( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) OVERRIDE; virtual bool CreateTextures(int32 count, const gfx::Size& size, @@ -68,7 +68,7 @@ class CONTENT_EXPORT RendererGpuVideoDecoderFactories // AsyncCreateSharedMemory runs on the renderer thread and the rest run on // |message_loop_|. void AsyncCreateVideoDecodeAccelerator( - media::VideoDecodeAccelerator::Profile profile, + media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client, media::VideoDecodeAccelerator** vda, base::WaitableEvent* waiter); diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h index 209eb87..c578f5a 100644 --- a/media/filters/gpu_video_decoder.h +++ b/media/filters/gpu_video_decoder.h @@ -36,7 +36,7 @@ class MEDIA_EXPORT GpuVideoDecoder public: // Caller owns returned pointer. virtual VideoDecodeAccelerator* CreateVideoDecodeAccelerator( - VideoDecodeAccelerator::Profile, VideoDecodeAccelerator::Client*) = 0; + VideoCodecProfile, VideoDecodeAccelerator::Client*) = 0; // Allocate & delete native textures. virtual bool CreateTextures(int32 count, const gfx::Size& size, diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h index 623cf1e..5fa0d21 100644 --- a/media/video/video_decode_accelerator.h +++ b/media/video/video_decode_accelerator.h @@ -24,9 +24,6 @@ namespace media { class MEDIA_EXPORT VideoDecodeAccelerator : public base::RefCountedThreadSafe<VideoDecodeAccelerator> { public: - // TODO(fischman): fix foreign references to this and get rid of this typedef. - typedef VideoCodecProfile Profile; - // Enumeration of potential errors generated by the API. // Note: Keep these in sync with PP_VideoDecodeError_Dev. enum Error { @@ -85,7 +82,7 @@ class MEDIA_EXPORT VideoDecodeAccelerator // |profile| is the video stream's format profile. // // Returns true when command successfully accepted. Otherwise false. - virtual bool Initialize(Profile profile) = 0; + virtual bool Initialize(VideoCodecProfile profile) = 0; // Decodes given bitstream buffer. Once decoder is done with processing // |bitstream_buffer| it will call NotifyEndOfBitstreamBuffer() with the diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc index 9d34734..ac4a82b 100644 --- a/webkit/plugins/ppapi/ppb_video_decoder_impl.cc +++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.cc @@ -45,12 +45,12 @@ PPB_VideoDecoder_Impl::PPB_VideoDecoder_Impl(PP_Instance instance) PPB_VideoDecoder_Impl::~PPB_VideoDecoder_Impl() { } -// Convert PP_VideoDecoder_Profile to media::VideoDecodeAccelerator::Profile. -static media::VideoDecodeAccelerator::Profile PPToMediaProfile( +// Convert PP_VideoDecoder_Profile to media::VideoCodecProfile. +static media::VideoCodecProfile PPToMediaProfile( const PP_VideoDecoder_Profile pp_profile) { // TODO(fischman,vrk): this assumes the enum values in the two Profile types // match up exactly. Add a COMPILE_ASSERT for this somewhere. - return static_cast<media::VideoDecodeAccelerator::Profile>(pp_profile); + return static_cast<media::VideoCodecProfile>(pp_profile); } // static |