Introduce NAPacketiser::attach_stream()
[nihav.git] / nihav-core / src / codecs / mod.rs
index 37857d98d1f3cc7d4779bc628171b2c8ec68747a..b7d781987a8a7da159561ba8fb0bb076137b12c2 100644 (file)
@@ -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.