|
1 | 1 | use crate::{ |
2 | 2 | AudioError, AudioRecorder, CombineTracksConfig, EncodedFrame, Frame, FrameUser, H264Writer, |
3 | | - MAX_H264_WRITER_QUEUE_SIZE, ProgressState, RecorderConfig, RecorderError, Resolution, |
4 | | - SimpleFpsCounter, SpeakerRecorder, StatsUser, StreamingAudioRecorder, VideoEncoder, |
5 | | - combine_tracks, |
| 3 | + ProgressState, RecorderConfig, RecorderError, Resolution, SimpleFpsCounter, SpeakerRecorder, |
| 4 | + StatsUser, StreamingAudioRecorder, VideoEncoder, combine_tracks, |
6 | 5 | }; |
7 | 6 | use capture::{Capture, CaptureIterConfig, capture_output_iter}; |
8 | 7 | use crossbeam::channel::{Receiver, Sender, bounded}; |
@@ -32,7 +31,7 @@ const TMP_OUTPUT_VIDEO_EXTENSION: &str = "tmp.mp4"; |
32 | 31 |
|
33 | 32 | const USER_CHANNEL_SIZE: usize = 3; |
34 | 33 | const RESIZE_WORKER_CHANNEL_SIZE: usize = 16; |
35 | | -const ENCODER_WORKER_CHANNEL_SIZE: usize = 32; |
| 34 | +pub const ENCODER_WORKER_CHANNEL_SIZE: usize = 32; |
36 | 35 |
|
37 | 36 | static CAPTURE_MEAN_TIME: Lazy<Mutex<Option<Duration>>> = Lazy::new(|| Mutex::new(None)); |
38 | 37 |
|
@@ -347,7 +346,7 @@ impl RecordingSession { |
347 | 346 | } else { |
348 | 347 | Some(H264Writer::new( |
349 | 348 | self.config.output_path.with_extension(RAW_VIDEO_EXTENSION), |
350 | | - MAX_H264_WRITER_QUEUE_SIZE, |
| 349 | + ENCODER_WORKER_CHANNEL_SIZE, |
351 | 350 | )) |
352 | 351 | }; |
353 | 352 |
|
@@ -705,7 +704,7 @@ impl RecordingSession { |
705 | 704 | frame: frame.clone(), |
706 | 705 | }; |
707 | 706 | if let Err(e) = sender.try_send(frame_user) { |
708 | | - log::warn!("try send frame failed: {e}"); |
| 707 | + log::warn!("try send frame to user frame channel failed: {e}"); |
709 | 708 | } |
710 | 709 | } |
711 | 710 |
|
|
0 commit comments