home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2004 March / PCWELT_3_2004.ISO / pcwsoft / flaskmpeg_078_39_src.z.exe / flaskmpeg / OutputPad.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-10-28  |  2.6 KB  |  90 lines

  1. /* 
  2.  *  OutputPad.cpp    -  Controls FlasKMPEG options
  3.  *
  4.  *    Copyright (C) Alberto Vigata - January 2000
  5.  *
  6.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  7.  *    
  8.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2, or (at your option)
  11.  *  any later version.
  12.  *   
  13.  *  FlasKMPEG is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *   
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with GNU Make; see the file COPYING.  If not, write to
  20.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  21.  *
  22.  */
  23.  
  24.  
  25. #ifndef OUTPUTPAD_H
  26. #define OUTPUTPAD_H
  27.  
  28. #include <windows.h>
  29. #include "PostProcessing.h"
  30. #include "flvideosink.h"
  31. #include "flppreceiver.h"
  32. #include "thread.h"
  33. #include "videorenderer.h"
  34. #include "canvas.h"
  35. #include "flcroppad.h"
  36. #include "flletterboxpad.h"
  37.  
  38. LRESULT CALLBACK DlgProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  39.  
  40. class COutputPadDlg : public FlVideoSink
  41. {
  42. public:
  43.   COutputPadDlg(HWND hParentWnd, HWND hMainControl, HINSTANCE hInst);
  44.   ~COutputPadDlg(){};
  45.  
  46.   // Opens the dialog
  47.   void SetWindows( HWND hParentWnd, HWND hMainControl );
  48.   bool Show(TPPost *pPPost, FlPPReceiver *ppRec );
  49.   bool Hide();
  50.   int PutFrame( CFrame *fr );
  51.  
  52. private:
  53.  
  54.   void SetupTooltips();
  55.   void PositionWindows(bool bExcludeOutputPad=false);
  56.   void EnableCrop();
  57.   void DisableCrop();
  58.   void EnableLetterbox();
  59.   void DisableLetterbox();
  60.   void UpdatePadButtons();
  61.   void Draw();
  62.   
  63.   friend LRESULT CALLBACK DlgProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  64.   friend LRESULT CALLBACK DisplayProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  65.   
  66.   LRESULT CALLBACK DisplayProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  67.   LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  68.  
  69.   bool m_bSettingsChanged;
  70.   HWND m_hDlg;
  71.   HWND m_hParentWnd, m_hDisplay, m_hMainControl;
  72.   HINSTANCE m_hInst;
  73.   FlPPReceiver *m_pReceiver;
  74.   int m_nFrameCount;
  75.  
  76.   TPPost pp, ppc;
  77.   FlPostProcess m_pp; // the post processing object
  78.  
  79.   CFlCritSec m_csGlobal;
  80.   CFrame frIn, frOut, frRgb;
  81.   CCanvas m_cv;
  82.  
  83.   FlLetterboxPad m_lp; // The letterbox pad
  84.   FlCropPad m_cp; // The crop pad
  85.  
  86.   CVideoRenderer *m_pVideoRenderer; // The video renderer
  87. };
  88.  
  89.  
  90. #endif