OLD | NEW |
1 // Copyright (c) 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 // Stand alone media player application used for testing the media library. | 5 // Stand alone media player application used for testing the media library. |
6 | 6 |
7 #include "media/tools/player_wtl/player_wtl.h" | 7 #include "media/tools/player_wtl/player_wtl.h" |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "media/base/pipeline_impl.h" | 11 #include "media/base/pipeline_impl.h" |
(...skipping 12 matching lines...) Expand all Loading... |
24 | 24 |
25 CAppModule g_module; | 25 CAppModule g_module; |
26 | 26 |
27 int Run(wchar_t* win_cmd_line, int cmd_show) { | 27 int Run(wchar_t* win_cmd_line, int cmd_show) { |
28 base::AtExitManager exit_manager; | 28 base::AtExitManager exit_manager; |
29 | 29 |
30 // Windows version of Init uses OS to fetch command line. | 30 // Windows version of Init uses OS to fetch command line. |
31 CommandLine::Init(0, NULL); | 31 CommandLine::Init(0, NULL); |
32 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 32 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
33 | 33 |
34 const std::vector<std::wstring>& filenames = cmd_line->args(); | 34 const CommandLine::StringVector& filenames = cmd_line->GetArgs(); |
35 | 35 |
36 CMessageLoop the_loop; | 36 CMessageLoop the_loop; |
37 g_module.AddMessageLoop(&the_loop); | 37 g_module.AddMessageLoop(&the_loop); |
38 | 38 |
39 CMainFrame wnd_main; | 39 CMainFrame wnd_main; |
40 if (wnd_main.CreateEx() == NULL) { | 40 if (wnd_main.CreateEx() == NULL) { |
41 DCHECK(false) << "Main window creation failed!"; | 41 DCHECK(false) << "Main window creation failed!"; |
42 return 0; | 42 return 0; |
43 } | 43 } |
44 | 44 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 double player_time_end = GetTime(); | 84 double player_time_end = GetTime(); |
85 char outputbuf[512]; | 85 char outputbuf[512]; |
86 _snprintf_s(outputbuf, sizeof(outputbuf), | 86 _snprintf_s(outputbuf, sizeof(outputbuf), |
87 "player time %5.2f ms\n", | 87 "player time %5.2f ms\n", |
88 player_time_end - player_time_start); | 88 player_time_end - player_time_start); |
89 OutputDebugStringA(outputbuf); | 89 OutputDebugStringA(outputbuf); |
90 printf("%s", outputbuf); | 90 printf("%s", outputbuf); |
91 #endif | 91 #endif |
92 return result; | 92 return result; |
93 } | 93 } |
OLD | NEW |