Skip to content

Commit

Permalink
use eprintln
Browse files Browse the repository at this point in the history
  • Loading branch information
ltn-chriskennedy committed Aug 22, 2024
1 parent 70c895f commit 59c9b14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/bin/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ async fn rsprobe(running: Arc<AtomicBool>) {
let video_codec_clone = video_codec.clone();
if Codec::H264 != video_codec_clone.clone().expect("Video Codec failed") && Codec::NONE != video_codec_clone.clone().expect("Video Codec failed") {
if gstreamer_playing == true {
error!("Probe: Codec {} is not H264, pausing gstramer", video_codec_clone.clone().expect("Video Codec failed").to_string());
eprintln!("Probe: Codec {} is not H264, pausing gstramer", video_codec_clone.clone().expect("Video Codec failed").to_string());
match pipeline.set_state(gst::State::Paused) {
Ok(_) => (),
Err(err) => {
Expand Down Expand Up @@ -1897,10 +1897,10 @@ async fn rsprobe(running: Arc<AtomicBool>) {
.try_send(Arc::try_unwrap(video_packet).unwrap_or_default())
{
// If the channel is full, drop the packet
log::warn!("Video packet channel is full. Dropping packet.");
eprintln!("Video packet channel is full. Dropping packet.");
video_packet_errors += 1;
if video_packet_errors > 32 {
error!("Probe: Video packet channel has {} errors, exiting.", video_packet_errors);
eprintln!("Probe: Video packet channel has {} errors, exiting.", video_packet_errors);
running.store(false, Ordering::SeqCst);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/stream_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub fn process_video_packets(

// Push buffer only if not full
if let Err(err) = appsrc.push_buffer(buffer) {
log::warn!("Buffer full, dropping packet: {}", err);
eprintln!("Buffer full with {} errors, dropping packet: {}", errors, err);
errors += 1;
if errors > 1000 {
break;
Expand Down

0 comments on commit 59c9b14

Please sign in to comment.