Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TranscodeToJPEG ¶
TranscodeToJPEG converts raw image data to JPEG format. If the input is already JPEG, it validates and returns as-is.
func ValidateJPEG ¶
ValidateJPEG validates that the data is a complete JPEG image.
Types ¶
type Frame ¶
type Frame struct {
Timestamp time.Time `json:"timestamp"`
Data []byte `json:"data"`
Metadata map[string]string `json:"metadata,omitempty"`
FrameNumber int64 `json:"frame_number"`
Format FrameFormat `json:"format,omitempty"`
}
func CaptureScreenshot ¶
CaptureScreenshot captures a screenshot with format validation. If JPEG validation fails, it delegates to ParseFrame for repair/transcoding.
type FrameFormat ¶
type FrameFormat string
FrameFormat represents the detected format of a frame.
const ( FormatJPEG FrameFormat = "jpeg" FormatRAW FrameFormat = "raw" FormatUnknown FrameFormat = "unknown" )
func DetectFrameFormat ¶
func DetectFrameFormat(data []byte) FrameFormat
DetectFrameFormat detects the format of frame data using magic bytes.
Click to show internal directories.
Click to hide internal directories.