• R/O
  • SSH
  • HTTPS

sarbo: コミット


コミットメタ情報

リビジョン4 (tree)
日時2010-12-02 17:21:42
作者bocco

ログメッセージ

(メッセージはありません)

変更サマリ

差分

--- DShowPlay/bin/Debug/DShowPlay.vshost.exe.manifest (revision 0)
+++ DShowPlay/bin/Debug/DShowPlay.vshost.exe.manifest (revision 4)
@@ -0,0 +1,11 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+ <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
4+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
5+ <security>
6+ <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
8+ </requestedPrivileges>
9+ </security>
10+ </trustInfo>
11+</assembly>
--- DShowPlay/ComboDeviceOut.cs (revision 3)
+++ DShowPlay/ComboDeviceOut.cs (revision 4)
@@ -1,9 +1,25 @@
11 // //////////////////////////////////////////////////////////////////////////
22 //
33 // ComboDeviceOut.cs
4-// CopyRight CACTUS SOFTWARE (2009)
5-// Sarbo Project Sample Program
4+// Sarbo Project
5+// Powerd by CACTUS SOFTWARE <http://www.cactussoft.co.jp/>
6+//
67 // ver 1.0 2009/08/13
8+// This file is part of Sarbo.
9+//
10+// Sarbo is free software: you can redistribute it and/or modify
11+// it under the terms of the GNU General Public License as published by
12+// the Free Software Foundation, either version 2 of the License, or
13+// (at your option) any later version.
14+//
15+// Sarbo is distributed in the hope that it will be useful,
16+// but WITHOUT ANY WARRANTY; without even the implied warranty of
17+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+// GNU General Public License for more details.
19+//
20+// You should have received a copy of the GNU General Public License
21+// along with Sarbo. If not, see <http://www.gnu.org/licenses/>.
22+//
723 // //////////////////////////////////////////////////////////////////////////
824 using System;
925 using System.Collections.Generic;
@@ -16,8 +32,8 @@
1632 {
1733 public partial class ComboDeviceOut : UserControl
1834 {
19- private List<IMoniker> m_iMonikerList = new List<IMoniker>();
20- private List<string> m_deviceList = new List<string>();
35+ private List<IMoniker> _iMonikerList = new List<IMoniker>();
36+ private List<string> _deviceList = new List<string>();
2137
2238 public ComboDeviceOut()
2339 {
@@ -29,12 +45,12 @@
2945
3046 public List<IMoniker> IMonikerList
3147 {
32- get { return m_iMonikerList; }
48+ get { return _iMonikerList; }
3349 }
3450
3551 public List<string> DeviceList
3652 {
37- get { return m_deviceList; }
53+ get { return _deviceList; }
3854 }
3955
4056 public int NumDevs
--- DShowPlay/MainForm.cs (revision 3)
+++ DShowPlay/MainForm.cs (revision 4)
@@ -1,9 +1,25 @@
11 // //////////////////////////////////////////////////////////////////////////
22 //
33 // MainForm.cs
4-// CopyRight CACTUS SOFTWARE (2009)
5-// Sarbo Project Sample Program
4+// Sarbo Project
5+// Powerd by CACTUS SOFTWARE <http://www.cactussoft.co.jp/>
6+//
67 // ver 1.0 2009/08/13
8+// This file is part of Sarbo.
9+//
10+// Sarbo is free software: you can redistribute it and/or modify
11+// it under the terms of the GNU General Public License as published by
12+// the Free Software Foundation, either version 2 of the License, or
13+// (at your option) any later version.
14+//
15+// Sarbo is distributed in the hope that it will be useful,
16+// but WITHOUT ANY WARRANTY; without even the implied warranty of
17+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+// GNU General Public License for more details.
19+//
20+// You should have received a copy of the GNU General Public License
21+// along with Sarbo. If not, see <http://www.gnu.org/licenses/>.
22+//
723 // //////////////////////////////////////////////////////////////////////////
824 using System;
925 using System.Windows.Forms;
@@ -13,7 +29,7 @@
1329 {
1430 public partial class MainForm : Form
1531 {
16- private SoundGraph m_soundGraph = null;
32+ private SoundGraph _soundGraph = null;
1733
1834 public MainForm()
1935 {
@@ -28,7 +44,7 @@
2844 if (this.DesignMode) return;
2945
3046 comboDeviceOut.InitComboBox();
31- m_soundGraph = new SoundGraph();
47+ _soundGraph = new SoundGraph();
3248 }
3349
3450 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
@@ -36,7 +52,7 @@
3652 if (this.DesignMode) return;
3753
3854 comboDeviceOut.ExitComboBox();
39- m_soundGraph.StopAndExit();
55+ _soundGraph.StopAndExit();
4056 }
4157
4258 // //////////////////////////////////////////////////////////////////
@@ -79,7 +95,7 @@
7995 if (DialogResult.OK == openFileDialog.ShowDialog())
8096 {
8197 textFilePath.Text = openFileDialog.FileName;
82- m_soundGraph.StopAndExit();
98+ _soundGraph.StopAndExit();
8399 RenderSongFile(openFileDialog.FileName);
84100 }
85101 }
@@ -89,7 +105,7 @@
89105
90106 private void btnRewind_Click(object sender, EventArgs e)
91107 {
92- m_soundGraph.SeekPosition(0);
108+ _soundGraph.SeekPosition(0);
93109 }
94110
95111 private void btnPlay_Click(object sender, EventArgs e)
@@ -122,20 +138,20 @@
122138
123139 private void RenderSongFile(string strFilePath)
124140 {
125- if (m_soundGraph.IsRenderFile()) return;
141+ if (_soundGraph.IsRenderFile()) return;
126142
127- FilterState fs = m_soundGraph.GetState();
143+ FilterState fs = _soundGraph.GetState();
128144 if (fs != FilterState.Stopped) return;
129145
130146 try
131147 {
132- m_soundGraph.InitInstance();
133- m_soundGraph.RenderSongFile(strFilePath);
134- m_soundGraph.SetNotifyWindow(this.Handle);
148+ _soundGraph.InitInstance();
149+ _soundGraph.RenderSongFile(strFilePath);
150+ _soundGraph.SetNotifyWindow(this.Handle);
135151 }
136152 catch (Exception)
137153 {
138- m_soundGraph.StopAndExit();
154+ _soundGraph.StopAndExit();
139155 }
140156 }
141157
@@ -146,7 +162,7 @@
146162 IntPtr wparam,
147163 IntPtr lparam)
148164 {
149- if (m_soundGraph.IsComplete())
165+ if (_soundGraph.IsComplete())
150166 {
151167 StopProc();
152168 }
@@ -160,12 +176,12 @@
160176 {
161177 EnablePlayUI(false);
162178
163- FilterState fs = m_soundGraph.GetState();
179+ FilterState fs = _soundGraph.GetState();
164180 if (fs != FilterState.Stopped) return;
165181
166182 try
167183 {
168- m_soundGraph.StartPlay();
184+ _soundGraph.StartPlay();
169185 }
170186 catch (Exception)
171187 {
@@ -175,14 +191,14 @@
175191
176192 private void StopProc()
177193 {
178- FilterState fs = m_soundGraph.GetState();
194+ FilterState fs = _soundGraph.GetState();
179195
180196 try
181197 {
182198 if (fs == FilterState.Running)
183199 {
184- m_soundGraph.StopPlay();
185- m_soundGraph.WaitForStop();
200+ _soundGraph.StopPlay();
201+ _soundGraph.WaitForStop();
186202 }
187203 }
188204 catch (Exception)
--- DShowPlay/SoundGraph.cs (revision 3)
+++ DShowPlay/SoundGraph.cs (revision 4)
@@ -1,9 +1,25 @@
11 // //////////////////////////////////////////////////////////////////////////
22 //
33 // SoundGraph.cs
4-// CopyRight CACTUS SOFTWARE (2009)
5-// Sarbo Project Sample Program
4+// Sarbo Project
5+// Powerd by CACTUS SOFTWARE <http://www.cactussoft.co.jp/>
6+//
67 // ver 1.0 2009/08/28
8+// This file is part of Sarbo.
9+//
10+// Sarbo is free software: you can redistribute it and/or modify
11+// it under the terms of the GNU General Public License as published by
12+// the Free Software Foundation, either version 2 of the License, or
13+// (at your option) any later version.
14+//
15+// Sarbo is distributed in the hope that it will be useful,
16+// but WITHOUT ANY WARRANTY; without even the implied warranty of
17+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+// GNU General Public License for more details.
19+//
20+// You should have received a copy of the GNU General Public License
21+// along with Sarbo. If not, see <http://www.gnu.org/licenses/>.
22+//
723 // //////////////////////////////////////////////////////////////////////////
824 using System;
925 using System.IO;
@@ -14,15 +30,15 @@
1430 {
1531 public class SoundGraph
1632 {
17- private IGraphBuilder m_iGraphBuilder = null;
18- private IMediaControl m_iMediaControl = null;
19- private IMediaSeeking m_iMediaSeeking = null;
20- private IMediaEventEx m_iMediaEventEx = null;
21- private IBasicAudio m_iBasicAudio = null;
33+ private IGraphBuilder _iGraphBuilder = null;
34+ private IMediaControl _iMediaControl = null;
35+ private IMediaSeeking _iMediaSeeking = null;
36+ private IMediaEventEx _iMediaEventEx = null;
37+ private IBasicAudio _iBasicAudio = null;
2238
23- private FilterState m_filterState = FilterState.Stopped;
24- private bool m_renderFile = false;
25- private int m_register = 0;
39+ private FilterState _filterState = FilterState.Stopped;
40+ private bool _renderFile = false;
41+ private int _register = 0;
2642
2743 // //////////////////////////////////////////////////////////////////
2844 // Init
@@ -31,14 +47,14 @@
3147 {
3248 Type comType = Type.GetTypeFromCLSID(CLSID.FilterGraph);
3349 object comObj = Activator.CreateInstance(comType);
34- m_iGraphBuilder = (IGraphBuilder)comObj; comObj = null;
50+ _iGraphBuilder = (IGraphBuilder)comObj; comObj = null;
3551
36- m_iMediaControl = (IMediaControl)m_iGraphBuilder;
37- m_iMediaSeeking = (IMediaSeeking)m_iGraphBuilder;
38- m_iMediaEventEx = (IMediaEventEx)m_iGraphBuilder;
39- m_iBasicAudio = (IBasicAudio)m_iGraphBuilder;
52+ _iMediaControl = (IMediaControl)_iGraphBuilder;
53+ _iMediaSeeking = (IMediaSeeking)_iGraphBuilder;
54+ _iMediaEventEx = (IMediaEventEx)_iGraphBuilder;
55+ _iBasicAudio = (IBasicAudio)_iGraphBuilder;
4056 #if DEBUG
41- int result = ROT.AddToRot(m_iGraphBuilder, out m_register);
57+ int result = ROT.AddToRot(_iGraphBuilder, out _register);
4258 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
4359 #endif
4460 }
@@ -49,20 +65,20 @@
4965 public void ExitInstance()
5066 {
5167 #if DEBUG
52- ROT.RemoveFromRot(ref m_register);
68+ ROT.RemoveFromRot(ref _register);
5369 #endif
54- if (m_iGraphBuilder != null)
55- Marshal.ReleaseComObject(m_iGraphBuilder); m_iGraphBuilder = null;
56- if (m_iMediaControl != null)
57- Marshal.ReleaseComObject(m_iMediaControl); m_iMediaControl = null;
58- if (m_iMediaSeeking != null)
59- Marshal.ReleaseComObject(m_iMediaSeeking); m_iMediaSeeking = null;
60- if (m_iMediaEventEx != null)
61- Marshal.ReleaseComObject(m_iMediaEventEx); m_iMediaEventEx = null;
62- if (m_iBasicAudio != null)
63- Marshal.ReleaseComObject(m_iBasicAudio); m_iBasicAudio = null;
70+ if (_iGraphBuilder != null)
71+ Marshal.ReleaseComObject(_iGraphBuilder); _iGraphBuilder = null;
72+ if (_iMediaControl != null)
73+ Marshal.ReleaseComObject(_iMediaControl); _iMediaControl = null;
74+ if (_iMediaSeeking != null)
75+ Marshal.ReleaseComObject(_iMediaSeeking); _iMediaSeeking = null;
76+ if (_iMediaEventEx != null)
77+ Marshal.ReleaseComObject(_iMediaEventEx); _iMediaEventEx = null;
78+ if (_iBasicAudio != null)
79+ Marshal.ReleaseComObject(_iBasicAudio); _iBasicAudio = null;
6480
65- m_renderFile = false;
81+ _renderFile = false;
6682 }
6783
6884 // //////////////////////////////////////////////////////////////////
@@ -72,7 +88,7 @@
7288 {
7389 int result = HResult.OK;
7490
75- if (m_iGraphBuilder == null)
91+ if (_iGraphBuilder == null)
7692 Marshal.ThrowExceptionForHR(HResult.NoInterface);
7793
7894 if (IsWindowsMediaFile(strFilePath))
@@ -82,10 +98,10 @@
8298 }
8399 else
84100 {
85- result = m_iGraphBuilder.RenderFile(strFilePath, null);
101+ result = _iGraphBuilder.RenderFile(strFilePath, null);
86102 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
87103 }
88- m_renderFile = true;
104+ _renderFile = true;
89105 }
90106
91107 // //////////////////////////////////////////////////////////////////
@@ -102,7 +118,7 @@
102118 result = CreateFilter(CLSID.WMAsfReader, out iReader);
103119 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
104120
105- result = m_iGraphBuilder.AddFilter(iReader, "ASF Reader");
121+ result = _iGraphBuilder.AddFilter(iReader, "ASF Reader");
106122 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
107123
108124 iFS = (IFileSourceFilter)iReader;
@@ -110,7 +126,7 @@
110126 result = iFS.Load(strFilePath, null);
111127 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
112128
113- result = RenderOutputPins(m_iGraphBuilder, iReader);
129+ result = RenderOutputPins(_iGraphBuilder, iReader);
114130 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
115131 }
116132 catch (Exception)
@@ -193,18 +209,18 @@
193209
194210 public void SetNotifyWindow(IntPtr hWnd)
195211 {
196- if (m_iMediaEventEx == null)
212+ if (_iMediaEventEx == null)
197213 Marshal.ThrowExceptionForHR(HResult.NoInterface);
198214
199- int result = m_iMediaEventEx.SetNotifyWindow(hWnd, WM.GraphNotify, 0);
215+ int result = _iMediaEventEx.SetNotifyWindow(hWnd, WM.GraphNotify, 0);
200216 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
201217 }
202218
203219 public void ClearNotifyWindow()
204220 {
205- if (m_iMediaEventEx == null) return;
221+ if (_iMediaEventEx == null) return;
206222
207- int result = m_iMediaEventEx.SetNotifyWindow(IntPtr.Zero, 0, 0);
223+ int result = _iMediaEventEx.SetNotifyWindow(IntPtr.Zero, 0, 0);
208224 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
209225 }
210226
@@ -213,29 +229,29 @@
213229
214230 public void StartPlay()
215231 {
216- if (m_filterState == FilterState.Running) return;
232+ if (_filterState == FilterState.Running) return;
217233
218- if (m_iMediaControl == null)
234+ if (_iMediaControl == null)
219235 Marshal.ThrowExceptionForHR(HResult.NoInterface);
220236
221- int result = m_iMediaControl.Run();
237+ int result = _iMediaControl.Run();
222238 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
223239
224- m_filterState = FilterState.Running;
240+ _filterState = FilterState.Running;
225241 }
226242
227243 // //////////////////////////////////////////////////////////////////
228244 public void StopPlay()
229245 {
230- if (m_filterState == FilterState.Stopped) return;
246+ if (_filterState == FilterState.Stopped) return;
231247
232- if (m_iMediaControl == null)
248+ if (_iMediaControl == null)
233249 Marshal.ThrowExceptionForHR(HResult.NoInterface);
234250
235- int result = m_iMediaControl.Stop();
251+ int result = _iMediaControl.Stop();
236252 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
237253
238- m_filterState = FilterState.Stopped;
254+ _filterState = FilterState.Stopped;
239255 }
240256
241257 // //////////////////////////////////////////////////////////////////
@@ -243,10 +259,10 @@
243259
244260 public void WaitForStop()
245261 {
246- if (m_iMediaControl == null) return;
262+ if (_iMediaControl == null) return;
247263
248264 FilterState fs;
249- int result = m_iMediaControl.GetState(500, out fs);
265+ int result = _iMediaControl.GetState(500, out fs);
250266 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
251267 }
252268
@@ -255,7 +271,7 @@
255271
256272 public int SeekPosition(int position)
257273 {
258- if (m_iMediaSeeking == null) return HResult.OK;
274+ if (_iMediaSeeking == null) return HResult.OK;
259275
260276 int result = HResult.OK;
261277
@@ -262,7 +278,7 @@
262278 try
263279 {
264280 ReferenceTime current = new ReferenceTime(position * TimeSpan.TicksPerSecond);
265- result = m_iMediaSeeking.SetPositions(current, SeekingFlags.AbsolutePositioning, null, 0);
281+ result = _iMediaSeeking.SetPositions(current, SeekingFlags.AbsolutePositioning, null, 0);
266282 if (HResult.Failed(result)) Marshal.ThrowExceptionForHR(result);
267283 }
268284 catch (Exception)
@@ -279,11 +295,11 @@
279295 EvCode lEventCode;
280296 int lParam1, lParam2;
281297
282- if (m_iMediaEventEx == null) return false;
298+ if (_iMediaEventEx == null) return false;
283299
284- while (HResult.Succeeded(m_iMediaEventEx.GetEvent(out lEventCode, out lParam1, out lParam2, 0)))
300+ while (HResult.Succeeded(_iMediaEventEx.GetEvent(out lEventCode, out lParam1, out lParam2, 0)))
285301 {
286- m_iMediaEventEx.FreeEventParams(lEventCode, lParam1, lParam2);
302+ _iMediaEventEx.FreeEventParams(lEventCode, lParam1, lParam2);
287303
288304 switch (lEventCode)
289305 {
@@ -301,7 +317,7 @@
301317
302318 public bool IsRenderFile()
303319 {
304- return m_renderFile;
320+ return _renderFile;
305321 }
306322
307323 // //////////////////////////////////////////////////////////////////
@@ -309,7 +325,7 @@
309325
310326 public FilterState GetState()
311327 {
312- return m_filterState;
328+ return _filterState;
313329 }
314330
315331 // //////////////////////////////////////////////////////////////////
旧リポジトリブラウザで表示