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

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

Issue 10869065: Return immediately after NOTREACHED()'s to avoid logspam. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 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"
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 case INITIALIZING: 873 case INITIALIZING:
874 switch (reached) { 874 switch (reached) {
875 case OMX_StateIdle: 875 case OMX_StateIdle:
876 OnReachedIdleInInitializing(); 876 OnReachedIdleInInitializing();
877 return; 877 return;
878 case OMX_StateExecuting: 878 case OMX_StateExecuting:
879 OnReachedExecutingInInitializing(); 879 OnReachedExecutingInInitializing();
880 return; 880 return;
881 default: 881 default:
882 NOTREACHED() << "Unexpected state in INITIALIZING: " << reached; 882 NOTREACHED() << "Unexpected state in INITIALIZING: " << reached;
883 return;
883 } 884 }
884 case RESETTING: 885 case RESETTING:
885 switch (reached) { 886 switch (reached) {
886 case OMX_StatePause: 887 case OMX_StatePause:
887 OnReachedPauseInResetting(); 888 OnReachedPauseInResetting();
888 return; 889 return;
889 case OMX_StateExecuting: 890 case OMX_StateExecuting:
890 OnReachedExecutingInResetting(); 891 OnReachedExecutingInResetting();
891 return; 892 return;
892 default: 893 default:
893 NOTREACHED() << "Unexpected state in RESETTING: " << reached; 894 NOTREACHED() << "Unexpected state in RESETTING: " << reached;
895 return;
894 } 896 }
895 case DESTROYING: 897 case DESTROYING:
896 switch (reached) { 898 switch (reached) {
897 case OMX_StatePause: 899 case OMX_StatePause:
898 case OMX_StateExecuting: 900 case OMX_StateExecuting:
899 // Because Destroy() can interrupt an in-progress Reset(), 901 // Because Destroy() can interrupt an in-progress Reset(),
900 // we might arrive at these states after current_state_change_ was 902 // we might arrive at these states after current_state_change_ was
901 // overwritten with DESTROYING. That's fine though - we already have 903 // overwritten with DESTROYING. That's fine though - we already have
902 // the state transition for Destroy() queued up at the component, so 904 // the state transition for Destroy() queued up at the component, so
903 // we treat this as a no-op. 905 // we treat this as a no-op.
904 return; 906 return;
905 case OMX_StateIdle: 907 case OMX_StateIdle:
906 OnReachedIdleInDestroying(); 908 OnReachedIdleInDestroying();
907 return; 909 return;
908 case OMX_StateLoaded: 910 case OMX_StateLoaded:
909 OnReachedLoadedInDestroying(); 911 OnReachedLoadedInDestroying();
910 return; 912 return;
911 default: 913 default:
912 NOTREACHED() << "Unexpected state in DESTROYING: " << reached; 914 NOTREACHED() << "Unexpected state in DESTROYING: " << reached;
915 return;
913 } 916 }
914 case ERRORING: 917 case ERRORING:
915 switch (reached) { 918 switch (reached) {
916 case OMX_StateInvalid: 919 case OMX_StateInvalid:
917 OnReachedInvalidInErroring(); 920 OnReachedInvalidInErroring();
918 return; 921 return;
919 default: 922 default:
920 NOTREACHED() << "Unexpected state in ERRORING: " << reached; 923 NOTREACHED() << "Unexpected state in ERRORING: " << reached;
924 return;
921 } 925 }
922 default: 926 default:
923 NOTREACHED() << "Unexpected state in " << current_state_change_ 927 NOTREACHED() << "Unexpected state in " << current_state_change_
924 << ": " << reached; 928 << ": " << reached;
925 } 929 }
926 } 930 }
927 931
928 void OmxVideoDecodeAccelerator::EventHandlerCompleteTask(OMX_EVENTTYPE event, 932 void OmxVideoDecodeAccelerator::EventHandlerCompleteTask(OMX_EVENTTYPE event,
929 OMX_U32 data1, 933 OMX_U32 data1,
930 OMX_U32 data2) { 934 OMX_U32 data2) {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 1103
1100 bool OmxVideoDecodeAccelerator::SendCommandToPort( 1104 bool OmxVideoDecodeAccelerator::SendCommandToPort(
1101 OMX_COMMANDTYPE cmd, int port_index) { 1105 OMX_COMMANDTYPE cmd, int port_index) {
1102 DCHECK_EQ(message_loop_, MessageLoop::current()); 1106 DCHECK_EQ(message_loop_, MessageLoop::current());
1103 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_, 1107 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
1104 cmd, port_index, 0); 1108 cmd, port_index, 0);
1105 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd, 1109 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd,
1106 PLATFORM_FAILURE, false); 1110 PLATFORM_FAILURE, false);
1107 return true; 1111 return true;
1108 } 1112 }
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