Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SettingsProp.h « LAVSplitter « demuxer - github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c7b630b503526a54f79a80d55ea0f060c041812f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 *      Copyright (C) 2010-2015 Hendrik Leppkes
 *      http://www.1f0.de
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#pragma once

#include "BaseDSPropPage.h"
#include "LAVSplitterSettingsInternal.h"


// GUID: a19de2f2-2f74-4927-8436-61129d26c141
DEFINE_GUID(CLSID_LAVSplitterSettingsProp, 0xa19de2f2, 0x2f74, 
  0x4927, 0x84, 0x36, 0x61, 0x12, 0x9d, 0x26, 0xc1, 0x41);

// {56904B22-091C-4459-A2E6-B1F4F946B55F}
DEFINE_GUID(CLSID_LAVSplitterFormatsProp,
  0x56904b22, 0x91c, 0x4459, 0xa2, 0xe6, 0xb1, 0xf4, 0xf9, 0x46, 0xb5, 0x5f);


class CLAVSplitterSettingsProp : public CBaseDSPropPage
{
public:
  CLAVSplitterSettingsProp(LPUNKNOWN pUnk, HRESULT* phr);
  virtual ~CLAVSplitterSettingsProp(void);

  HRESULT OnActivate();
  HRESULT OnConnect(IUnknown *pUnk);
  HRESULT OnDisconnect();
  HRESULT OnApplyChanges();
  INT_PTR OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

private:
  HRESULT LoadData();
  void UpdateSubtitleMode(LAVSubtitleMode mode);

  void SetDirty()
  {
    m_bDirty = TRUE;
    if (m_pPageSite)
    {
      m_pPageSite->OnStatusChange(PROPPAGESTATUS_DIRTY);
    }
  }

private:
  ILAVFSettingsInternal *m_pLAVF = nullptr;

  // Settings
  WCHAR *m_pszPrefLang     = nullptr;
  WCHAR *m_pszPrefSubLang  = nullptr;
  WCHAR *m_pszAdvSubConfig = nullptr;

  LAVSubtitleMode m_subtitleMode;
  BOOL m_PGSForcedStream;
  BOOL m_PGSOnlyForced;
  int m_VC1Mode;
  BOOL m_substreams;
  BOOL m_MKVExternal;

  BOOL m_StreamSwitchRemoveAudio;
  BOOL m_PreferHighQualityAudio;
  BOOL m_ImpairedAudio;
  DWORD m_QueueMaxMem;
  DWORD m_NetworkAnalysisDuration;

  BOOL m_TrayIcon;

  LAVSubtitleMode m_selectedSubMode;
  WCHAR m_subLangBuffer[256];
  WCHAR m_advSubBuffer[256];

  WCHAR stringBuffer[256];
};

class CLAVSplitterFormatsProp : public CBaseDSPropPage
{
public:
  CLAVSplitterFormatsProp(LPUNKNOWN pUnk, HRESULT* phr);
  virtual ~CLAVSplitterFormatsProp(void);

  HRESULT OnActivate();
  HRESULT OnConnect(IUnknown *pUnk);
  HRESULT OnDisconnect();
  HRESULT OnApplyChanges();
  INT_PTR OnReceiveMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

private:
  void SetDirty()
  {
    m_bDirty = TRUE;
    if (m_pPageSite)
    {
      m_pPageSite->OnStatusChange(PROPPAGESTATUS_DIRTY);
    }
  }

private:
  ILAVFSettingsInternal *m_pLAVF = nullptr;

  std::set<FormatInfo> m_Formats;
  BOOL *m_bFormats = nullptr;

  WCHAR stringBuffer[256];
};