Reduce debug levels. Pass along Width and Height when instantiating Image from AVFrame so that it can scale to a lower res.
parent
4f08ad59cc
commit
f39b3f0583
|
@ -255,7 +255,7 @@ bool EventStream::loadEventData(uint64_t event_id) {
|
|||
int id_diff = id - last_id;
|
||||
Microseconds delta =
|
||||
std::chrono::duration_cast<Microseconds>(id_diff ? (offset - last_offset) / id_diff : (offset - last_offset));
|
||||
Debug(1, "New delta %f from id_diff %d = id %d - last_id %d offset %f - last)_offset %f",
|
||||
Debug(4, "New delta %f from id_diff %d = id %d - last_id %d offset %f - last)_offset %f",
|
||||
FPSeconds(delta).count(), id_diff, id, last_id, FPSeconds(offset).count(), FPSeconds(last_offset).count());
|
||||
|
||||
// Fill in data between bulk frames
|
||||
|
@ -269,7 +269,7 @@ bool EventStream::loadEventData(uint64_t event_id) {
|
|||
false
|
||||
);
|
||||
last_frame = &frame;
|
||||
Debug(3, "Frame %d %d timestamp (%f s), offset (%f s) delta (%f s), in_db (%d)",
|
||||
Debug(4, "Frame %d %d timestamp (%f s), offset (%f s) delta (%f s), in_db (%d)",
|
||||
i, frame.id,
|
||||
FPSeconds(frame.timestamp.time_since_epoch()).count(),
|
||||
FPSeconds(frame.offset).count(),
|
||||
|
@ -282,7 +282,7 @@ bool EventStream::loadEventData(uint64_t event_id) {
|
|||
last_id = id;
|
||||
last_offset = offset;
|
||||
last_timestamp = timestamp;
|
||||
Debug(3, "Frame %d timestamp (%f s), offset (%f s), delta(%f s), in_db(%d)",
|
||||
Debug(4, "Frame %d timestamp (%f s), offset (%f s), delta(%f s), in_db(%d)",
|
||||
id,
|
||||
FPSeconds(frame.timestamp.time_since_epoch()).count(),
|
||||
FPSeconds(frame.offset).count(),
|
||||
|
@ -834,13 +834,13 @@ bool EventStream::sendFrame(Microseconds delta_us) {
|
|||
|
||||
if (!filepath.empty()) {
|
||||
image = new Image(filepath.c_str());
|
||||
} else if ( ffmpeg_input ) {
|
||||
} else if (ffmpeg_input) {
|
||||
// Get the frame from the mp4 input
|
||||
const FrameData *frame_data = &event_data->frames[curr_frame_id-1];
|
||||
AVFrame *frame =
|
||||
ffmpeg_input->get_frame(ffmpeg_input->get_video_stream_id(), FPSeconds(frame_data->offset).count());
|
||||
if (frame) {
|
||||
image = new Image(frame);
|
||||
image = new Image(frame, monitor->Width(), monitor->Height());
|
||||
} else {
|
||||
Error("Failed getting a frame.");
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue