multimedia

package module
v0.0.0-...-4babce7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2017 License: MIT Imports: 4 Imported by: 0

README

multimedia

Read docs

Documentation

Overview

Package media allows access to Woven media files (vjpeg-15,rawpcm8u8khz)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioStream

type AudioStream struct {
	Reader    io.Reader
	FrameSize int
}

func NewAudioStream

func NewAudioStream(r io.Reader) (*AudioStream, error)

NewAudioStream returns a new audio stream

func (*AudioStream) GetFrame

func (a *AudioStream) GetFrame() ([]byte, error)

GetFrame returns a frame of audio (default 522 bytes for 15 fps video)

type Stream

type Stream struct {
	Video *VideoStream
	Audio *AudioStream
}

func NewStream

func NewStream(cr io.Reader) (*Stream, error)

NewStream creates a Woven media stream from a reader

func (*Stream) GetFrame

func (s *Stream) GetFrame() ([]byte, image.Image, error)

GetFrame returns one frame of audio and video

func (*Stream) GetRawFrame

func (s *Stream) GetRawFrame() ([]byte, []byte, error)

GetRawFrame is the same, but returns a raw video frame instead

type VideoStream

type VideoStream struct {
	Reader   io.Reader
	FPS      int
	CurFrame int
}

func NewVideoStream

func NewVideoStream(r io.Reader) (*VideoStream, error)

NewVideoStream returns a video stream

func (*VideoStream) GetFrame

func (v *VideoStream) GetFrame() (image.Image, error)

GetFrame returns a frame of video as an image

func (*VideoStream) GetRawFrame

func (v *VideoStream) GetRawFrame() ([]byte, error)

GetRawFrame returns one raw jpeg frame

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL