]> git.vomp.tv Git - vompclient.git/blob - dssourcepin.h
Windows updates
[vompclient.git] / dssourcepin.h
1 /*
2     Copyright 2004-2006 Marten Richter
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef DSPINFILTER_H
22 #define DSPINFILTER_H
23
24 #include <winsock2.h>
25
26 #include <dshow.h> 
27
28
29
30 class DsSourceFilter;
31
32 [uuid("17F931AB-9A87-4c65-B99E-84F5BC5F7B09")]
33 class DsSourcePin: public IPin {
34
35 public:
36         DsSourcePin(DsSourceFilter *pFilter,HRESULT *phr,LPCWSTR pName,bool audio);
37         ~DsSourcePin();
38         BOOL IsConnected() {return (connected!=NULL);};
39         HRESULT getCurrentMediaSample(IMediaSample**ms);
40         HRESULT deliver(IMediaSample * ms);
41     
42         virtual  HRESULT DecideBufferSize(IMemAllocator *pa,ALLOCATOR_PROPERTIES *all_pp);
43
44         HRESULT Inactive();
45         HRESULT Active();
46         HRESULT Run(REFERENCE_TIME reftime);
47         /*IPin*/
48
49         virtual HRESULT STDMETHODCALLTYPE Connect(IPin *pinempf,const AM_MEDIA_TYPE *mtype);
50         virtual HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *connect,const AM_MEDIA_TYPE *mtype);
51         virtual HRESULT STDMETHODCALLTYPE Disconnect();
52         virtual HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **pin);
53         virtual HRESULT STDMETHODCALLTYPE  ConnectionMediaType(AM_MEDIA_TYPE *mtype);
54         virtual HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *info);
55         virtual HRESULT STDMETHODCALLTYPE  QueryDirection(PIN_DIRECTION *dir);
56         virtual HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *id);
57         virtual HRESULT STDMETHODCALLTYPE  QueryAccept(const AM_MEDIA_TYPE *mtype);
58         virtual HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **enuma);
59         virtual HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **pin,ULONG *numpin);
60         virtual HRESULT STDMETHODCALLTYPE EndOfStream();
61         virtual HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME start,REFERENCE_TIME stop,double rate);
62         /* IUnknown */
63         virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id,void ** object);
64         virtual ULONG STDMETHODCALLTYPE AddRef();
65     virtual ULONG STDMETHODCALLTYPE Release();
66         virtual HRESULT STDMETHODCALLTYPE BeginFlush(){return E_UNEXPECTED;};
67         virtual HRESULT STDMETHODCALLTYPE EndFlush(){return E_UNEXPECTED;};
68         virtual HRESULT GetMediaType(int iPosition, AM_MEDIA_TYPE *pmt);
69
70
71
72 protected:
73         virtual  HRESULT CheckMediaType(const AM_MEDIA_TYPE *pmt);
74
75         bool isaudiopin;
76         DsSourceFilter *m_pFilter;      
77         IPin* connected;
78         IMemInputPin* connectedinput;
79         AM_MEDIA_TYPE medtype;
80         IMemAllocator* allocator;
81
82         
83
84
85 };
86
87
88
89 #endif