1 /* 2 * Copyright 2020 Rockchip Electronics Co. LTD 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef SRC_TESTS_RT_MPI_COMMON_TEST_COMM_TMD_H_ 18 #define SRC_TESTS_RT_MPI_COMMON_TEST_COMM_TMD_H_ 19 #include <stdlib.h> 20 #include <stdio.h> 21 #include <string.h> 22 #include "rk_debug.h" 23 #include "rk_comm_vdec.h" 24 25 typedef struct _rkStreamInfo { 26 VDEC_CHN VdecChn; 27 void *pFFmCtx; 28 void *pExtraData; 29 RK_U32 u32ExtraDataSize; 30 RK_U32 u32StreamIndex; 31 RK_BOOL bFindKeyFrame; 32 RK_CODEC_ID_E enCodecId; 33 VIDEO_MODE_E enMode; 34 RK_U32 u32PicWidth; 35 RK_U32 u32PicHeight; 36 } STREAM_INFO_S; 37 38 typedef RK_S32 (*RK_FREE_CB)(void *); 39 40 typedef struct _rkStreamData_S { 41 RK_U8 *pu8VirAddr; 42 RK_U64 u64Size; 43 RK_FREE_CB pFreeCB; 44 RK_VOID *pOpaque; 45 RK_BOOL bEndOfStream; 46 RK_BOOL bEndOfFrame; 47 RK_U64 u64PTS; 48 } STREAM_DATA_S; 49 50 RK_S32 TEST_COMM_CodecIDTmediaToRK(RK_S32 s32Id); 51 RK_S32 TEST_COMM_TmdParserOpen(const char *uri, STREAM_INFO_S *pstStreamInfo); 52 RK_S32 TEST_COMM_TmdParserRead(STREAM_INFO_S *pstStreamInfo, STREAM_DATA_S *pstStreamData); 53 RK_S32 TEST_COMM_TmdParserClose(STREAM_INFO_S *pstStreamInfo); 54 55 #endif // SRC_TESTS_RT_MPI_COMMON_TEST_COMM_TMD_H_ 56 57