DirectVobSub.h

00001 /* 
00002  *      Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 #pragma once
00023 
00024 #include "IDirectVobSub.h"
00025 #include "..\..\..\..\include\IFilterVersion.h"
00026 
00027 class CDirectVobSub : public IDirectVobSub2, public IFilterVersion
00028 {
00029 protected:
00030         CDirectVobSub();
00031         virtual ~CDirectVobSub();
00032 
00033 protected:
00034     CCritSec m_propsLock;
00035 
00036         CString m_FileName;
00037         int m_iSelectedLanguage;
00038         bool m_fHideSubtitles;
00039         bool m_fDoPreBuffering;
00040         bool m_fOverridePlacement;
00041         int     m_PlacementXperc, m_PlacementYperc;
00042         bool m_fBufferVobSub, m_fOnlyShowForcedVobSubs, m_fPolygonize;
00043 
00044         STSStyle m_defStyle;
00045 
00046         bool m_fAdvancedRenderer;
00047         bool m_fFlipPicture, m_fFlipSubtitles;
00048         bool m_fOSD;
00049         int m_nReloaderDisableCount;
00050         int m_SubtitleDelay, m_SubtitleSpeedMul, m_SubtitleSpeedDiv;
00051         bool m_fMediaFPSEnabled;
00052         double m_MediaFPS;
00053         bool m_fSaveFullPath;
00054         NORMALIZEDRECT m_ZoomRect;
00055 
00056         CComPtr<ISubClock> m_pSubClock;
00057         bool m_fForced;
00058 
00059 public:
00060 
00061         // IDirectVobSub
00062 
00063     STDMETHODIMP get_FileName(WCHAR* fn);
00064     STDMETHODIMP put_FileName(WCHAR* fn);
00065         STDMETHODIMP get_LanguageCount(int* nLangs);
00066         STDMETHODIMP get_LanguageName(int iLanguage, WCHAR** ppName);
00067         STDMETHODIMP get_SelectedLanguage(int* iSelected);
00068         STDMETHODIMP put_SelectedLanguage(int iSelected);
00069         STDMETHODIMP get_HideSubtitles(bool* fHideSubtitles);
00070     STDMETHODIMP put_HideSubtitles(bool fHideSubtitles);
00071     STDMETHODIMP get_PreBuffering(bool* fDoPreBuffering);
00072     STDMETHODIMP put_PreBuffering(bool fDoPreBuffering);
00073     STDMETHODIMP get_Placement(bool* fOverridePlacement, int* xperc, int* yperc);
00074     STDMETHODIMP put_Placement(bool fOverridePlacement, int xperc, int yperc);
00075     STDMETHODIMP get_VobSubSettings(bool* fBuffer, bool* fOnlyShowForcedSubs, bool* fPolygonize);
00076     STDMETHODIMP put_VobSubSettings(bool fBuffer, bool fOnlyShowForcedSubs, bool fPolygonize);
00077     STDMETHODIMP get_TextSettings(void* lf, int lflen, COLORREF* color, bool* fShadow, bool* fOutline, bool* fAdvancedRenderer);
00078     STDMETHODIMP put_TextSettings(void* lf, int lflen, COLORREF color, bool fShadow, bool fOutline, bool fAdvancedRenderer);
00079     STDMETHODIMP get_Flip(bool* fPicture, bool* fSubtitles);
00080     STDMETHODIMP put_Flip(bool fPicture, bool fSubtitles);
00081     STDMETHODIMP get_OSD(bool* fShowOSD);
00082     STDMETHODIMP put_OSD(bool fShowOSD);
00083         STDMETHODIMP get_SaveFullPath(bool* fSaveFullPath);
00084         STDMETHODIMP put_SaveFullPath(bool fSaveFullPath);
00085     STDMETHODIMP get_SubtitleTiming(int* delay, int* speedmul, int* speeddiv);
00086     STDMETHODIMP put_SubtitleTiming(int delay, int speedmul, int speeddiv);
00087     STDMETHODIMP get_MediaFPS(bool* fEnabled, double* fps);
00088     STDMETHODIMP put_MediaFPS(bool fEnabled, double fps);
00089         STDMETHODIMP get_ZoomRect(NORMALIZEDRECT* rect);
00090     STDMETHODIMP put_ZoomRect(NORMALIZEDRECT* rect);
00091         STDMETHODIMP get_ColorFormat(int* iPosition) {return E_NOTIMPL;}
00092     STDMETHODIMP put_ColorFormat(int iPosition) {return E_NOTIMPL;}
00093 
00094         STDMETHODIMP UpdateRegistry();
00095 
00096         STDMETHODIMP HasConfigDialog(int iSelected);
00097         STDMETHODIMP ShowConfigDialog(int iSelected, HWND hWndParent);
00098 
00099         // settings for the rest are stored in the registry
00100 
00101         STDMETHODIMP IsSubtitleReloaderLocked(bool* fLocked);
00102     STDMETHODIMP LockSubtitleReloader(bool fLock);
00103         STDMETHODIMP get_SubtitleReloader(bool* fDisabled);
00104     STDMETHODIMP put_SubtitleReloader(bool fDisable);
00105 
00106         // the followings need a partial or full reloading of the filter
00107 
00108         STDMETHODIMP get_ExtendPicture(int* horizontal, int* vertical, int* resx2, int* resx2minw, int* resx2minh);
00109         STDMETHODIMP put_ExtendPicture(int horizontal, int vertical, int resx2, int resx2minw, int resx2minh);
00110         STDMETHODIMP get_LoadSettings(int* level, bool* fExternalLoad, bool* fWebLoad, bool* fEmbeddedLoad);
00111         STDMETHODIMP put_LoadSettings(int level, bool fExternalLoad, bool fWebLoad, bool fEmbeddedLoad);
00112 
00113         // IDirectVobSub2
00114 
00115         STDMETHODIMP AdviseSubClock(ISubClock* pSubClock);
00116         STDMETHODIMP_(bool) get_Forced();
00117         STDMETHODIMP put_Forced(bool fForced);
00118     STDMETHODIMP get_TextSettings(STSStyle* pDefStyle);
00119     STDMETHODIMP put_TextSettings(STSStyle* pDefStyle);
00120 
00121         // IFilterVersion
00122         
00123         STDMETHODIMP_(DWORD) GetFilterVersion();
00124 };

Generated on Tue Dec 13 14:47:51 2005 for guliverkli by  doxygen 1.4.5