h264

package
v0.0.0-...-ad8d7c7 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package h264writer implements H264 media container writer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAnyKeyframe

func IsAnyKeyframe(data []byte) bool

func IsKeyframePart

func IsKeyframePart(packetPayload []byte) bool

func WhichKeyframePart

func WhichKeyframePart(packetPayload []byte) string

Types

type H264Decoder

type H264Decoder struct {
	// contains filtered or unexported fields
}

h264Decoder is a wrapper around ffmpeg's H264 decoder.

func NewH264Decoder

func NewH264Decoder() (*H264Decoder, error)

newH264Decoder allocates a new h264Decoder.

func (*H264Decoder) Close

func (d *H264Decoder) Close()

close closes the decoder.

func (*H264Decoder) Decode

func (d *H264Decoder) Decode(nalu []byte) (image.Image, error)

type H264Writer

type H264Writer struct {
	// contains filtered or unexported fields
}

H264Writer is used to take RTP packets, parse them and write the data to an io.Writer. Currently it only supports non-interleaved mode Therefore, only 1-23, 24 (STAP-A), 28 (FU-A) NAL types are allowed. https://tools.ietf.org/html/rfc6184#section-5.2

func NewH264Writer

func NewH264Writer(filename string) (*H264Writer, error)

New builds a new H264 writer

func NewH264WriterWith

func NewH264WriterWith(w io.Writer) *H264Writer

NewWith initializes a new H264 writer with an io.Writer output

func (*H264Writer) Close

func (h *H264Writer) Close() error

Close closes the underlying writer

func (*H264Writer) WriteRTP

func (h *H264Writer) WriteRTP(packet *rtp.Packet) error

WriteRTP adds a new packet and writes the appropriate headers for it

Jump to

Keyboard shortcuts

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