pkt.reassign(newstream, ts);
transcoder.debug_log(DebugLog::DEMUX, &format!(" Got packet from input stream {src_id} ts {ts:?}"));
- if transcoder.verbose > 0 && time.elapsed() >= show_interval {
- if let Some(pts) = pkt.get_pts() {
- let cur_time = format_time(NATimeInfo::rescale_ts(pts, pkt.ts.tb_num, pkt.ts.tb_den, 1, 1000));
- print!(" {}", cur_time);
- last_known_time = Some(cur_time);
- } else if let Some(ref time) = last_known_time {
- print!(" {time}");
- } else {
- print!(" ???");
- }
- if !duration_string.is_empty() {
- print!(" / {}", duration_string);
- }
- if transcoder.verbose > 1 {
- print!(" data sizes V: {} A: {}", vdata_size, adata_size);
- }
- print!("\r");
- std::io::stdout().flush().unwrap();
- time = Instant::now();
- }
match transcoder.encoders[src_id] {
OutputMode::Drop => {
transcoder.debug_log(DebugLog::ENCODE, &format!(" Packet from stream {src_id} dropped"));
},
OutputMode::Copy(dst_id) => {
+ if let Some(pts) = pkt.ts.pts {
+ last_known_time = Some(NATimeInfo::rescale_ts(pts, pkt.ts.tb_num, pkt.ts.tb_den, 1, 1000));
+ }
if mux_quirks.is_global_pal() && pkt.ts.pts != Some(0) &&
pkt.side_data.iter().any(|sd| matches!(sd, NASideData::Palette(true, _))) {
println!("Palette change encountered while muxer does not support that!");
transcoder.queue.queue_packet(pkt, &mut transcoder.debug);
},
OutputMode::Encode(dst_id, ref mut encoder) => {
+ if let Some(pts) = pkt.ts.pts {
+ last_known_time = Some(NATimeInfo::rescale_ts(pts, pkt.ts.tb_num, pkt.ts.tb_den, 1, 1000));
+ }
if mux_quirks.is_global_pal() && pkt.ts.pts != Some(0) &&
pkt.side_data.iter().any(|sd| matches!(sd, NASideData::Palette(true, _))) {
println!("Palette change encountered while muxer does not support that!");
},
};
+ if transcoder.verbose > 0 && time.elapsed() >= show_interval {
+ if let Some(time) = last_known_time {
+ print!(" {}", format_time(time));
+ } else {
+ print!(" ???");
+ }
+ if !duration_string.is_empty() {
+ print!(" / {}", duration_string);
+ }
+ if transcoder.verbose > 1 {
+ print!(" data sizes V: {} A: {}", vdata_size, adata_size);
+ }
+ print!("\r");
+ std::io::stdout().flush().unwrap();
+ time = Instant::now();
+ }
+
if !retrieve_packets(&mut transcoder, &mut mux, &mut vdata_size, &mut adata_size, false) {
break;
}