Class StreamingDemuxer¶
Defined in File demuxing.h
Class Documentation¶
-
class StreamingDemuxer¶
Streaming demuxer for continuous packet extraction.
StreamingDemuxer provides an iterator-like interface for extracting packets from media streams in a streaming fashion, useful for processing large files or real-time streams.
Public Functions
-
StreamingDemuxer(detail::DemuxerImpl *p, const std::set<int> &stream_index, int num_packets, double duration)¶
Construct a streaming demuxer.
- Parameters:
p – Pointer to demuxer implementation.
stream_index – Set of stream indices to demux.
num_packets – Number of packets to extract per iteration.
duration – Duration in seconds to extract per iteration.
-
bool done()¶
Check if demuxing is complete.
- Returns:
true if no more packets are available, false otherwise.
-
std::map<int, AnyPackets> next()¶
Get the next batch of packets.
- Returns:
Map of stream index to packets for that stream.
-
StreamingDemuxer(detail::DemuxerImpl *p, const std::set<int> &stream_index, int num_packets, double duration)¶