-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathbit_stream_filter.go
More file actions
36 lines (30 loc) · 866 Bytes
/
bit_stream_filter.go
File metadata and controls
36 lines (30 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package astiav
//#include <libavcodec/bsf.h>
//#include <stdlib.h>
import "C"
import (
"unsafe"
)
// https://ffmpeg.org/doxygen/8.0/structAVBitStreamFilter.html
type BitStreamFilter struct {
c *C.AVBitStreamFilter
}
func newBitStreamFilterFromC(c *C.AVBitStreamFilter) *BitStreamFilter {
if c == nil {
return nil
}
return &BitStreamFilter{c: c}
}
// https://ffmpeg.org/doxygen/8.0/group__lavc__bsf.html#gae491493190b45698ebd43db28c4e8fe9
func FindBitStreamFilterByName(n string) *BitStreamFilter {
cn := C.CString(n)
defer C.free(unsafe.Pointer(cn))
return newBitStreamFilterFromC(C.av_bsf_get_by_name(cn))
}
// https://ffmpeg.org/doxygen/8.0/structAVBitStreamFilter.html#a33c3cb51bd13060da35481655b41e4e5
func (bsf *BitStreamFilter) Name() string {
return C.GoString(bsf.c.name)
}
func (bsf *BitStreamFilter) String() string {
return bsf.Name()
}