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

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

Issue 7200033: Fix crashes when loading gles2.cc on browser startup, and during playback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/stl_util-inl.h" 7 #include "base/stl_util-inl.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/media/gles2_texture_to_egl_image_translator.h" 10 #include "content/common/gpu/media/gles2_texture_to_egl_image_translator.h"
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 FlushIOPorts(); 482 FlushIOPorts();
483 } 483 }
484 484
485 void OmxVideoDecodeAccelerator::FlushIOPorts() { 485 void OmxVideoDecodeAccelerator::FlushIOPorts() {
486 // TODO(vhiremath@nvidia.com) review again for trick modes. 486 // TODO(vhiremath@nvidia.com) review again for trick modes.
487 VLOG(1) << "FlushIOPorts"; 487 VLOG(1) << "FlushIOPorts";
488 488
489 // Flush input port first. 489 // Flush input port first.
490 DCHECK(!on_flush_event_func_); 490 DCHECK(!on_flush_event_func_);
491 on_flush_event_func_ = &OmxVideoDecodeAccelerator::InputPortFlushDone; 491 on_flush_event_func_ = &OmxVideoDecodeAccelerator::InputPortFlushDone;
492 OMX_ERRORTYPE result; 492 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
493 result = OMX_SendCommand(component_handle_, 493 OMX_CommandFlush,
494 OMX_CommandFlush, 494 input_port_, 0);
495 input_port_, 0);
496 if (result != OMX_ErrorNone) { 495 if (result != OMX_ErrorNone) {
497 LOG(ERROR) << "OMX_SendCommand(OMX_CommandFlush) failed"; 496 LOG(ERROR) << "OMX_SendCommand(OMX_CommandFlush) failed";
498 StopOnError(); 497 StopOnError();
499 return; 498 return;
500 } 499 }
501 } 500 }
502 501
503 void OmxVideoDecodeAccelerator::InputPortFlushDone(int port) { 502 void OmxVideoDecodeAccelerator::InputPortFlushDone(int port) {
504 DCHECK_EQ(port, input_port_); 503 DCHECK_EQ(port, input_port_);
505 VLOG(1) << "Input Port has been flushed"; 504 VLOG(1) << "Input Port has been flushed";
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_, 1022 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
1024 cmd, port_index, 0); 1023 cmd, port_index, 0);
1025 if (result != OMX_ErrorNone) { 1024 if (result != OMX_ErrorNone) {
1026 LOG(ERROR) << "SendCommand() failed" << cmd << ":" << result; 1025 LOG(ERROR) << "SendCommand() failed" << cmd << ":" << result;
1027 StopOnError(); 1026 StopOnError();
1028 return; 1027 return;
1029 } 1028 }
1030 } 1029 }
1031 1030
1032 DISABLE_RUNNABLE_METHOD_REFCOUNT(OmxVideoDecodeAccelerator); 1031 DISABLE_RUNNABLE_METHOD_REFCOUNT(OmxVideoDecodeAccelerator);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698