You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
808 B
30 lines
808 B
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2020-2020. All rights reserved.
|
|
* Description: audio hal utils header file.
|
|
* Author: Hisilicon
|
|
* Create: 2020-05-11
|
|
* Notes: NA
|
|
* History: 2020-05-11 yinyingcai for CodingStyle
|
|
*/
|
|
#ifndef AUDIO_UTILS_H
|
|
#define AUDIO_UTILS_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define PTS_HEADER_NORM_CHAN_LENGTH_V1 16
|
|
#define PTS_HEADER_NORM_CHAN_LENGTH_V2 20
|
|
#define PTS_HEADER_MUTI_CHAN_LENGTH 48
|
|
|
|
#define TIME_RADIX_1000 1000 /* s <-> ms, ms <-> us */
|
|
|
|
struct pts_header_info {
|
|
uint32_t pts_header_length;
|
|
uint32_t frame_size;
|
|
uint64_t frame_pts;
|
|
uint32_t data_offset_size;
|
|
};
|
|
|
|
int utils_findheader(const uint8_t* pBuf, uint32_t u32Size, struct pts_header_info *header_info);
|
|
uint64_t utils_get_cur_time(void);
|
|
#endif
|