mjpeg

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encoder added in v1.9.3

func Encoder(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc

func FixJPEG added in v1.9.1

func FixJPEG(b []byte) []byte

FixJPEG - reencode JPEG if it has wrong header

for example, this app produce "bad" images: https://github.com/jacksonliam/mjpg-streamer

and they can't be uploaded to the Telegram servers: {"ok":false,"error_code":400,"description":"Bad Request: IMAGE_PROCESS_FAILED"}

func MakeHeaders

func MakeHeaders(p []byte, t byte, w, h uint16, lqt, cqt []byte) []byte

func MakeHuffmanHeader

func MakeHuffmanHeader(p, codelens, symbols []byte, tableNo, tableClass byte) []byte

func MakeQuantHeader

func MakeQuantHeader(p []byte, qt []byte, tableNo byte) []byte

func MakeTables

func MakeTables(q byte) (lqt, cqt []byte)

func NewWriter added in v1.9.2

func NewWriter(w io.Writer) io.Writer

func RTPDepay

func RTPDepay(handlerFunc core.HandlerFunc) core.HandlerFunc

func RTPPay

func RTPPay(handlerFunc core.HandlerFunc) core.HandlerFunc

func Transcode added in v1.2.0

func Transcode(b []byte) ([]byte, error)

Types

type Consumer

type Consumer struct {
	core.Connection
	// contains filtered or unexported fields
}

func NewConsumer added in v1.7.0

func NewConsumer() *Consumer

func (*Consumer) AddTrack

func (c *Consumer) AddTrack(media *core.Media, _ *core.Codec, track *core.Receiver) error

func (*Consumer) WriteTo added in v1.7.0

func (c *Consumer) WriteTo(wr io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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