OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const wchar_t* url = filenames[0].c_str(); | 48 const wchar_t* url = filenames[0].c_str(); |
49 wnd_main.MovieOpenFile(url); | 49 wnd_main.MovieOpenFile(url); |
50 } | 50 } |
51 | 51 |
52 if (cmd_line->HasSwitch(switches::kExit)) { | 52 if (cmd_line->HasSwitch(switches::kExit)) { |
53 wnd_main.OnOptionsExit(0, 0, 0); | 53 wnd_main.OnOptionsExit(0, 0, 0); |
54 } | 54 } |
55 | 55 |
56 int result = the_loop.Run(); | 56 int result = the_loop.Run(); |
57 | 57 |
58 media::Movie::get()->Close(); | 58 media::Movie::GetInstance()->Close(); |
59 | 59 |
60 g_module.RemoveMessageLoop(); | 60 g_module.RemoveMessageLoop(); |
61 return result; | 61 return result; |
62 } | 62 } |
63 | 63 |
64 int WINAPI _tWinMain(HINSTANCE instance, HINSTANCE /*previous_instance*/, | 64 int WINAPI _tWinMain(HINSTANCE instance, HINSTANCE /*previous_instance*/, |
65 wchar_t* cmd_line, int cmd_show) { | 65 wchar_t* cmd_line, int cmd_show) { |
66 #ifdef TESTING | 66 #ifdef TESTING |
67 double player_time_start = GetTime(); | 67 double player_time_start = GetTime(); |
68 #endif | 68 #endif |
(...skipping 15 matching lines...) Expand all 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 |