summaryrefslogtreecommitdiffstats
path: root/media/player
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 19:44:05 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 19:44:05 +0000
commitf31751e08e747f0ffc0ae1602b38f41c37b2f406 (patch)
treeffd248e2a0f6c0c4ee6c21b73ef069fe90d72dd0 /media/player
parent1b8f411d2daf5212f678ea1493b6bd5416d0c8ad (diff)
downloadchromium_src-f31751e08e747f0ffc0ae1602b38f41c37b2f406.zip
chromium_src-f31751e08e747f0ffc0ae1602b38f41c37b2f406.tar.gz
chromium_src-f31751e08e747f0ffc0ae1602b38f41c37b2f406.tar.bz2
Fix messy includes in media\player.
This should never have been checked-in as-is. TEST=still compiles BUG=none Review URL: http://codereview.chromium.org/193007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/player')
-rw-r--r--media/player/list.h6
-rw-r--r--media/player/mainfrm.h17
-rw-r--r--media/player/movie.cc8
-rw-r--r--media/player/movie.h3
-rw-r--r--media/player/player_wtl.cc62
-rw-r--r--media/player/player_wtl.h28
-rw-r--r--media/player/props.h10
-rw-r--r--media/player/seek.h7
-rw-r--r--media/player/stdafx.cc13
-rw-r--r--media/player/stdafx.h29
-rw-r--r--media/player/view.h27
-rw-r--r--media/player/wtl_renderer.cc3
12 files changed, 65 insertions, 148 deletions
diff --git a/media/player/list.h b/media/player/list.h
index bf93913..ee0be75 100644
--- a/media/player/list.h
+++ b/media/player/list.h
@@ -2,11 +2,12 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-// list.h : class for Recent Files list
-
#ifndef MEDIA_PLAYER_LIST_H_
#define MEDIA_PLAYER_LIST_H_
+#include "media/player/player_wtl.h"
+
+// Recent Files list.
class CMruList : public CWindowImpl<CMruList, CListBox> {
public:
@@ -124,4 +125,3 @@ class CMruList : public CWindowImpl<CMruList, CListBox> {
};
#endif // MEDIA_PLAYER_LIST_H_
-
diff --git a/media/player/mainfrm.h b/media/player/mainfrm.h
index a334fec..6f430cb4 100644
--- a/media/player/mainfrm.h
+++ b/media/player/mainfrm.h
@@ -2,20 +2,24 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-// MainFrm.h : interface of the CMainFrame class
-// This file is in Microsoft coding style
-
#ifndef MEDIA_PLAYER_MAINFRM_H_
#define MEDIA_PLAYER_MAINFRM_H_
+#include "media/player/list.h"
+#include "media/player/props.h"
+#include "media/player/seek.h"
+#include "media/player/view.h"
+
const int POPUP_MENU_POSITION = 0;
const int FILE_MENU_POSITION = 0;
const int RECENT_MENU_POSITION = 6;
-const wchar_t g_lpcstrMRURegKey[] = L"Software\\Google\\Video\\MediaPlayer";
-const wchar_t g_lpcstrApp[] = L"MediaPlayer";
-
+const wchar_t* const g_lpcstrMRURegKey =
+ L"Software\\Google\\Video\\MediaPlayer";
+const wchar_t* const g_lpcstrApp = L"MediaPlayer";
+// Interface of the CMainFrame class
+// TODO(fbarchard): Remove hungarian notation.
class CMainFrame : public CFrameWindowImpl<CMainFrame>,
public CUpdateUI<CMainFrame>,
public CMessageFilter, public CIdleHandler,
@@ -712,4 +716,3 @@ class CMainFrame : public CFrameWindowImpl<CMainFrame>,
};
#endif // MEDIA_PLAYER_MAINFRM_H_
-
diff --git a/media/player/movie.cc b/media/player/movie.cc
index fbd208f..8589956 100644
--- a/media/player/movie.cc
+++ b/media/player/movie.cc
@@ -2,9 +2,9 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-#include "base/at_exit.h"
+#include "media/player/movie.h"
+
#include "base/string_util.h"
-#include "media/base/factory.h"
#include "media/base/pipeline_impl.h"
#include "media/filters/audio_renderer_impl.h"
#include "media/filters/ffmpeg_audio_decoder.h"
@@ -12,11 +12,7 @@
#include "media/filters/ffmpeg_video_decoder.h"
#include "media/filters/file_data_source.h"
#include "media/filters/null_audio_renderer.h"
-#include "media/player/movie.h"
-#include "media/player/stdafx.h"
#include "media/player/wtl_renderer.h"
-// view.h must come after wtl_renderer.h.
-#include "media/player/view.h"
using media::AudioRendererImpl;
using media::FFmpegAudioDecoder;
diff --git a/media/player/movie.h b/media/player/movie.h
index 7c0b034..8bbbc68 100644
--- a/media/player/movie.h
+++ b/media/player/movie.h
@@ -7,7 +7,7 @@
#ifndef MEDIA_PLAYER_MOVIE_H_
#define MEDIA_PLAYER_MOVIE_H_
-#include <tchar.h>
+#include "media/player/player_wtl.h"
#include "base/scoped_ptr.h"
#include "base/singleton.h"
@@ -96,4 +96,3 @@ class Movie : public Singleton<Movie> {
} // namespace media
#endif // MEDIA_PLAYER_MOVIE_H_
-
diff --git a/media/player/player_wtl.cc b/media/player/player_wtl.cc
index 0b31c21..70f31c8 100644
--- a/media/player/player_wtl.cc
+++ b/media/player/player_wtl.cc
@@ -4,77 +4,24 @@
// Stand alone media player application used for testing the media library.
-// ATL compatibility with Chrome build settings.
-#undef NOMINMAX
-#undef WIN32_LEAN_AND_MEAN
-
-#undef min
-#undef max
-#define NOMINMAX
-
-// Note this header must come before other ATL headers.
-#include "media/player/stdafx.h"
-#include <atlcrack.h> // NOLINT
-#include <atlctrls.h> // NOLINT
-#include <atlctrlw.h> // NOLINT
-#include <atldlgs.h> // NOLINT
-#include <atlframe.h> // NOLINT
-#include <atlmisc.h> // NOLINT
-#include <atlprint.h> // NOLINT
-#include <atlscrl.h> // NOLINT
+#include "media/player/player_wtl.h"
#include "base/at_exit.h"
-#include "base/basictypes.h"
#include "base/command_line.h"
-#include "base/file_path.h"
-#include "base/logging.h"
-#include "base/string_util.h"
-#include "base/time.h"
-
-// Note these headers are order sensitive.
-#include "media/base/factory.h"
#include "media/base/pipeline_impl.h"
-#include "media/player/movie.h"
-#include "media/player/resource.h"
-#include "media/player/wtl_renderer.h"
-#include "media/player/view.h"
-#include "media/player/props.h"
-#include "media/player/seek.h"
-#include "media/player/list.h"
-#include "media/player/mainfrm.h"
-
-// Note these headers are NOT order sensitive.
#include "media/filters/audio_renderer_impl.h"
#include "media/filters/ffmpeg_audio_decoder.h"
#include "media/filters/ffmpeg_demuxer.h"
#include "media/filters/ffmpeg_video_decoder.h"
#include "media/filters/file_data_source.h"
+#include "media/player/mainfrm.h"
-// Enable timing code by turning on TESTING macro.
-// #define TESTING 1
-
-#ifdef TESTING
-#define _CRT_SECURE_NO_WARNINGS
-#include <windows.h> // NOLINT
-#include <stdio.h> // NOLINT
-#include <process.h> // NOLINT
-#include <string.h> // NOLINT
-
-// Fetch current time as milliseconds.
-// Return as double for high duration and precision.
-static inline double GetTime() {
- LARGE_INTEGER perf_time, perf_hz;
- QueryPerformanceFrequency(&perf_hz); // May change with speed step.
- QueryPerformanceCounter(&perf_time);
- return perf_time.QuadPart * 1000.0 / perf_hz.QuadPart; // Convert to ms.
-}
-#endif
+// See player_wtl.h to enable timing code by turning on TESTING macro.
namespace switches {
-const wchar_t kExit[] = L"exit";
+const wchar_t* const kExit = L"exit";
} // namespace switches
-
CAppModule g_module;
int Run(wchar_t* win_cmd_line, int cmd_show) {
@@ -144,4 +91,3 @@ int WINAPI _tWinMain(HINSTANCE instance, HINSTANCE /*previous_instance*/,
#endif
return result;
}
-
diff --git a/media/player/player_wtl.h b/media/player/player_wtl.h
new file mode 100644
index 0000000..d25e7e8
--- /dev/null
+++ b/media/player/player_wtl.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Stand alone media player application used for testing the media library.
+
+#ifndef MEDIA_PLAYER_PLAYER_WTL_H_
+#define MEDIA_PLAYER_PLAYER_WTL_H_
+
+// Enable timing code by turning on TESTING macro.
+//#define TESTING 1
+
+// ATL and WTL require order dependent includes.
+#include <atlbase.h> // NOLINT
+#include <atlapp.h> // NOLINT
+#include <atlcrack.h> // NOLINT
+#include <atlctrls.h> // NOLINT
+#include <atlctrlw.h> // NOLINT
+#include <atldlgs.h> // NOLINT
+#include <atlframe.h> // NOLINT
+#include <atlmisc.h> // NOLINT
+#include <atlscrl.h> // NOLINT
+#include <winspool.h> // NOLINT
+#include <atlprint.h> // NOLINT
+
+extern CAppModule g_module;
+
+#endif // MEDIA_PLAYER_PLAYER_WTL_H_
diff --git a/media/player/props.h b/media/player/props.h
index 6545343..5421065 100644
--- a/media/player/props.h
+++ b/media/player/props.h
@@ -2,12 +2,15 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-// props.h : movie properties dialog
-// TODO(fbarchard): Remove hungarian notation.
-
#ifndef MEDIA_PLAYER_PROPS_H_
#define MEDIA_PLAYER_PROPS_H_
+#include "media/player/movie.h"
+
+#include "resource.h"
+
+// Movie properties dialog
+// TODO(fbarchard): Remove hungarian notation.
class CFileName : public CWindowImpl<CFileName> {
public:
@@ -321,4 +324,3 @@ class CBmpProperties : public CPropertySheetImpl<CBmpProperties> {
};
#endif // MEDIA_PLAYER_PROPS_H_
-
diff --git a/media/player/seek.h b/media/player/seek.h
index 1899ce0..b9adc85 100644
--- a/media/player/seek.h
+++ b/media/player/seek.h
@@ -2,18 +2,18 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-// seek.h : movie seek dialog
-
#ifndef MEDIA_PLAYER_SEEK_H_
#define MEDIA_PLAYER_SEEK_H_
+#include "media/player/player_wtl.h"
+
+// Movie seek dialog.
// TODO(fbachard): Frame properties only work for images, so
// this tab is removed until movie frame properties can be added.
class CSeek : public CSimpleDialog<IDD_SEEK>,
public CMessageFilter,
public CIdleHandler {
public:
-
CSeek() {
}
@@ -95,4 +95,3 @@ class CSeek : public CSimpleDialog<IDD_SEEK>,
};
#endif // MEDIA_PLAYER_SEEK_H_
-
diff --git a/media/player/stdafx.cc b/media/player/stdafx.cc
deleted file mode 100644
index 18bba53..0000000
--- a/media/player/stdafx.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-// stdafx.cpp : Source file that includes just the standard includes.
-// This file is in Microsoft coding style.
-
-#include "media/player/stdafx.h"
-
-#if (_ATL_VER < 0x0700)
-#include <atlimpl.cpp>
-#endif
-
diff --git a/media/player/stdafx.h b/media/player/stdafx.h
deleted file mode 100644
index a82c783..0000000
--- a/media/player/stdafx.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-// stdafx.h : Include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently.
-// This file is in Microsoft coding style.
-
-#ifndef MEDIA_PLAYER_STDAFX_H_
-#define MEDIA_PLAYER_STDAFX_H_
-
-// Change these values to use different versions.
-#define _RICHEDIT_VER 0x0100
-
-#pragma warning(disable: 4996)
-// warning C4996: '_vswprintf': This function or variable may be unsafe.
-// Consider using vswprintf_s instead. To disable deprecation,
-// use _CRT_SECURE_NO_WARNINGS. See online help for details.
-
-#include <atlbase.h>
-#include <atlapp.h>
-
-extern CAppModule g_module;
-
-#include <atlwin.h>
-
-#endif // MEDIA_PLAYER_STDAFX_H_
-
diff --git a/media/player/view.h b/media/player/view.h
index 8a87dbb..040a3cf 100644
--- a/media/player/view.h
+++ b/media/player/view.h
@@ -2,44 +2,30 @@
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
-// View.h : Paints the current movie frame (with scaling) to the display.
-// TODO(fbarchard): Consider rewriting as view.cc and view.h
-
#ifndef MEDIA_PLAYER_VIEW_H_
#define MEDIA_PLAYER_VIEW_H_
-// Enable timing code by turning on TESTING macro.
-// #define TESTING 1
-
-#ifdef TESTING
-#define _CRT_SECURE_NO_WARNINGS
-#include <windows.h>
#include <stdio.h>
#include <process.h>
#include <string.h>
-#endif
-#include <atlscrl.h>
-
-#include "base/basictypes.h"
#include "media/base/buffers.h"
-#include "media/base/factory.h"
-#include "media/base/filters.h"
#include "media/base/yuv_convert.h"
#include "media/player/movie.h"
+#include "media/player/player_wtl.h"
#include "media/player/wtl_renderer.h"
-#ifdef TESTING
-// Fetch current time as milliseconds.
-// Return as double for high duration and precision.
-static inline double GetTime() {
+// Fetchs current time as milliseconds.
+// Returns as double for high duration and precision.
+inline double GetTime() {
LARGE_INTEGER perf_time, perf_hz;
QueryPerformanceFrequency(&perf_hz); // May change with speed step.
QueryPerformanceCounter(&perf_time);
return perf_time.QuadPart * 1000.0 / perf_hz.QuadPart; // Convert to ms.
}
-#endif
+// Paints the current movie frame (with scaling) to the display.
+// TODO(fbarchard): Consider rewriting as view.cc and view.h
class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
public:
DECLARE_WND_CLASS_EX(NULL, 0, -1)
@@ -432,4 +418,3 @@ class WtlVideoWindow : public CScrollWindowImpl<WtlVideoWindow> {
};
#endif // MEDIA_PLAYER_VIEW_H_
-
diff --git a/media/player/wtl_renderer.cc b/media/player/wtl_renderer.cc
index f7d87fa..bef8e69 100644
--- a/media/player/wtl_renderer.cc
+++ b/media/player/wtl_renderer.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "media/player/stdafx.h"
+#include "media/player/wtl_renderer.h"
+
#include "media/player/view.h"
WtlVideoRenderer::WtlVideoRenderer(WtlVideoWindow* window)