Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

DirectShow helper functions.

Some helper functions to properly get and set information in a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents a BITMAPINFOHEADER. More...

Functions

static PBITMAPINFOHEADER GetPbmiHeader (const CMediaType *pMediaType)
 Get a pointer to the BITMAPINFOHEADER present in pMediaType.
static WORD GetInterlaceFlags (const CMediaType *pMediaType)
 Get Interlace Flags.
static BOOL GetInterlaceFlags (const CMediaType *pMediaType, WORD flag)
 Get flag of Interlace Flags.
static BOOL IsInterlaced (const CMediaType *pMediaType)
 Is JP2K_Field1First set in Interlace Flags.
static BOOL GetField1First (const CMediaType *pMediaType)
 Is JP2K_Field1First set in Interlace Flags.
static BOOL GetFieldsSize (const CMediaType *pMediaType, PDWORD pSizeField1, PDWORD pSizeField2)
 Get pointers to SizeField1 and SizeField2 of a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.
static BOOL SetFieldsSize (const CMediaType *pMediaType, DWORD dwSizeField1, DWORD dwSizeField2)
 Set values of SizeField1 and SizeField2 in a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.

Detailed Description

Some helper functions to properly get and set information in a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents a BITMAPINFOHEADER.

Requires CMediaType to be already defined (MtType.h).
Requires VIDEOINFOHEADER2 to be already defined (DVDMedia.h).

Your DirectShow project should do includes in this order:

        #include <streams.h>
        #include <dvdmedia.h>
        #include "JPEG2000.h"

Function Documentation

static PBITMAPINFOHEADER GetPbmiHeader const CMediaType *  pMediaType  )  [static]
 

Get a pointer to the BITMAPINFOHEADER present in pMediaType.

Parameters:
pMediaType Pointer to a CMediaType object.
Returns:
  • A pointer to the BITMAPINFOHEADER on success.
  • NULL otherwise.
Note:
GetPbmiHeader() supports pMediaType with a VIDEOINFOHEADER or a VIDEOINFOHEADER2.

Here is the call graph for this function:

static WORD GetInterlaceFlags const CMediaType *  pMediaType  )  [static]
 

Get Interlace Flags.

Parameters:
pMediaType Pointer to a CMediaType object.
Returns:
The Interlace Flags from a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.

static BOOL GetInterlaceFlags const CMediaType *  pMediaType,
WORD  flag
[static]
 

Get flag of Interlace Flags.

Parameters:
pMediaType Pointer to a CMediaType object.
flag The flag to test.
Returns:

static BOOL IsInterlaced const CMediaType *  pMediaType  )  [static]
 

Is JP2K_Field1First set in Interlace Flags.

Parameters:
pMediaType Pointer to a CMediaType object.
Returns:

static BOOL GetField1First const CMediaType *  pMediaType  )  [static]
 

Is JP2K_Field1First set in Interlace Flags.

Parameters:
pMediaType Pointer to a CMediaType object.
Returns:

static BOOL GetFieldsSize const CMediaType *  pMediaType,
PDWORD  pSizeField1,
PDWORD  pSizeField2
[static]
 

Get pointers to SizeField1 and SizeField2 of a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.

Parameters:
pMediaType Pointer to a CMediaType object.
[out] pSizeField1 Pointer to SizeField1.
[out] pSizeField2 Pointer to SizeField2.
Returns:
  • TRUE on success.
  • FALSE otherwise.

static BOOL SetFieldsSize const CMediaType *  pMediaType,
DWORD  dwSizeField1,
DWORD  dwSizeField2
[static]
 

Set values of SizeField1 and SizeField2 in a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.

Parameters:
pMediaType Pointer to a CMediaType object.
dwSizeField1 New SizeField1 to set.
dwSizeField2 New SizeField2 to set.
Returns:
  • TRUE on success.
  • FALSE otherwise.


   

© Morgan Multimedia 1990-2005