|
@@ -197,18 +197,12 @@ void StreamNode::process_stream_cpu()
|
|
|
metaData->from = name_;
|
|
|
// metaData->timestamp = getCurrentTimestamp(); // Add timestamp if useful
|
|
|
|
|
|
- bool pushed = false;
|
|
|
for (auto& output_buffer : output_buffers_)
|
|
|
{
|
|
|
if (output_buffer.second) { // Check if buffer pointer is valid
|
|
|
output_buffer.second->push(metaData);
|
|
|
- pushed = true;
|
|
|
}
|
|
|
}
|
|
|
- // Optional: Log if data wasn't pushed anywhere
|
|
|
- // if (!pushed) {
|
|
|
- // printf("StreamNode [%s]: Warning - Frame %d processed but not pushed to any output buffer.\n", name_.c_str(), frame_count_);
|
|
|
- // }
|
|
|
}
|
|
|
printf("StreamNode [%s]: Exiting CPU processing loop (Running: %s, Status: %d).\n",
|
|
|
name_.c_str(), running_ ? "true" : "false", static_cast<int>(status_));
|
|
@@ -228,7 +222,7 @@ void StreamNode::process_stream_gpu()
|
|
|
int64_t pts = 0;
|
|
|
|
|
|
// Send extradata once (important for some codecs)
|
|
|
- demuxer_->get_extra_data(&packet_data, &packet_size)
|
|
|
+ demuxer_->get_extra_data(&packet_data, &packet_size);
|
|
|
if (packet_size > 0) {
|
|
|
printf("StreamNode [%s]: Sending %d bytes of extradata to decoder.\n", name_.c_str(), packet_size);
|
|
|
decoder_->decode(packet_data, packet_size);
|
|
@@ -290,7 +284,8 @@ void StreamNode::process_stream_gpu()
|
|
|
// Pass pointers to get the actual index and PTS for the current frame
|
|
|
frame_data = decoder_->get_frame(&frame_pts, &frame_index);
|
|
|
}
|
|
|
- catch (const std::exception& ex) { // Catch potential exceptions from get_frame implementation
|
|
|
+ catch (const std::exception& ex)
|
|
|
+ {
|
|
|
fprintf(stderr, "StreamNode [%s] Error: Exception during decoder_->get_frame(): %s\n", name_.c_str(), ex.what());
|
|
|
status_ = StreamStatus::ERROR;
|
|
|
ndecoded_frame = 0; // Stop processing frames from this packet
|