mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-09-26 20:01:22 +08:00
21 lines
540 B
Go
21 lines
540 B
Go
// Copyright (c) 2023 QRTC. All rights reserved.
|
|
// Use of this source code is governed by a MIT
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package ffmpeg
|
|
|
|
/*
|
|
#include <libavcodec/adts_parser.h>
|
|
*/
|
|
import "C"
|
|
|
|
const (
|
|
AV_AAC_ADTS_HEADER_SIZE = C.AV_AAC_ADTS_HEADER_SIZE
|
|
)
|
|
|
|
// AvAdtsHeaderParse extracts the number of samples and frames from AAC data.
|
|
func AvAdtsHeaderParse(buf *uint8, sample *uint32, frame *uint8) int32 {
|
|
return (int32)(C.av_adts_header_parse((*C.uint8_t)(buf),
|
|
(*C.uint32_t)(sample), (*C.uint8_t)(frame)))
|
|
}
|