Move codec_privates onto DiscTitle, eliminate duplicate methods
Design fix: codec_privates are now a field on DiscTitle, not a separate parameter passed through the pipeline. This eliminates the root cause of the network codec_private bug (forgot to pass the separate param). API changes: - output() takes (url, &DiscTitle) — no separate codec_privates param - MkvOutputStream::create, M2tsOutputStream::create, NetworkOutputStream::connect all read codec_privates from title.codec_privates - M2tsMeta::from_title() takes only &DiscTitle — reads privates from title - Deleted from_title_with_privates (was the wrong-name duplicate) - Merged read_header + read_header_from_stream into one read_header(impl Read) - Deleted finish(self) from TsMuxer, keep only finish(&mut self) Rule: ONE public method per action. No _with_X, _from_Y, _ref variants.
This commit is contained in:
@@ -51,6 +51,7 @@ fn sample_disc_title() -> DiscTitle {
|
||||
chapters: Vec::new(),
|
||||
extents: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,6 +453,7 @@ fn meta_codec_roundtrip() {
|
||||
chapters: Vec::new(),
|
||||
extents: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
};
|
||||
|
||||
let meta = M2tsMeta::from_title(&dt);
|
||||
@@ -486,6 +488,7 @@ fn meta_empty_streams() {
|
||||
chapters: Vec::new(),
|
||||
extents: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
};
|
||||
|
||||
let meta = M2tsMeta::from_title(&dt);
|
||||
@@ -505,6 +508,7 @@ fn meta_all_stream_types() {
|
||||
clips: Vec::new(),
|
||||
chapters: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
streams: vec![
|
||||
Stream::Video(VideoStream {
|
||||
pid: 0x1011,
|
||||
@@ -651,6 +655,7 @@ fn mkvstream_roundtrip_bdts() {
|
||||
chapters: Vec::new(),
|
||||
extents: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
};
|
||||
|
||||
let output = Cursor::new(Vec::new());
|
||||
@@ -731,6 +736,7 @@ fn mkvstream_meta_preserves_all_streams() {
|
||||
chapters: Vec::new(),
|
||||
extents: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
};
|
||||
|
||||
let output = Cursor::new(Vec::new());
|
||||
@@ -791,6 +797,7 @@ fn mkvstream_e2e_h264_produces_valid_mkv() {
|
||||
chapters: Vec::new(),
|
||||
extents: Vec::new(),
|
||||
content_format: ContentFormat::BdTs,
|
||||
codec_privates: Vec::new(),
|
||||
};
|
||||
|
||||
// Build synthetic BD-TS packets containing valid H.264 NALs
|
||||
|
||||
Reference in New Issue
Block a user