[out] hEnc | Handle to the new created encoder |
---|---|
[in] pScheduler | Pointer to the scheduler object |
[in] pAlloc | Pointer to a AL_TAllocator interface |
[in] pSettings | Pointer to a AL_TEncSettings structure specifying the encoder parameters |
[in] callback | Callback to be called when the encoding of a frame is finished |
Description
Creates a new encoder and returns a handle to it. The encoding format is fixed when the encoder object is created. For applications that encode both H.264 and H.265 streams, to switch from one encoding to the other, the encoder object must be destroyed and recreated with different settings. The parameters of the VCU LogiCore are fixed in the Programmable Logic bitstream and should be selected for the most demanding case.
Return
On success, returns AL_SUCCESS. On error, returns AL_ERROR, AL_ERR_NO_MEMORY, or return value of ioctl. AL_ERROR may indicate a memory allocation failure, failure to open /dev/allegroIP, or failure to post a message to the encoder. Error return codes from ioctl indicate failure interacting with the device driver.
See
DmaAlloc_Create, AL_Settings_SetDefaultParam, AL_SchedulerMcu_Create, AL_GetHardwareDriver, AL_Encoder_Destroy, AL_Allocator_Destroy, AL_CB_EndEncoding