From 2f31e009401121b71f03cc233aa2e6b360697fdb Mon Sep 17 00:00:00 2001 From: "fbarchard@chromium.org" Date: Tue, 5 May 2009 18:31:35 +0000 Subject: Media Player mainfrm.h This module contains all event handling for menus in the Media Player. The implementation is WTL (Windows Template Library) based. The main menu is: File Edit View Play Options Help File opens/closes movies and has print features. Edit has copy/paste features. View has spatial controls, such as scaling, and tool and status bars and a properties dialogue box. Play has temporal controls, such as play speed and pause. Options controls details such as Audio and Video on/off. Help is just an about box. Right clicking brings up a context menu with edit and view items. A tool bar exposes the most common menu items as buttons. Hotkeys (accelerators) are mapped to most menu items. A .RC file is used to edit the menus using the resource editor in visual studio. Dialogue boxes are each handled by a different .h. ie props.h for properties. Mainfrm.h does some minor dialogue boxes directly, such as the file selector and alert boxes for errors. Review URL: http://codereview.chromium.org/99087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15311 0039d316-1c4b-4281-b951-d872f2087c98 --- media/player/view.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'media/player/view.h') diff --git a/media/player/view.h b/media/player/view.h index 6d36c92..4c72512 100644 --- a/media/player/view.h +++ b/media/player/view.h @@ -27,6 +27,7 @@ #include "media/base/filters.h" #include "media/base/yuv_convert.h" #include "media/base/yuv_scale.h" +#include "media/player/movie.h" #include "media/player/wtl_renderer.h" #ifdef TESTING @@ -40,10 +41,6 @@ static inline double GetTime() { } #endif -extern bool g_enableswscaler; -extern bool g_enabledraw; -extern bool g_enabledump_yuv_file; - class WtlVideoWindow : public CScrollWindowImpl { public: DECLARE_WND_CLASS_EX(NULL, 0, -1) @@ -182,7 +179,8 @@ class WtlVideoWindow : public CScrollWindowImpl { } // Append each frame to end of file. - if (g_enabledump_yuv_file) { + bool enable_dump_yuv_file = media::Movie::get()->GetDumpYuvFileEnable(); + if (enable_dump_yuv_file) { DumpYUV(frame_in); } @@ -191,8 +189,10 @@ class WtlVideoWindow : public CScrollWindowImpl { double yuvtimestart = GetTime(); // Start timer. #endif - if (g_enabledraw) { - if (g_enableswscaler) { + bool enable_draw = media::Movie::get()->GetDrawEnable(); + if (enable_draw) { + bool enable_swscaler = media::Movie::get()->GetSwscalerEnable(); + if (enable_swscaler) { uint8* data_out[3]; int stride_out[3]; data_out[0] = movie_dib_bits; -- cgit v1.1