|
@@ -31,7 +31,7 @@ bool StreamNode::open_stream() {
|
|
|
demuxer_ = FFHDDemuxer::create_ffmpeg_demuxer(stream_url_);
|
|
|
if (demuxer_ == nullptr)
|
|
|
{
|
|
|
- PLOGI.fprintf(stderr, "StreamNode [%s] Error: GPU demuxer creation failed for %s\n", name_.c_str(), stream_url_.c_str());
|
|
|
+ PLOGE.printf("StreamNode [%s] Error: GPU demuxer creation failed for %s\n", name_.c_str(), stream_url_.c_str());
|
|
|
status_ = StreamStatus::OPEN_FAILED;
|
|
|
return false;
|
|
|
}
|
|
@@ -44,7 +44,7 @@ bool StreamNode::open_stream() {
|
|
|
|
|
|
if (decoder_ == nullptr)
|
|
|
{
|
|
|
- PLOGI.fprintf(stderr, "StreamNode [%s] Error: GPU decoder creation failed for %s (Codec: %d)\n", name_.c_str(), stream_url_.c_str(), codec_id);
|
|
|
+ PLOGE.printf("StreamNode [%s] Error: GPU decoder creation failed for %s (Codec: %d)\n", name_.c_str(), stream_url_.c_str(), codec_id);
|
|
|
demuxer_.reset(); // Clean up demuxer if decoder fails
|
|
|
status_ = StreamStatus::OPEN_FAILED;
|
|
|
return false;
|
|
@@ -59,14 +59,14 @@ bool StreamNode::open_stream() {
|
|
|
// cap_->open(stream_url_, cv::CAP_FFMPEG);
|
|
|
if (!cap_->open(stream_url_)) // Check return value of open
|
|
|
{
|
|
|
- PLOGI.fprintf(stderr, "StreamNode [%s] Error: CPU cv::VideoCapture failed to open %s\n", name_.c_str(), stream_url_.c_str());
|
|
|
+ PLOGI.printf("StreamNode [%s] Error: CPU cv::VideoCapture failed to open %s\n", name_.c_str(), stream_url_.c_str());
|
|
|
cap_.reset(); // Release the failed object
|
|
|
status_ = StreamStatus::OPEN_FAILED;
|
|
|
return false;
|
|
|
}
|
|
|
if (!cap_->isOpened()) // Double check
|
|
|
{
|
|
|
- PLOGI.fprintf(stderr, "StreamNode [%s] Error: CPU cv::VideoCapture not opened after call for %s\n", name_.c_str(), stream_url_.c_str());
|
|
|
+ PLOGE.printf("StreamNode [%s] Error: CPU cv::VideoCapture not opened after call for %s\n", name_.c_str(), stream_url_.c_str());
|
|
|
cap_.reset();
|
|
|
status_ = StreamStatus::OPEN_FAILED;
|
|
|
return false;
|
|
@@ -101,7 +101,7 @@ void StreamNode::work()
|
|
|
else
|
|
|
{
|
|
|
// Opening failed, wait before retrying
|
|
|
- PLOGI.fprintf(stderr, "StreamNode [%s]: Failed to open stream. Retrying in %d ms...\n",
|
|
|
+ PLOGI.printf("StreamNode [%s]: Failed to open stream. Retrying in %d ms...\n",
|
|
|
name_.c_str(), retry_delay_ms_);
|
|
|
status_ = StreamStatus::OPEN_FAILED; // Ensure status reflects failure
|
|
|
|
|
@@ -241,7 +241,7 @@ void StreamNode::process_stream_gpu()
|
|
|
demux_ok = demuxer_->demux(&packet_data, &packet_size, &pts);
|
|
|
}
|
|
|
catch (const std::exception& ex) { // Catch potential exceptions from demuxer implementation
|
|
|
- PLOGE.printf(stderr, "StreamNode [%s] Error: Exception during demuxer_->demux(): %s\n", name_.c_str(), ex.what());
|
|
|
+ PLOGE.printf("StreamNode [%s] Error: Exception during demuxer_->demux(): %s\n", name_.c_str(), ex.what());
|
|
|
status_ = StreamStatus::ERROR;
|
|
|
break;
|
|
|
}
|