y4m

package
v1.9.13 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 8 Imported by: 0

README

Planar YUV formats

Packed YUV - yuyv422 - YUYV 4:2:2 Semi-Planar - nv12 - Y/CbCr 4:2:0 Planar YUV - yuv420p - Planar YUV 4:2:0 - aka. cosited

[video4linux2,v4l2 @ 0x55fddc42a940] Raw       :     yuyv422 :           YUYV 4:2:2 : 1920x1080
[video4linux2,v4l2 @ 0x55fddc42a940] Raw       :        nv12 :         Y/CbCr 4:2:0 : 1920x1080
[video4linux2,v4l2 @ 0x55fddc42a940] Raw       :     yuv420p :     Planar YUV 4:2:0 : 1920x1080

Documentation

Index

Constants

View Source
const FourCC = "YUV4"

Variables

This section is empty.

Functions

func GetSize

func GetSize(fmtp string) int

func HasSameColor added in v1.9.9

func HasSameColor(img image.Image) bool

HasSameColor checks if all pixels has same color

func NewImage

func NewImage(fmtp string) func(frame []byte) image.Image

func ParseHeader added in v1.9.4

func ParseHeader(b []byte) (fmtp string)

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)

type Producer

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

func Open

func Open(r io.Reader) (*Producer, error)

func (*Producer) Start

func (c *Producer) Start() error

Jump to

Keyboard shortcuts

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