#include <iMJ2Enc.h>
Inheritance diagram for CMJ2EncT:


Public Member Functions | |
| CMJ2EncT (BOOL bInterlaced, DWORD dwIdealProcessor, const GUID *pOEM_LIC) | |
| Constructor. | |
| ~CMJ2EncT () | |
| Destructor. | |
| virtual int | prepare (JPEG2000INFOHEADER2 *jp2, int argc, char **argv, BYTE *in, int in_size, int in_ofs, int in_row, int in_width, int in_height, DWORD in_fcc, int in_bits, BYTE *out, int out_size, int out_quality, int out_desired_size) |
| Prepare encoding. | |
| virtual HANDLE | start () |
| Create the thread and start it. | |
| virtual int | sync () |
| Wait for completion of the threaded encoding. | |
Protected Member Functions | |
| virtual int | encode (JPEG2000INFOHEADER2 *jp2, int argc, char **argv, BYTE *in, int in_size, int in_ofs, int in_row, int in_width, int in_height, DWORD in_fcc, int in_bits, BYTE *out, int out_size, int out_quality, int out_desired_size) |
| Encode one frame or field in the thread created by start(). | |
Protected Attributes | |
| PSetThreadIdealProcessor | m_pSetThreadIdealProcessor |
| HANDLE | m_hThread |
| Thread handle. | |
| HANDLE | m_hEvent |
| Completion event. | |
| DWORD | m_dwIdealProcessor |
| Store dwIdealProcessor passed to constructor CMJ2EncT(). | |
| DWORD | m_encoded_size |
| Encoded field or frame size. | |
| ENCODE_PARAM | m_ep |
| Encoding parameters. | |
Private Member Functions | |
| void | encodeT () |
| Instanciated thread method. | |
Static Private Member Functions | |
| static void __cdecl | encodeT (void *param) |
| Static thread function, it calls instanciated thread method (see below). | |
Related Functions | |
| (Note that these are not member functions.) | |
| typedef WINBASEAPI DWORD(WINAPI * | PSetThreadIdealProcessor )(HANDLE hThread, DWORD dwIdealProcessor) |
| Windows' SetThreadIdealProcessor() function pointer type. | |
This class encodes a single frame or field on a thread it creates. It tries to run this thread on a the ideal CPU passed to its constructor.
The calling sequence is :
|
||||||||||||||||
|
Constructor.
|
|
|
Destructor.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Prepare encoding.
|
|
|
Create the thread and start it.
Create the encoding thread. Run the thread on the CPU specified by m_dwIdealProcessor. |
Here is the call graph for this function:

|
|
Wait for completion of the threaded encoding.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Encode one frame or field in the thread created by start().
The size in bytes of the field or frame encoded is stored in m_encoded_size. Set the completion event. Self-destroy the thread.
Reimplemented from IMJ2Enc. |
Here is the call graph for this function:

|
|
Static thread function, it calls instanciated thread method (see below).
|
|
|
Instanciated thread method. It calls encode(). |
Here is the call graph for this function:

|
|
Windows' SetThreadIdealProcessor() function pointer type. Used to dynamically link to SetThreadIdealProcessor() using GetProcAddress() because SetThreadIdealProcessor() isn't available in Win9x/me. |
|
|
|
|
|
Thread handle.
|
|
|
Completion event.
|
|
|
Store dwIdealProcessor passed to constructor CMJ2EncT().
|
|
|
Encoded field or frame size.
|
|
|
Encoding parameters.
|
|
© Morgan Multimedia 1990-2005 |