Debian Codegraph @

components/decoder/mediafoundation/mfbytestream.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2019 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #ifndef H_BOCA_MFBYTESTREAM
14 #define H_BOCA_MFBYTESTREAM
15
16 #include <smooth.h>
17
18 #include "dllinterface.h"
19
20 using namespace smooth;
21
22 namespace BoCA
23 {
24 class MFByteStream: public IMFByteStream
25 {
26 private:
27 ULONG refCount;
28
29 IO::Driver *driver;
30
31 ULONG bytesRead;
32 ULONG bytesWritten;
33 public:
34 MFByteStream(IO::Driver *);
35 virtual ~MFByteStream();
36
37 /* IUnknown methods.
38 */
39 ULONG STDMETHODCALLTYPE AddRef();
40 ULONG STDMETHODCALLTYPE Release();
41
42 STDMETHOD (QueryInterface)(REFIID, void **);
43
44 /* IMFByteStream methods.
45 */
46 STDMETHOD (GetCapabilities)(DWORD *);
47
48 STDMETHOD (Read)(BYTE *, ULONG, ULONG *);
49 STDMETHOD (Write)(const BYTE *, ULONG, ULONG *);
50
51 STDMETHOD (Seek)(MFBYTESTREAM_SEEK_ORIGIN, LONGLONG, DWORD, QWORD *);
52
53 STDMETHOD (GetCurrentPosition)(QWORD *);
54 STDMETHOD (SetCurrentPosition)(QWORD);
55
56 STDMETHOD (GetLength)(QWORD *);
57 STDMETHOD (SetLength)(QWORD);
58
59 STDMETHOD (IsEndOfStream)(BOOL *);
60
61 STDMETHOD (Flush)();
62 STDMETHOD (Close)();
63
64 STDMETHOD (BeginRead)(BYTE *, ULONG, IMFAsyncCallback *, IUnknown *);
65 STDMETHOD (EndRead)(IMFAsyncResult * pResult, ULONG * pcbRead);
66
67 STDMETHOD (BeginWrite)(const BYTE *, ULONG, IMFAsyncCallback *, IUnknown *);
68 STDMETHOD (EndWrite)(IMFAsyncResult *, ULONG *);
69 };
70 };
71
72 #endif