AddPacket should just take a packet. score and alarm_image are members of the packet
This commit is contained in:
parent
bc03afa166
commit
d89cbebbdf
|
@ -539,7 +539,7 @@ void Event::AddFramesInternal(int n_frames, int start_frame, Image **images, str
|
||||||
end_time = *timestamps[n_frames-1];
|
end_time = *timestamps[n_frames-1];
|
||||||
} // void Event::AddFramesInternal(int n_frames, int start_frame, Image **images, struct timeval **timestamps)
|
} // void Event::AddFramesInternal(int n_frames, int start_frame, Image **images, struct timeval **timestamps)
|
||||||
|
|
||||||
void Event::AddPacket(ZMPacket *packet, int score, Image *alarm_image) {
|
void Event::AddPacket(ZMPacket *packet) {
|
||||||
|
|
||||||
have_video_keyframe = have_video_keyframe || ( ( packet->codec_type == AVMEDIA_TYPE_VIDEO ) && packet->keyframe );
|
have_video_keyframe = have_video_keyframe || ( ( packet->codec_type == AVMEDIA_TYPE_VIDEO ) && packet->keyframe );
|
||||||
if ( videoStore ) {
|
if ( videoStore ) {
|
||||||
|
@ -551,7 +551,7 @@ void Event::AddPacket(ZMPacket *packet, int score, Image *alarm_image) {
|
||||||
//FIXME if it fails, we should write a jpeg
|
//FIXME if it fails, we should write a jpeg
|
||||||
}
|
}
|
||||||
if ( have_video_keyframe && ( packet->codec_type == AVMEDIA_TYPE_VIDEO ) ) {
|
if ( have_video_keyframe && ( packet->codec_type == AVMEDIA_TYPE_VIDEO ) ) {
|
||||||
AddFrame(packet->image, *packet->timestamp, score, alarm_image);
|
AddFrame(packet->image, *(packet->timestamp), packet->score, packet->analysis_image);
|
||||||
} // end if is video
|
} // end if is video
|
||||||
end_time = *packet->timestamp;
|
end_time = *packet->timestamp;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -124,7 +124,7 @@ class Event {
|
||||||
const struct timeval &StartTime() const { return start_time; }
|
const struct timeval &StartTime() const { return start_time; }
|
||||||
const struct timeval &EndTime() const { return end_time; }
|
const struct timeval &EndTime() const { return end_time; }
|
||||||
|
|
||||||
void AddPacket( ZMPacket *p, int score=0, Image *alarm_frame=nullptr );
|
void AddPacket(ZMPacket *p);
|
||||||
bool WritePacket(ZMPacket &p);
|
bool WritePacket(ZMPacket &p);
|
||||||
bool SendFrameImage(const Image *image, bool alarm_frame=false);
|
bool SendFrameImage(const Image *image, bool alarm_frame=false);
|
||||||
bool WriteFrameImage(
|
bool WriteFrameImage(
|
||||||
|
|
Loading…
Reference in New Issue