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

Unified Diff: chrome/gpu/gpu_video_service.cc

Issue 3020077: Revert 55405 - Special thanks for in-ming cheng's MFT hardware decodering cod... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « chrome/gpu/gpu_video_service.h ('k') | chrome/renderer/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_video_service.cc
===================================================================
--- chrome/gpu/gpu_video_service.cc (revision 55418)
+++ chrome/gpu/gpu_video_service.cc (working copy)
@@ -1,76 +0,0 @@
-// 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.
-
-#include "chrome/common/gpu_messages.h"
-#include "chrome/gpu/gpu_channel.h"
-#include "chrome/gpu/gpu_video_decoder_mft.h"
-#include "chrome/gpu/gpu_video_service.h"
-
-GpuVideoService::GpuVideoService() : next_available_decoder_id_(0) {
- // TODO(jiesun): move this time consuming stuff out of here.
- IntializeGpuVideoService();
-}
-GpuVideoService::~GpuVideoService() {
- // TODO(jiesun): move this time consuming stuff out of here.
- UnintializeGpuVideoService();
-}
-
-void GpuVideoService::OnChannelConnected(int32 peer_pid) {
- LOG(ERROR) << "GpuVideoService::OnChannelConnected";
-}
-
-void GpuVideoService::OnChannelError() {
- LOG(ERROR) << "GpuVideoService::OnChannelError";
-}
-
-void GpuVideoService::OnMessageReceived(const IPC::Message& msg) {
-#if 0
- IPC_BEGIN_MESSAGE_MAP(GpuVideoService, msg)
- IPC_MESSAGE_UNHANDLED_ERROR()
- IPC_END_MESSAGE_MAP()
-#endif
-}
-
-bool GpuVideoService::IntializeGpuVideoService() {
- return true;
-}
-
-bool GpuVideoService::UnintializeGpuVideoService() {
- return true;
-}
-
-bool GpuVideoService::CreateVideoDecoder(
- GpuChannel* channel,
- MessageRouter* router,
- GpuVideoDecoderInfoParam* param) {
- // TODO(jiesun): find a better way to determine which GpuVideoDecoder
- // to return on current platform.
-#if defined(OS_WIN)
- GpuVideoDecoderInfo decoder_info;
- int32 decoder_id = GetNextAvailableDecoderID();
- param->decoder_id_ = decoder_id;
- base::ProcessHandle handle = channel->renderer_handle();
- decoder_info.decoder_ = new GpuVideoDecoderMFT(param, channel, handle);
- decoder_info.channel_ = channel;
- decoder_info.param = *param;
- decoder_map_[decoder_id] = decoder_info;
- router->AddRoute(param->decoder_route_id_, decoder_info.decoder_);
- return true;
-#else
- return false;
-#endif
-}
-
-void GpuVideoService::DestroyVideoDecoder(
- MessageRouter* router,
- int32 decoder_id) {
- int32 route_id = decoder_map_[decoder_id].param.decoder_route_id_;
- router->RemoveRoute(route_id);
- decoder_map_.erase(decoder_id);
-}
-
-int32 GpuVideoService::GetNextAvailableDecoderID() {
- return ++next_available_decoder_id_;
-}
-
« no previous file with comments | « chrome/gpu/gpu_video_service.h ('k') | chrome/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698