summaryrefslogtreecommitdiffstats
path: root/thirdparties/win32/include/directshow/amextra.h
blob: df3f74eb7c322a9507e34fbe00c1d43e43c89386 (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
//------------------------------------------------------------------------------
// File: AMExtra.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------


#ifndef __AMEXTRA__
#define __AMEXTRA__

// Simple rendered input pin
//
// NOTE if your filter queues stuff before rendering then it may not be
// appropriate to use this class
//
// In that case queue the end of stream condition until the last sample
// is actually rendered and flush the condition appropriately

class CRenderedInputPin : public CBaseInputPin
{
public:

    CRenderedInputPin(__in_opt LPCTSTR pObjectName,
                      __in CBaseFilter *pFilter,
                      __in CCritSec *pLock,
                      __inout HRESULT *phr,
                      __in_opt LPCWSTR pName);
#ifdef UNICODE
    CRenderedInputPin(__in_opt LPCSTR pObjectName,
                      __in CBaseFilter *pFilter,
                      __in CCritSec *pLock,
                      __inout HRESULT *phr,
                      __in_opt LPCWSTR pName);
#endif

    // Override methods to track end of stream state
    STDMETHODIMP EndOfStream();
    STDMETHODIMP EndFlush();

    HRESULT Active();
    HRESULT Run(REFERENCE_TIME tStart);

protected:

    // Member variables to track state
    BOOL m_bAtEndOfStream;      // Set by EndOfStream
    BOOL m_bCompleteNotified;   // Set when we notify for EC_COMPLETE

private:
    void DoCompleteHandling();
};

#endif // __AMEXTRA__

OpenPOWER on IntegriCloud