annotate loader/dshow/cmediasample.h @ 824:ee595ffdbee6

filaname tells it all
author eyck
date Thu, 17 May 2001 16:14:37 +0000
parents 9355b2ae634e
children da26060c81ef
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
1 #ifndef _CMEDIASAMPLE_H
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
2 #define _CMEDIASAMPLE_H
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
3
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
4 #include "interfaces.h"
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
5 #include "guids.h"
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
6 #include "default.h"
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
7 class CMediaSample: public IMediaSample
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
8 {
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
9 IMemAllocator* all;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
10 int size;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
11 int actual_size;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
12 char* block;
713
9355b2ae634e avifile-0.6-CVS merge
arpi_esp
parents: 168
diff changeset
13 char* old_block;
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
14 int refcount;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
15 int isPreroll;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
16 int isSyncPoint;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
17 AM_MEDIA_TYPE media_type;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
18 int type_valid;
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
19 public:
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
20 CMediaSample(IMemAllocator* allocator, long _size);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
21 ~CMediaSample();
713
9355b2ae634e avifile-0.6-CVS merge
arpi_esp
parents: 168
diff changeset
22 void SetPointer(char* pointer) { old_block=block; block=pointer; }
9355b2ae634e avifile-0.6-CVS merge
arpi_esp
parents: 168
diff changeset
23 void ResetPointer() { block=old_block; old_block=0; }
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
24
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
25 static long STDCALL QueryInterface (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
26 IUnknown * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
27 /* [in] */ IID* riid,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
28 /* [iid_is][out] */ void **ppvObject);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
29
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
30 static long STDCALL AddRef (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
31 IUnknown * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
32
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
33 static long STDCALL Release (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
34 IUnknown * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
35
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
36 static HRESULT STDCALL GetPointer (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
37 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
38 /* [out] */ BYTE **ppBuffer);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
39
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
40 static long STDCALL GetSize (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
41 IMediaSample * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
42
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
43 static HRESULT STDCALL GetTime (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
44 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
45 /* [out] */ REFERENCE_TIME *pTimeStart,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
46 /* [out] */ REFERENCE_TIME *pTimeEnd);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
47
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
48 static HRESULT STDCALL SetTime (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
49 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
50 /* [in] */ REFERENCE_TIME *pTimeStart,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
51 /* [in] */ REFERENCE_TIME *pTimeEnd);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
52
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
53 static HRESULT STDCALL IsSyncPoint (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
54 IMediaSample * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
55
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
56 static HRESULT STDCALL SetSyncPoint (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
57 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
58 long bIsSyncPoint);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
59
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
60 static HRESULT STDCALL IsPreroll (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
61 IMediaSample * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
62
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
63 static HRESULT STDCALL SetPreroll (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
64 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
65 long bIsPreroll);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
66
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
67 static long STDCALL GetActualDataLength (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
68 IMediaSample * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
69
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
70 static HRESULT STDCALL SetActualDataLength (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
71 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
72 long __MIDL_0010);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
73
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
74 static HRESULT STDCALL GetMediaType (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
75 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
76 AM_MEDIA_TYPE **ppMediaType);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
77
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
78 static HRESULT STDCALL SetMediaType (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
79 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
80 AM_MEDIA_TYPE *pMediaType);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
81
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
82 static HRESULT STDCALL IsDiscontinuity (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
83 IMediaSample * This);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
84
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
85 static HRESULT STDCALL SetDiscontinuity (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
86 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
87 long bDiscontinuity);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
88
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
89 static HRESULT STDCALL GetMediaTime (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
90 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
91 /* [out] */ LONGLONG *pTimeStart,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
92 /* [out] */ LONGLONG *pTimeEnd);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
93
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
94 static HRESULT STDCALL SetMediaTime (
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
95 IMediaSample * This,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
96 /* [in] */ LONGLONG *pTimeStart,
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
97 /* [in] */ LONGLONG *pTimeEnd);
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
98 };
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
99 #endif