annotate loader/dshow/mediatype.h @ 36322:d649e84ea8d5

Make VDPAU support work again with latest FFmpeg.
author reimar
date Sun, 11 Aug 2013 18:28:58 +0000
parents 0f1b5b68af32
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 */
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
6
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
7 #ifndef MPLAYER_MEDIATYPE_H
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
8 #define MPLAYER_MEDIATYPE_H
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
9
22305
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
10 #include "guids.h"
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26045
diff changeset
11
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 25547
diff changeset
12 typedef struct __attribute__((__packed__)) MediaType
24428
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
13 {
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
14 GUID majortype; //0x0
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
15 GUID subtype; //0x10
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
16 int bFixedSizeSamples; //0x20
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
17 int bTemporalCompression; //0x24
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
18 unsigned long lSampleSize; //0x28
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
19 GUID formattype; //0x2c
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
20 IUnknown* pUnk; //0x3c
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
21 unsigned long cbFormat; //0x40
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
22 char* pbFormat; //0x44
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
23 } AM_MEDIA_TYPE;
4691811bd8c7 Move AM_MEDIA_TYPE structure definition to mediatype.h.
voroshil
parents: 23493
diff changeset
24
22305
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 * \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
27 * =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
28 * \param[in] pmt pointer to AM_MEDIA_TYPE
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26045
diff changeset
29 *
22305
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
30 * routine used for debug purposes
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 */
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
33 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
34 /**
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
35 * \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
36 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
37 * \param[in] pmt pointer to structure
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
38 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
39 * \note
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
40 * 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
41 * valid after this routine call.
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
42 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
43 */
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
44 void FreeMediaType(AM_MEDIA_TYPE* pmt);
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
45 /**
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
46 * \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
47 * members
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
48 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
49 * \param[in] pmt pointer to structure
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
50 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
51 * \note
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
52 * 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
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 void DeleteMediaType(AM_MEDIA_TYPE* pmt);
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 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
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 * \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
61 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
62 * \return S_OK - success
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
63 * \return E_POINTER - pSrc or pDst is NULL or (pSrc->cbFormat && !pSrc->pbFormat)
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 26045
diff changeset
64 * \return E_INVALIDARG - (pSrc == pDst)
22305
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
65 * \return E_OUTOFMEMORY - Insufficient memory
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 * \note
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
68 * - 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
69 * - 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
70 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
71 */
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
72 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
73 /**
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
74 * \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
75 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
76 * \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
77 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
78 * \return result code, returned from CopyMediaType
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
79 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
80 */
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
81 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
82
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
83 /**
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
84 * \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
85 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
86 * \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
87 * \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
88 * \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
89 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
90 * \return 1 if structures are compatible
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
91 * \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
92 *
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
93 */
3d1b23cf3d08 Moving duplicated (and sometimes wrong) AM_MEDIA_TYPE related code into separate file
voroshil
parents:
diff changeset
94 int CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, int bWildcards);
23493
133b63fc16a2 Add regular #define for header file.
voroshil
parents: 22305
diff changeset
95
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25794
diff changeset
96 #endif /* MPLAYER_MEDIA_TYPE_H */