summaryrefslogtreecommitdiffstats
path: root/plugins/pluginDirectShow/internals/DSPushSource.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pluginDirectShow/internals/DSPushSource.h')
-rwxr-xr-xplugins/pluginDirectShow/internals/DSPushSource.h156
1 files changed, 74 insertions, 82 deletions
diff --git a/plugins/pluginDirectShow/internals/DSPushSource.h b/plugins/pluginDirectShow/internals/DSPushSource.h
index 140d9bd..e78c47e 100755
--- a/plugins/pluginDirectShow/internals/DSPushSource.h
+++ b/plugins/pluginDirectShow/internals/DSPushSource.h
@@ -12,7 +12,7 @@
#include <strsafe.h>
-// UNITS = 10 ^ 7
+// UNITS = 10 ^ 7
// UNITS / 30 = 30 fps;
// UNITS / 20 = 20 fps, etc
const REFERENCE_TIME FPS_30 = UNITS / 30;
@@ -35,8 +35,8 @@ const REFERENCE_TIME rtDefaultFrameLength = FPS_10;
#define NUM_FILES 5
// {3FD3081A-A8C9-4958-9F75-07EC89690024}
-TDSHOW_DEFINE_GUID(CLSID_PushSourceDesktop,
-0x3fd3081a, 0xa8c9, 0x4958, 0x9f, 0x75, 0x7, 0xec, 0x89, 0x69, 0x0, 0x24);
+TDSHOW_DEFINE_GUID(CLSID_PushSourceDesktop,
+ 0x3fd3081a, 0xa8c9, 0x4958, 0x9f, 0x75, 0x7, 0xec, 0x89, 0x69, 0x0, 0x24);
@@ -56,11 +56,11 @@ protected:
BITMAPINFO *m_pBmi; // Pointer to the bitmap header
DWORD m_cbBitmapInfo; // Size of the bitmap header
-
- // File opening variables
- HANDLE m_hFile; // Handle returned from CreateFile
+
+ // File opening variables
+ HANDLE m_hFile; // Handle returned from CreateFile
BYTE * m_pFile; // Points to beginning of file buffer
- BYTE * m_pImage; // Points to pixel bits
+ BYTE * m_pImage; // Points to pixel bits
int m_iFrameNumber;
const REFERENCE_TIME m_rtFrameLength;
@@ -77,13 +77,12 @@ public:
HRESULT GetMediaType(CMediaType *pMediaType);
HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
HRESULT FillBuffer(IMediaSample *pSample);
-
+
// Quality control
- // Not implemented because we aren't going in real time.
- // If the file-writing filter slows the graph down, we just do nothing, which means
- // wait until we're unblocked. No frames are ever dropped.
- STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
- {
+ // Not implemented because we aren't going in real time.
+ // If the file-writing filter slows the graph down, we just do nothing, which means
+ // wait until we're unblocked. No frames are ever dropped.
+ STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q) {
return E_FAIL;
}
@@ -100,11 +99,11 @@ protected:
BITMAPINFO *m_pBmi[NUM_FILES]; // Pointer to the bitmap headers
DWORD m_cbBitmapInfo[NUM_FILES]; // Size of the bitmap headers
-
- // File opening variables
- HANDLE m_hFile[NUM_FILES]; // Handles returned from CreateFile
+
+ // File opening variables
+ HANDLE m_hFile[NUM_FILES]; // Handles returned from CreateFile
BYTE * m_pFile[NUM_FILES]; // Points to beginning of file buffers
- BYTE * m_pImage[NUM_FILES]; // Points to pixel bits
+ BYTE * m_pImage[NUM_FILES]; // Points to pixel bits
BOOL m_bFilesLoaded;
int m_iCurrentBitmap; // Which bitmap is being displayed
@@ -123,13 +122,12 @@ public:
HRESULT GetMediaType(CMediaType *pMediaType);
HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
HRESULT FillBuffer(IMediaSample *pSample);
-
+
// Quality control
- // Not implemented because we aren't going in real time.
- // If the file-writing filter slows the graph down, we just do nothing, which means
- // wait until we're unblocked. No frames are ever dropped.
- STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
- {
+ // Not implemented because we aren't going in real time.
+ // If the file-writing filter slows the graph down, we just do nothing, which means
+ // wait until we're unblocked. No frames are ever dropped.
+ STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q) {
return E_FAIL;
}
@@ -158,7 +156,7 @@ protected:
CCritSec m_cSharedState; // Protects our internal state
CImageDisplay m_Display; // Figures out our media type for us
- HWND m_hSrcHwnd; // Handle to the window to grab
+ HWND m_hSrcHwnd; // Handle to the window to grab
public:
@@ -168,7 +166,7 @@ public:
// Override the version that offers exactly one media type
HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
HRESULT FillBuffer(IMediaSample *pSample);
-
+
// Set the agreed media type and set up the necessary parameters
HRESULT SetMediaType(const CMediaType *pMediaType);
@@ -177,19 +175,17 @@ public:
HRESULT GetMediaType(int iPosition, CMediaType *pmt);
// Quality control
- // Not implemented because we aren't going in real time.
- // If the file-writing filter slows the graph down, we just do nothing, which means
- // wait until we're unblocked. No frames are ever dropped.
- STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
- {
+ // Not implemented because we aren't going in real time.
+ // If the file-writing filter slows the graph down, we just do nothing, which means
+ // wait until we're unblocked. No frames are ever dropped.
+ STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q) {
return E_FAIL;
}
- HRESULT SetSrcHwnd(HWND hWnd)
- {
- m_hSrcHwnd = hWnd;
- return S_OK;
- }
+ HRESULT SetSrcHwnd(HWND hWnd) {
+ m_hSrcHwnd = hWnd;
+ return S_OK;
+ }
};
@@ -206,7 +202,7 @@ private:
CPushPinBitmap *m_pPin;
public:
- static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
+ static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
};
@@ -222,7 +218,7 @@ private:
CPushPinBitmapSet *m_pPin;
public:
- static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
+ static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
};
@@ -238,10 +234,10 @@ private:
CPushPinDesktop *m_pPin;
public:
- static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
- DECLARE_IUNKNOWN;
-
- HRESULT SetSrcHwnd(HWND hWnd);
+ static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
+ DECLARE_IUNKNOWN;
+
+ HRESULT SetSrcHwnd(HWND hWnd);
};
@@ -260,7 +256,7 @@ public:
#include <strsafe.h>
-// UNITS = 10 ^ 7
+// UNITS = 10 ^ 7
// UNITS / 30 = 30 fps;
// UNITS / 20 = 20 fps, etc
const REFERENCE_TIME FPS_30 = UNITS / 30;
@@ -283,8 +279,8 @@ const REFERENCE_TIME rtDefaultFrameLength = FPS_10;
#define NUM_FILES 5
// {3FD3081A-A8C9-4958-9F75-07EC89690024}
-TDSHOW_DEFINE_GUID(CLSID_PushSourceDesktop,
-0x3fd3081a, 0xa8c9, 0x4958, 0x9f, 0x75, 0x7, 0xec, 0x89, 0x69, 0x0, 0x24);
+TDSHOW_DEFINE_GUID(CLSID_PushSourceDesktop,
+ 0x3fd3081a, 0xa8c9, 0x4958, 0x9f, 0x75, 0x7, 0xec, 0x89, 0x69, 0x0, 0x24);
@@ -304,11 +300,11 @@ protected:
BITMAPINFO *m_pBmi; // Pointer to the bitmap header
DWORD m_cbBitmapInfo; // Size of the bitmap header
-
- // File opening variables
- HANDLE m_hFile; // Handle returned from CreateFile
+
+ // File opening variables
+ HANDLE m_hFile; // Handle returned from CreateFile
BYTE * m_pFile; // Points to beginning of file buffer
- BYTE * m_pImage; // Points to pixel bits
+ BYTE * m_pImage; // Points to pixel bits
int m_iFrameNumber;
const REFERENCE_TIME m_rtFrameLength;
@@ -325,13 +321,12 @@ public:
HRESULT GetMediaType(CMediaType *pMediaType);
HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
HRESULT FillBuffer(IMediaSample *pSample);
-
+
// Quality control
- // Not implemented because we aren't going in real time.
- // If the file-writing filter slows the graph down, we just do nothing, which means
- // wait until we're unblocked. No frames are ever dropped.
- STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
- {
+ // Not implemented because we aren't going in real time.
+ // If the file-writing filter slows the graph down, we just do nothing, which means
+ // wait until we're unblocked. No frames are ever dropped.
+ STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q) {
return E_FAIL;
}
@@ -348,11 +343,11 @@ protected:
BITMAPINFO *m_pBmi[NUM_FILES]; // Pointer to the bitmap headers
DWORD m_cbBitmapInfo[NUM_FILES]; // Size of the bitmap headers
-
- // File opening variables
- HANDLE m_hFile[NUM_FILES]; // Handles returned from CreateFile
+
+ // File opening variables
+ HANDLE m_hFile[NUM_FILES]; // Handles returned from CreateFile
BYTE * m_pFile[NUM_FILES]; // Points to beginning of file buffers
- BYTE * m_pImage[NUM_FILES]; // Points to pixel bits
+ BYTE * m_pImage[NUM_FILES]; // Points to pixel bits
BOOL m_bFilesLoaded;
int m_iCurrentBitmap; // Which bitmap is being displayed
@@ -371,13 +366,12 @@ public:
HRESULT GetMediaType(CMediaType *pMediaType);
HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
HRESULT FillBuffer(IMediaSample *pSample);
-
+
// Quality control
- // Not implemented because we aren't going in real time.
- // If the file-writing filter slows the graph down, we just do nothing, which means
- // wait until we're unblocked. No frames are ever dropped.
- STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
- {
+ // Not implemented because we aren't going in real time.
+ // If the file-writing filter slows the graph down, we just do nothing, which means
+ // wait until we're unblocked. No frames are ever dropped.
+ STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q) {
return E_FAIL;
}
@@ -406,7 +400,7 @@ protected:
CCritSec m_cSharedState; // Protects our internal state
CImageDisplay m_Display; // Figures out our media type for us
- HWND m_hSrcHwnd; // Handle to the window to grab
+ HWND m_hSrcHwnd; // Handle to the window to grab
public:
@@ -416,7 +410,7 @@ public:
// Override the version that offers exactly one media type
HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pRequest);
HRESULT FillBuffer(IMediaSample *pSample);
-
+
// Set the agreed media type and set up the necessary parameters
HRESULT SetMediaType(const CMediaType *pMediaType);
@@ -425,19 +419,17 @@ public:
HRESULT GetMediaType(int iPosition, CMediaType *pmt);
// Quality control
- // Not implemented because we aren't going in real time.
- // If the file-writing filter slows the graph down, we just do nothing, which means
- // wait until we're unblocked. No frames are ever dropped.
- STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
- {
+ // Not implemented because we aren't going in real time.
+ // If the file-writing filter slows the graph down, we just do nothing, which means
+ // wait until we're unblocked. No frames are ever dropped.
+ STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q) {
return E_FAIL;
}
- HRESULT SetSrcHwnd(HWND hWnd)
- {
- m_hSrcHwnd = hWnd;
- return S_OK;
- }
+ HRESULT SetSrcHwnd(HWND hWnd) {
+ m_hSrcHwnd = hWnd;
+ return S_OK;
+ }
};
@@ -454,7 +446,7 @@ private:
CPushPinBitmap *m_pPin;
public:
- static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
+ static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
};
@@ -470,7 +462,7 @@ private:
CPushPinBitmapSet *m_pPin;
public:
- static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
+ static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
};
@@ -486,10 +478,10 @@ private:
CPushPinDesktop *m_pPin;
public:
- static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
- DECLARE_IUNKNOWN;
-
- HRESULT SetSrcHwnd(HWND hWnd);
+ static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
+ DECLARE_IUNKNOWN;
+
+ HRESULT SetSrcHwnd(HWND hWnd);
};
OpenPOWER on IntegriCloud