Sample Usage
3-9
3.3 Sample Test Application
The test application exercises the
IH264FHDVENC_Params
extended class
of the H.264 Encoder.
Table 3-1. Process ( ) Implementation.
/* Main Function acting as a client for Video Encode Call*/
H264VENC_setinitparams (¶ms);
H264VENC_setrunparams (&dynamicparams);
HDVICP_initHandle(&hdvicpObj);
/*---------------- Encoder creation -----------------*/
handle = (IALG_Handle) h264VENC_create();
/*-------------- Get Buffer information -------------*/
H264VENC_control(handle, XDM_GETBUFINFO);
/*-Do-While Loop for Encode Call for a given stream-*/
do
{
/* Read the Input Frame in the Application Input Buffer */
validBytes = ReadInputData(inFile);
/* Optional: Set Run time parameters in the Algorithm via
control() */
h264VENC_control(handle, XDM_SETPARAMS);
/*------ Start the process to start encoding a frame.----*/
retVal = h264VENC_encode
(
handle,
(IVIDEO1_BufDescIn *)&inputBufDesc,
(XDM_BufDesc *)&outputBufDesc,
(IVIDENC1_InArgs *)&inArgs,
(IVIDENC1_OutArgs *)&outArgs
);
/* Get the status of the encoder using control call */
h264VENC_control(handle,
XDM_GETSTATUS);
} while(1);
//End of Do-While loop - which encodes frames.
ALG_delete (handle);
Note:
This sample test application does not depict the actual function
parameter or control code. It shows the basic flow of the code.
Summary of Contents for DM6467
Page 1: ...H 264 1080p 30 BP Encoder on DM6467 User s Guide Literature Number SPRUGN8 October 2009 ...
Page 10: ...x This page is intentionally left blank ...
Page 12: ...xii This page is intentionally left blank ...
Page 18: ...Introduction 1 6 This page is intentionally left blank ...
Page 36: ...Sample Usage 3 10 This page is intentionally left blank ...