diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2024-04-23 18:44:02 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2024-04-23 18:44:02 +0200 |
commit | 1b56382ecc132f9a414486cad4ac9f75241955fb (patch) | |
tree | c83de821bf2cdcd2e196596f87a86f6a519c298d /nihav-core | |
parent | 962b9cb37ad2ff46692eee62087c53805a3c675b (diff) | |
download | nihav-1b56382ecc132f9a414486cad4ac9f75241955fb.tar.gz |
Introduce NAPacketiser::attach_stream()
This allows packetisers to get initial stream information and act on it
during parsing process or returning a new stream.
Diffstat (limited to 'nihav-core')
-rw-r--r-- | nihav-core/src/codecs/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 37857d9..b7d7819 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -427,6 +427,10 @@ impl RegisteredEncoders { /// Trait for packetisers (objects that form full packets from raw stream data). pub trait NAPacketiser { + /// Provides the reference stream from the demuxer to the packetiser. + /// + /// This may be useful in cases when packetiser cannot determine stream parameters by itself. + fn attach_stream(&mut self, stream: NAStreamRef); /// Queues new raw stream data for parsing. /// /// Returns false is the internal buffer grows too large. |