From 833cbdfed399d4218cc6221b9c7a5d6022ad299f Mon Sep 17 00:00:00 2001 From: dailz Date: Wed, 15 Apr 2026 14:01:22 +0800 Subject: [PATCH] chore(avhw): clean up debug tracing in VA-API pipeline --- src/avhw.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/avhw.rs b/src/avhw.rs index 8955cf7..a6e48b8 100644 --- a/src/avhw.rs +++ b/src/avhw.rs @@ -158,7 +158,6 @@ impl EncState { ); // 1. VAAPI device let hw_device_ctx = AvHwDevCtx::new_vaapi(drm_device)?; - tracing::debug!("EncState::new: VAAPI device created"); // 2. Frame context for capture (XRGB/RGBZ) let frames_rgb = @@ -166,7 +165,6 @@ impl EncState { // 3. Filter graph — must be built BEFORE encoder config so we can derive // hw_frames_ctx from the buffersink output (correct surface pool dimensions). - tracing::debug!("EncState::new: building filter graph..."); let video_filter = build_filter_graph( &hw_device_ctx, &frames_rgb, @@ -248,12 +246,10 @@ impl EncState { } // 5. Open encoder. Video::open() returns Encoder(Video); .0 extracts the Video. - tracing::debug!("EncState::new: opening encoder..."); let opened = enc .open() .map_err(|e| anyhow::anyhow!("Failed to open h264_vaapi encoder: {e}"))?; let enc_video = opened.0; - tracing::debug!("EncState::new: encoder opened"); // 6. Muxer setup (strict order) let output_cstr = CString::new(output_path.to_str().unwrap())?; @@ -490,8 +486,6 @@ fn build_filter_graph( let scale_vaapi = ff::filter::find("scale_vaapi") .ok_or_else(|| anyhow::anyhow!("filter 'scale_vaapi' not found"))?; - tracing::debug!("filter_graph: filters found"); - // buffersrc — use AVBufferSrcParameters to set hw_frames_ctx properly let args = format!( "video_size={}x{}:pix_fmt={}:time_base=1/{fps}:pixel_aspect=1/1", @@ -500,7 +494,6 @@ fn build_filter_graph( Into::::into(ff::format::Pixel::VAAPI) as i32, ); let mut src_ctx = graph.add(&buffersrc, "in", &args)?; - tracing::debug!("filter_graph: buffersrc added"); // SAFETY: av_buffersrc_parameters_alloc allocates params for the buffersrc. let par = unsafe { ffi::av_buffersrc_parameters_alloc() }; @@ -533,7 +526,6 @@ fn build_filter_graph( // buffersink let mut sink_ctx = graph.add(&buffersink, "out", "")?; - tracing::debug!("filter_graph: all filters added, linking..."); // Build filter chain: src -> scale -> [transpose] -> sink src_ctx.link(0, &mut scale_ctx, 0); @@ -569,7 +561,6 @@ fn build_filter_graph( graph .validate() .map_err(|e| anyhow::anyhow!("Filter graph validation failed: {e}"))?; - tracing::debug!("filter_graph: graph validated"); Ok(graph) }