Documentation ¶
Index ¶
- Constants
- Variables
- type File
- func (flvFile *File) Close()
- func (flvFile *File) FilePath() string
- func (flvFile *File) IsFinished() bool
- func (flvFile *File) LoopBack()
- func (flvFile *File) ReadTag() (header *TagHeader, data []byte, err error)
- func (flvFile *File) SetDuration(duration float64)
- func (flvFile *File) Size() (size int64)
- func (flvFile *File) Sync() (err error)
- func (flvFile *File) WriteAudioTag(data []byte, timestamp uint32) (err error)
- func (flvFile *File) WriteTag(data []byte, tagType byte, timestamp uint32) (err error)
- func (flvFile *File) WriteVideoTag(data []byte, timestamp uint32) (err error)
- type TagHeader
Constants ¶
View Source
const ( AUDIO_TAG = byte(0x08) VIDEO_TAG = byte(0x09) SCRIPT_DATA_TAG = byte(0x12) DURATION_OFFSET = 53 HEADER_LEN = 13 )
Variables ¶
View Source
var (
HEADER_BYTES = []byte{'F', 'L', 'V', 0x01, 0x05, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x0a, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61,
0x08, 0x00, 0x00, 0x00, 0x01,
0x00, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x33}
)
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func CreateFile ¶
func (*File) IsFinished ¶
func (*File) SetDuration ¶
func (*File) WriteAudioTag ¶
Data with audio header
Click to show internal directories.
Click to hide internal directories.