1 /* 2 * 3 * Copyright 2010 Rockchip Electronics Co. LTD 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 #ifndef __MPG4D_PARSER_H__ 19 #define __MPG4D_PARSER_H__ 20 21 #include "mpp_packet.h" 22 #include "mpp_buf_slot.h" 23 #include "hal_dec_task.h" 24 #include "parser_api.h" 25 26 #define MPG4D_DBG_FUNCTION (0x00000001) 27 #define MPG4D_DBG_STARTCODE (0x00000002) 28 #define MPG4D_DBG_BITS (0x00000004) 29 #define MPG4D_DBG_RESULT (0x00000008) 30 #define MPG4D_DBG_TIME (0x00000100) 31 32 typedef void* Mpg4dParser; 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 MPP_RET mpp_mpg4_parser_init(Mpg4dParser *ctx, ParserCfg *cfg); 39 MPP_RET mpp_mpg4_parser_deinit(Mpg4dParser ctx); 40 MPP_RET mpp_mpg4_parser_flush(Mpg4dParser ctx); 41 MPP_RET mpp_mpg4_parser_reset(Mpg4dParser ctx); 42 43 MPP_RET mpp_mpg4_parser_split(Mpg4dParser ctx, MppPacket dst, MppPacket src); 44 MPP_RET mpp_mpg4_parser_decode(Mpg4dParser ctx, MppPacket pkt); 45 MPP_RET mpp_mpg4_parser_setup_syntax(Mpg4dParser ctx, MppSyntax *syntax); 46 MPP_RET mpp_mpg4_parser_setup_hal_output(Mpg4dParser ctx, RK_S32 *output); 47 MPP_RET mpp_mpg4_parser_setup_refer(Mpg4dParser ctx, RK_S32 *refer, RK_S32 max_ref); 48 MPP_RET mpp_mpg4_parser_update_dpb(Mpg4dParser ctx); 49 50 #ifdef __cplusplus 51 } 52 #endif 53 54 #endif/* __MPG4D_PAESER_H__ */ 55