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

Side by Side Diff: media/omx/omx_unittest.cc

Issue 6628020: Cleaning up src/media to be consistent with static versus anonymous namespaces. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: fix namespaces Created 9 years, 9 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) 2009-2010 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/synchronization/waitable_event.h" 7 #include "base/synchronization/waitable_event.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/openmax/il/OMX_Component.h" 9 #include "third_party/openmax/il/OMX_Component.h"
10 #include "third_party/openmax/il/OMX_Core.h" 10 #include "third_party/openmax/il/OMX_Core.h"
11 11
12 namespace { 12 namespace media {
13 13
14 // Defines the maximum number of buffers created for I/O ports. 14 // Defines the maximum number of buffers created for I/O ports.
15 const int kMaxBufferNum = 256; 15 static const int kMaxBufferNum = 256;
16 16
17 template <typename T> 17 template <typename T>
18 static void ResetHeader(T* param) { 18 static void ResetHeader(T* param) {
19 memset(param, 0, sizeof(T)); 19 memset(param, 0, sizeof(T));
20 // TODO(hclam): Make this version number configurable. 20 // TODO(hclam): Make this version number configurable.
21 param->nVersion.nVersion = 0x00000101; 21 param->nVersion.nVersion = 0x00000101;
22 param->nSize = sizeof(T); 22 param->nSize = sizeof(T);
23 } 23 }
24 24
25 } // namespace
26
27 namespace media {
28
29 class OmxTest : public testing::Test { 25 class OmxTest : public testing::Test {
30 public: 26 public:
31 OmxTest() 27 OmxTest()
32 : handle_(NULL), 28 : handle_(NULL),
33 event_(false, false), 29 event_(false, false),
34 empty_buffer_(false, false), 30 empty_buffer_(false, false),
35 fill_buffer_(false, false), 31 fill_buffer_(false, false),
36 last_event_type_(OMX_EventMax), 32 last_event_type_(OMX_EventMax),
37 last_event_data1_(0), 33 last_event_data1_(0),
38 last_event_data2_(0) { 34 last_event_data2_(0) {
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // Then configure the component as usual. 412 // Then configure the component as usual.
417 Configure(codec(), 1024, 768); 413 Configure(codec(), 1024, 768);
418 TransitionLoadedToIdle(); 414 TransitionLoadedToIdle();
419 TransitionIdleToExecuting(); 415 TransitionIdleToExecuting();
420 TransitionExecutingToIdle(); 416 TransitionExecutingToIdle();
421 TransitionIdleToLoaded(); 417 TransitionIdleToLoaded();
422 DeinitComponent(); 418 DeinitComponent();
423 } 419 }
424 420
425 } // namespace media 421 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698