/[cvs]/api/include/dmort.h
ViewVC logotype

Contents of /api/include/dmort.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Sun Jul 1 20:47:59 2001 UTC (22 years, 10 months ago) by bearsoft
Branch: lazy, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

1 //------------------------------------------------------------------------------
2 // File: DMORt.h
3 //
4 // Desc: Miscellaneous runtime support for DirectShow Media Objects
5 //
6 // Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
7 //------------------------------------------------------------------------------
8
9
10 #ifndef __DMORT_H__
11 #define __DMORT_H__
12
13 //
14 // Mediatype helpers. MoInitMediaType() goes with MoFreeMediaType(),
15 // MoCreateMediaType() goes with MoDeleteMediaType() - don't mix !
16 //
17
18
19
20 //
21 // Takes a pointer to an already allocated DMO_MEDIA_TYPE structure, allocates
22 // a format block of cbFormat bytes, and sets appropriate members of
23 // DMO_MEDIA_TYPE to point to the newly allocated format block. Also
24 // initializes the IUnknown pointer inside DMO_MEDIA_TYPE to NULL.
25 //
26 // The format block allocated by MoInitMediaType must be freed by calling
27 // MoFreeMediaType().
28 //
29 STDAPI MoInitMediaType(DMO_MEDIA_TYPE *pmt, DWORD cbFormat);
30
31 //
32 // Frees the format block and releases any IUnknown, but does not free the
33 // DMO_MEDIA_TYPE structure itself. Input parameter must point to an
34 // DMO_MEDIA_TYPE structure previously initialized by MoInitMediaType().
35 //
36 STDAPI MoFreeMediaType(DMO_MEDIA_TYPE *pmt);
37
38 //
39 // Copies the DMO_MEDIA_TYPE members. Also duplicates the format block and
40 // the IUnknown pointer. Both parameters must point to valid DMO_MEDIA_TYPE
41 // structures. Target structure must be later freed using MoFreeMediaType().
42 //
43 STDAPI MoCopyMediaType(DMO_MEDIA_TYPE *pmtDest, const DMO_MEDIA_TYPE *pmtSrc);
44
45
46
47 //
48 // Allocates a new DMO_MEDIA_TYPE structure and initializes it just like
49 // MoInitMediaType. I.e., this function allocates both the format block
50 // and the DMO_MEDIA_TYPE structure itself. Pointer to DMO_MEDIA_TYPE is
51 // returned as *ppmt.
52 //
53 // DMO_MEDIA_TYPE structures allocated by MoCreateMediaType() must be freed
54 // by calling MoDeleteMediaType().
55 //
56 STDAPI MoCreateMediaType(DMO_MEDIA_TYPE **ppmt, DWORD cbFormat);
57
58 //
59 // Frees any format block, releases any IUnknown, and deletes the
60 // DMO_MEDIA_TYPE structure itself. The input parameter must point to an
61 // DMO_MEDIA_TYPE structure previously allocated by MoCreateMediaType().
62 //
63 STDAPI MoDeleteMediaType(DMO_MEDIA_TYPE *pmt);
64
65 //
66 // Allocates a new DMO_MEDIA_TYPE structure and copies pmtSrc into it like
67 // MoCopyMediaType. I.e., this function allocates a new DMO_MEDIA_TYPE struct
68 // as well as a new format block for the target mediatype. Trager mediatype
69 // must later be freed using MoDeleteMediaType().
70 //
71 STDAPI MoDuplicateMediaType(DMO_MEDIA_TYPE **ppmtDest, const DMO_MEDIA_TYPE *pmtSrc);
72
73
74
75 #endif //__DMORT_H__

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26