mirror of
https://github.com/Tryanks/go-rkcodec.git
synced 2025-12-19 00:18:03 +08:00
init commit
This commit is contained in:
0
CHANGELOG.md
Normal file
0
CHANGELOG.md
Normal file
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Tryanks
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
46
mpi.go
Normal file
46
mpi.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package rkcodec
|
||||
|
||||
//#cgo pkg-config: rockchip_mpp
|
||||
//##include <rockchip/rk_mpi.h>
|
||||
import "C"
|
||||
|
||||
type MppFrame struct {
|
||||
c *C.struct_MppFrame
|
||||
}
|
||||
|
||||
type MppCtx struct {
|
||||
c *C.struct_MppCtx
|
||||
}
|
||||
|
||||
type MppApi struct {
|
||||
c *C.struct_MppApi
|
||||
}
|
||||
|
||||
type MpiCmd C.enum_MpiCmd
|
||||
|
||||
const (
|
||||
MpiCmdBase = MpiCmd(C.MPI_CMD_BASE)
|
||||
MpiDecSetParserSplitMode = MpiCmd(C.MPI_DEC_SET_PARSER_SPLIT_MODE)
|
||||
MppDecSetImmediateOut = MpiCmd(C.MPP_DEC_SET_IMMEDIATE_OUT)
|
||||
MppSetInputBlock = MpiCmd(C.MPP_SET_INPUT_BLOCK)
|
||||
MppSetInputTimeout = MpiCmd(C.MPP_SET_INPUT_TIMEOUT)
|
||||
MppSetOutputBlock = MpiCmd(C.MPP_SET_OUTPUT_BLOCK)
|
||||
MppSetOutputTimeout = MpiCmd(C.MPP_SET_OUTPUT_TIMEOUT)
|
||||
)
|
||||
|
||||
type MppCtxType C.enum_MppCtxType
|
||||
|
||||
const (
|
||||
MppCtxTypeDecoder = MppCtxType(C.MPP_CTX_DEC)
|
||||
MppCtxTypeEncoder = MppCtxType(C.MPP_CTX_ENC)
|
||||
)
|
||||
|
||||
type MppCodingType C.enum_MppCodingType
|
||||
|
||||
const (
|
||||
MppCodingTypeAVC = MppCodingType(C.MPP_VIDEO_CodingAVC)
|
||||
MppCodingTypeHEVC = MppCodingType(C.MPP_VIDEO_CodingHEVC)
|
||||
MppCodingTypeVP8 = MppCodingType(C.MPP_VIDEO_CodingVP8)
|
||||
MppCodingTypeVP9 = MppCodingType(C.MPP_VIDEO_CodingVP9)
|
||||
MppCodingTypeMJPEG = MppCodingType(C.MPP_VIDEO_CodingMJPEG)
|
||||
)
|
||||
Reference in New Issue
Block a user