Mercurial > mplayer.hg
annotate loader/dshow/mediatype.h @ 23428:c45f009ce3a7
Get rid of superfluous MPLAYER #define, it was always enabled and
cluttered the code. Blessed by Reimar.
author | diego |
---|---|
date | Sat, 02 Jun 2007 12:24:35 +0000 |
parents | 3d1b23cf3d08 |
children | 133b63fc16a2 |
rev | line source |
---|---|
22305
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
1 /* |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
2 ------------------------------------------------------------------- |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
3 AM_MEDIA_TYPE service functions declarations |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
4 ------------------------------------------------------------------- |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
5 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
6 #include "guids.h" |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
7 |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
8 /** |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
9 * \brief print info from AM_MEDIA_TYPE structure |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
10 * =param[in] label short lable for media type |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
11 * \param[in] pmt pointer to AM_MEDIA_TYPE |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
12 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
13 * routine used for debug purposes |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
14 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
15 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
16 void DisplayMediaType(const char * label,const AM_MEDIA_TYPE* pmt); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
17 /** |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
18 * \brief frees memory, pointed by pbFormat and pUnk members of AM_MEDIA_TYPE structure |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
19 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
20 * \param[in] pmt pointer to structure |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
21 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
22 * \note |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
23 * routine does not frees memory allocated for AM_MEDIA_TYPE, so given pointer will be |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
24 * valid after this routine call. |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
25 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
26 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
27 void FreeMediaType(AM_MEDIA_TYPE* pmt); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
28 /** |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
29 * \brief frees memory allocated for AM_MEDIA_TYPE structure, including pbFormat and pUnk |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
30 * members |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
31 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
32 * \param[in] pmt pointer to structure |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
33 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
34 * \note |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
35 * after call to this routine, pointer to AM_MEDIA_TYPE will not be valid anymore |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
36 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
37 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
38 void DeleteMediaType(AM_MEDIA_TYPE* pmt); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
39 /** |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
40 * \brief copyies info from source to destination AM_MEDIA_TYPE structures |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
41 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
42 * \param[in] pSrc pointer to AM_MEDIA_TYPE structure to copy data from |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
43 * \param[out] pDst pointer to AM_MEDIA_TYPE structure to copy data to |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
44 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
45 * \return S_OK - success |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
46 * \return E_POINTER - pSrc or pDst is NULL or (pSrc->cbFormat && !pSrc->pbFormat) |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
47 * \return E_INVALIDARG - (pSrc == pDst) |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
48 * \return E_OUTOFMEMORY - Insufficient memory |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
49 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
50 * \note |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
51 * - pDst must point to existing AM_MEDIA_TYPE structure (all data will be overwritten) |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
52 * - if pDst->pbFormat!=NULL this will cause memory leak (as described in Directshow SDK)! |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
53 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
54 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
55 HRESULT CopyMediaType(AM_MEDIA_TYPE* pDst,const AM_MEDIA_TYPE* pSrc); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
56 /** |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
57 * \brief allocates new AM_MEDIA_TYPE structure and fills it with info from given one |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
58 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
59 * \param[in] pSrc pointer to AM_MEDIA_TYPE structure to copy data from |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
60 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
61 * \return result code, returned from CopyMediaType |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
62 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
63 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
64 AM_MEDIA_TYPE* CreateMediaType(const AM_MEDIA_TYPE* pSrc); |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
65 |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
66 /** |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
67 * \brief compares two AM_MEDIA_TYPE structures for compatibility |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
68 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
69 * \param[in] pmt1 first AM_MEDIA_TYPE structure for compare |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
70 * \param[in] pmt2 second AM_MEDIA_TYPE structure for compare |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
71 * \param[in] bWildcards 1 means that GUID_NULL of one structure will be compatible with any value of another structure |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
72 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
73 * \return 1 if structures are compatible |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
74 * \return 0 if structures are not compatible |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
75 * |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
76 */ |
3d1b23cf3d08
Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff
changeset
|
77 int CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, int bWildcards); |