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

Side by Side Diff: content/common/gpu/media/omx_video_decode_accelerator.cc

Issue 11225045: Move a bunch of content\common code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/media/omx_video_decode_accelerator.h" 5 #include "content/common/gpu/media/omx_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "content/common/gpu/gpu_channel.h" 12 #include "content/common/gpu/gpu_channel.h"
13 #include "content/common/gpu/media/gles2_texture_to_egl_image_translator.h" 13 #include "content/common/gpu/media/gles2_texture_to_egl_image_translator.h"
14 #include "media/base/bitstream_buffer.h" 14 #include "media/base/bitstream_buffer.h"
15 #include "media/video/picture.h" 15 #include "media/video/picture.h"
16 16
17 namespace content {
18
17 // Helper typedef for input buffers. This is used as the pAppPrivate field of 19 // Helper typedef for input buffers. This is used as the pAppPrivate field of
18 // OMX_BUFFERHEADERTYPEs of input buffers, to point to the data associated with 20 // OMX_BUFFERHEADERTYPEs of input buffers, to point to the data associated with
19 // them. 21 // them.
20 typedef std::pair<scoped_ptr<base::SharedMemory>, int32> SharedMemoryAndId; 22 typedef std::pair<scoped_ptr<base::SharedMemory>, int32> SharedMemoryAndId;
21 23
22 enum { kNumPictureBuffers = 8 }; 24 enum { kNumPictureBuffers = 8 };
23 25
24 // Delay between polling for texture sync status. 5ms feels like a good 26 // Delay between polling for texture sync status. 5ms feels like a good
25 // compromise, allowing some decoding ahead (up to 3 frames/vsync) to compensate 27 // compromise, allowing some decoding ahead (up to 3 frames/vsync) to compensate
26 // for more difficult frames. 28 // for more difficult frames.
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 1249
1248 bool OmxVideoDecodeAccelerator::SendCommandToPort( 1250 bool OmxVideoDecodeAccelerator::SendCommandToPort(
1249 OMX_COMMANDTYPE cmd, int port_index) { 1251 OMX_COMMANDTYPE cmd, int port_index) {
1250 DCHECK_EQ(message_loop_, MessageLoop::current()); 1252 DCHECK_EQ(message_loop_, MessageLoop::current());
1251 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_, 1253 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
1252 cmd, port_index, 0); 1254 cmd, port_index, 0);
1253 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd, 1255 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd,
1254 PLATFORM_FAILURE, false); 1256 PLATFORM_FAILURE, false);
1255 return true; 1257 return true;
1256 } 1258 }
1259
1260 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/omx_video_decode_accelerator.h ('k') | content/common/gpu/media/rendering_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698