arduino-audio-tools
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
Video.h File Reference
#include "AudioTools/CoreAudio/AudioOutput.h"
#include "AudioTools/CoreAudio/Buffers.h"
#include "AudioTools/Video/CodecCopy.h"
#include "AudioTools/Video/VideoOutput.h"
#include "AudioTools/Video/PacedVideoOutput.h"
#include "stdint.h"

Go to the source code of this file.

Classes

class  VideoFrameMeter::PrintView
 
class  VideoFrameMeter
 Transparent write() wrapper that measures throughput/turnaround while forwarding every call unchanged to the target given in the constructor - drop it into a pipeline slot (e.g. h264Decoder.setOutput( meter) instead of h264Decoder.setOutput(tftOutput), with meter wrapping tftOutput) to find out how that one stage is actually performing, without instrumenting the stage itself. More...
 
class  VideoFrameSource
 Pull-based provider of one already-encoded video/image frame at a time - e.g. wraps a camera capture + H264Encoder/MJPEG capture pipeline. Used by VideoMuxerWithTasks's video task, which calls nextFrame() once per iteration, at the rate given by videoInfo().fps. Implementations should produce/capture the frame here directly (not defer it): a slow nextFrame() only delays whatever is pulling from it. More...
 

Namespaces

namespace  audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.
 

Enumerations

enum  StreamContentType { Audio , Video }
 Which track write() feeds, for muxers (MuxerAVI, MuxerMP4) that double as a plain, generic Print-like sink for both tracks - see setStreamType()/streamType() on those classes. More...
 

Functions

bool isH264KeyFrame (const uint8_t *data, size_t len)
 True if the given Annex-B H.264 access unit contains an IDR slice NAL unit (nal_unit_type 5) - the reliable way to tell a real keyframe/sync-sample apart from a P-frame, since nothing in the byte layout itself says so without inspecting NAL headers. Used e.g. to determine Muxer::addVideoFrame()'s isKeyFrame argument for an already-encoded VideoFormat::H264 frame.
 
bool isMpeg1KeyFrame (const uint8_t *data, size_t len)
 True if the given MPEG-1/2 video access unit's picture header declares picture_coding_type == 1 (I-picture) - the MPEG equivalent of isH264KeyFrame(). Layout (ISO/IEC 11172-2): a 00 00 01 00 picture_start_code is immediately followed by temporal_reference (10 bits) then picture_coding_type (3 bits), so the type field always falls in bits 5-3 of the byte right after the 2-byte temporal_reference span (i.e. 6 bytes into the access unit, counting the start code).
 
size_t videoFrameSizeBytes (VideoFormat format, uint16_t width, uint16_t height)
 Fixed per-frame size (bytes) for a raw/uncompressed VideoFormat at the given resolution - 0 for compressed formats (H264/MJPEG/MPEG4) or VideoFormat::UNKNOWN, since their frame size varies per frame.