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

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

Issue 10958060: OMX: Increase the number of picture buffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Helper typedef for input buffers. This is used as the pAppPrivate field of 17 // 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 18 // OMX_BUFFERHEADERTYPEs of input buffers, to point to the data associated with
19 // them. 19 // them.
20 typedef std::pair<scoped_ptr<base::SharedMemory>, int32> SharedMemoryAndId; 20 typedef std::pair<scoped_ptr<base::SharedMemory>, int32> SharedMemoryAndId;
21 21
22 enum { kNumPictureBuffers = 4 }; 22 enum { kNumPictureBuffers = 8 };
23 23
24 void* omx_handle = NULL; 24 void* omx_handle = NULL;
25 25
26 typedef OMX_ERRORTYPE (*OMXInit)(); 26 typedef OMX_ERRORTYPE (*OMXInit)();
27 typedef OMX_ERRORTYPE (*OMXGetHandle)( 27 typedef OMX_ERRORTYPE (*OMXGetHandle)(
28 OMX_HANDLETYPE*, OMX_STRING, OMX_PTR, OMX_CALLBACKTYPE*); 28 OMX_HANDLETYPE*, OMX_STRING, OMX_PTR, OMX_CALLBACKTYPE*);
29 typedef OMX_ERRORTYPE (*OMXGetComponentsOfRole)(OMX_STRING, OMX_U32*, OMX_U8**); 29 typedef OMX_ERRORTYPE (*OMXGetComponentsOfRole)(OMX_STRING, OMX_U32*, OMX_U8**);
30 typedef OMX_ERRORTYPE (*OMXFreeHandle)(OMX_HANDLETYPE); 30 typedef OMX_ERRORTYPE (*OMXFreeHandle)(OMX_HANDLETYPE);
31 typedef OMX_ERRORTYPE (*OMXDeinit)(); 31 typedef OMX_ERRORTYPE (*OMXDeinit)();
32 32
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1129
1130 bool OmxVideoDecodeAccelerator::SendCommandToPort( 1130 bool OmxVideoDecodeAccelerator::SendCommandToPort(
1131 OMX_COMMANDTYPE cmd, int port_index) { 1131 OMX_COMMANDTYPE cmd, int port_index) {
1132 DCHECK_EQ(message_loop_, MessageLoop::current()); 1132 DCHECK_EQ(message_loop_, MessageLoop::current());
1133 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_, 1133 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
1134 cmd, port_index, 0); 1134 cmd, port_index, 0);
1135 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd, 1135 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd,
1136 PLATFORM_FAILURE, false); 1136 PLATFORM_FAILURE, false);
1137 return true; 1137 return true;
1138 } 1138 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698