mirror of
				https://github.com/nyanmisaka/mpp.git
				synced 2025-10-31 04:26:39 +08:00 
			
		
		
		
	 84c7d337bf
			
		
	
	84c7d337bf
	
	
	
		
			
			Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: I85eb166a3ebb1ae64a44c7127808fc469c6415a8
		
			
				
	
	
		
			85 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			85 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: Apache-2.0 OR MIT */
 | |
| /*
 | |
|  * Copyright (c) 2024 Rockchip Electronics Co., Ltd.
 | |
|  */
 | |
| 
 | |
| #ifndef __KMPP_H__
 | |
| #define __KMPP_H__
 | |
| 
 | |
| #include <unistd.h>
 | |
| 
 | |
| #include "mpp_impl.h"
 | |
| #include "mpp_dec_cfg.h"
 | |
| #include "mpp_enc_cfg.h"
 | |
| #include "mpp_mem_pool.h"
 | |
| #include "kmpp_obj.h"
 | |
| 
 | |
| typedef struct Kmpp_t Kmpp;
 | |
| typedef struct KmppOps_t {
 | |
|     MPP_RET (*open_client)(Kmpp *ctx);
 | |
|     MPP_RET (*init)(Kmpp *ctx, MppCtxType type, MppCodingType coding);
 | |
| 
 | |
|     MPP_RET (*start)(Kmpp *ctx);
 | |
|     MPP_RET (*stop)(Kmpp *ctx);
 | |
| 
 | |
|     MPP_RET (*pause)(Kmpp *ctx);
 | |
|     MPP_RET (*resume)(Kmpp *ctx);
 | |
| 
 | |
|     MPP_RET (*put_packet)(Kmpp *ctx, MppPacket packet);
 | |
|     MPP_RET (*get_frame)(Kmpp *ctx, MppFrame *frame);
 | |
| 
 | |
|     MPP_RET (*put_frame)(Kmpp *ctx, MppFrame frame);
 | |
|     MPP_RET (*get_packet)(Kmpp *ctx, MppPacket *packet);
 | |
|     MPP_RET (*release_packet)(Kmpp *ctx, MppPacket *packet);
 | |
| 
 | |
|     MPP_RET (*poll)(Kmpp *ctx, MppPortType type, MppPollType timeout);
 | |
|     MPP_RET (*dequeue)(Kmpp *ctx, MppPortType type, MppTask *task);
 | |
|     MPP_RET (*enqueue)(Kmpp *ctx, MppPortType type, MppTask task);
 | |
| 
 | |
|     MPP_RET (*reset)(Kmpp *ctx);
 | |
|     MPP_RET (*control)(Kmpp *ctx, MpiCmd cmd, MppParam param);
 | |
| 
 | |
|     MPP_RET (*notify_flag)(Kmpp *ctx, RK_U32 flag);
 | |
|     MPP_RET (*notify)(Kmpp *ctx, MppBufferGroup group);
 | |
| 
 | |
|     MPP_RET (*get_fd)(Kmpp *ctx, RK_S32 *fd);
 | |
|     MPP_RET (*close_fd)(Kmpp *ctx, RK_S32 fd);
 | |
|     void    (*clear)(Kmpp *ctx);
 | |
| } KmppOps;
 | |
| 
 | |
| struct Kmpp_t {
 | |
|     MppPollType         mInputTimeout;
 | |
|     MppPollType         mOutputTimeout;
 | |
| 
 | |
|     MppCtx              mCtx;
 | |
|     RK_S32              mChanId;
 | |
|     RK_U32              mEncVersion;
 | |
| 
 | |
|     MppCtxType          mType;
 | |
|     MppCodingType       mCoding;
 | |
|     RK_U32              mChanDup;
 | |
| 
 | |
|     RK_U32              mInitDone;
 | |
| 
 | |
|     RK_S32              mClientFd;
 | |
|     struct timeval      mTimeout;
 | |
| 
 | |
|     MppBufferGroup      mPacketGroup;
 | |
|     MppPacket           mPacket;
 | |
| 
 | |
|     KmppOps             *mApi;
 | |
|     KmppObj             mVencInitKcfg;
 | |
|     MppMemPool          mVencPacketPool;
 | |
| };
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| void mpp_get_api(Kmpp *ctx);
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| }
 | |
| #endif
 | |
| #endif /*__MPP_H__*/
 |