📄 cellmpeg2enc.c
字号:
/*
* Copyright 2002 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
*/
/* ======== cellMpeg2enc.c ========
*
*/
#include <std.h>
#include <algrf.h>
#include "cellmpeg2enc.h"
// v-table for this cell
ICELL_Fxns MPEG2ENC_CELLFXNS = {
NULL, // cellClose
MPEG2ENC_cellControl, // cellControl
MPEG2ENC_cellExecute, // cellExecute
NULL // cellOpen
};
/*
* ======== MPEG2ENC_cellExecute ========
*
*/
Bool MPEG2ENC_cellExecute( ICELL_Handle handle, Arg arg )
{
IMPEG2VENC_Fxns *mpeg2encFxns = (IMPEG2VENC_Fxns *)handle->algFxns;
IMPEG2VENC_Handle mpeg2encHandle = (IMPEG2VENC_Handle)handle->algHandle;
mpeg2encFxns->ialg.algActivate((IALG_Handle)mpeg2encHandle);
mpeg2encFxns->encodeFrame( mpeg2encHandle,
(unsigned char **)handle->inputIcc[0]->buffer,
(unsigned int *)handle->outputIcc[0]->buffer,(int) arg);
mpeg2encFxns->ialg.algDeactivate((IALG_Handle)mpeg2encHandle);
return ( TRUE );
}
/*
* ======== MPEG2ENC_cellControl ========
*
*/
Int MPEG2ENC_cellControl(ICELL_Handle handle, IALG_Cmd cmd, IALG_Status *status)
{
IMPEG2VENC_Fxns *mpeg2encFxns = (IMPEG2VENC_Fxns *)handle->algFxns;
IMPEG2VENC_Handle mpeg2encHandle = (IMPEG2VENC_Handle )handle->algHandle;
IMPEG2VENC_Status *mpeg2status = (IMPEG2VENC_Status *)status;
IMPEG2VENC_Cmd mpeg2cmd = (IMPEG2VENC_Cmd )cmd;
if( mpeg2encFxns->control != NULL ) {
mpeg2encFxns->control( mpeg2encHandle, mpeg2cmd, mpeg2status );
}
return 1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -