Skip to content

Commit

Permalink
Bug Fixed: to send the events to the server
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorHidalgoVT committed Apr 22, 2016
1 parent 99b7464 commit d711d64
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public void onEvent(OnIceCandidateEvent event) {

webRtcEndpoint.connect(eye);
eye.connect(webRtcEndpoint);
//eye.activateServerEvents(1, 3000);
//addEyeListener();
eye.activateServerEvents(1, 3000);
addEyeListener();
// SDP negotiation (offer and answer)
String sdpOffer = jsonMessage.get("sdpOffer").getAsString();
String sdpAnswer = webRtcEndpoint.processOffer(sdpOffer);
Expand Down Expand Up @@ -151,7 +151,7 @@ private void notEnoughResources(WebSocketSession session) {
release(session);
}

/* private void addEyeListener()
private void addEyeListener()
{
eye.addOnEyeListener(new EventListener<OnEyeEvent>() {
@Override
Expand All @@ -160,7 +160,7 @@ public void onEvent(OnEyeEvent event)
System.out.println("---------------------Eyes Detected---------------------");
}
});
}*/
}
private void setVisualization(WebSocketSession session,JsonObject jsonObject)
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,8 @@ kms_eye_detect_transform_frame_ip (GstVideoFilter *filter,
kms_eye_detect_process_frame(eye_detect,width,height,scale_o2f,
scale_o2e,scale_f2e,frame);

if (1==eye_detect->priv->meta_data)
kms_eye_send_event(eye_detect,frame);

kms_eye_send_event(eye_detect,frame);

gst_buffer_unmap (frame->buffer, &info);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ static void kms_face_send_event(KmsFaceDetect *face_detect,GstVideoFrame *frame,
if ((int)fd->size()>0)
{


gettimeofday(&end,NULL);
current_t= ((end.tv_sec * 1000.0) + ((end.tv_usec)/1000.0));
diff_time = current_t - face_detect->priv->time_events_ms;
Expand Down Expand Up @@ -610,8 +611,7 @@ kms_face_detect_transform_frame_ip (GstVideoFilter *filter,

kms_face_detect_process_frame(face_detect,width,height,scale,frame);

if (1 == face_detect->priv->meta_data) //delete this line to use metadata
kms_face_send_event(face_detect,frame,width_to_process);
kms_face_send_event(face_detect,frame,width_to_process);

KMS_FACE_DETECT_UNLOCK (face_detect);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ void NuboFaceDetectorImpl::onFace (gchar *message)

bool register_completed=true;
int i=0;



try {

split_message(message,del1,faces);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,8 @@ kms_mouth_detect_transform_frame_ip (GstVideoFilter *filter,
kms_mouth_detect_process_frame(mouth_detect,width,height,scale_f2m,
scale_m2o,scale_o2f,frame);

if (1==mouth_detect->priv->meta_data)
kms_mouth_send_event(mouth_detect,frame);

kms_mouth_send_event(mouth_detect,frame);

KMS_MOUTH_DETECT_UNLOCK (mouth_detect);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,7 @@ kms_nose_detect_transform_frame_ip (GstVideoFilter *filter,

KMS_NOSE_DETECT_UNLOCK (nose_detect);

if (1==nose_detect->priv->meta_data)
kms_nose_send_event(nose_detect,frame);
kms_nose_send_event(nose_detect,frame);

gst_buffer_unmap (frame->buffer, &info);

Expand Down

0 comments on commit d711d64

Please sign in to comment.