mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-04 07:46:33 +08:00
Remove io interrupter interface
This commit is contained in:
@@ -15,23 +15,17 @@ AVIOInterruptCB astiavNewInterruptCallback(int *ret)
|
||||
*/
|
||||
import "C"
|
||||
|
||||
type IOInterrupter interface {
|
||||
Interrupt()
|
||||
}
|
||||
|
||||
var _ IOInterrupter = (*ioInterrupter)(nil)
|
||||
|
||||
type ioInterrupter struct {
|
||||
type IOInterrupter struct {
|
||||
c C.struct_AVIOInterruptCB
|
||||
i C.int
|
||||
}
|
||||
|
||||
func newIOInterrupter() *ioInterrupter {
|
||||
cb := &ioInterrupter{}
|
||||
func newIOInterrupter() *IOInterrupter {
|
||||
cb := &IOInterrupter{}
|
||||
cb.c = C.astiavNewInterruptCallback(&cb.i)
|
||||
return cb
|
||||
}
|
||||
|
||||
func (cb *ioInterrupter) Interrupt() {
|
||||
func (cb *IOInterrupter) Interrupt() {
|
||||
cb.i = 1
|
||||
}
|
||||
|
Reference in New Issue
Block a user