mjpeg

package
v0.0.0-...-c3ad350 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encoder

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

func FixJPEG

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

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

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

Types

type Consumer

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

func NewConsumer

func NewConsumer() *Consumer

func (*Consumer) AddTrack

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

func (*Consumer) WriteTo

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