|
@@ -52,7 +52,9 @@ int video_similarity_detection_start(long id, int force_keyframe,
|
|
|
}
|
|
|
|
|
|
int len = 0;
|
|
|
+ if (ctx->log) fprintf(ctx->log, "fingerprintFromFFAVFrame 1\n");
|
|
|
const char *image_hash = fingerprintFromFFAVFrame(ctx->log, video_frame, &len);
|
|
|
+ if (ctx->log) fprintf(ctx->log, "fingerprintFromFFAVFrame exit \n");
|
|
|
if (len > 64) {
|
|
|
LOGE("size=%d \n", len);
|
|
|
}
|
|
@@ -75,8 +77,9 @@ int video_similarity_detection_start(long id, int force_keyframe,
|
|
|
if (ctx->log)fprintf(ctx->log, "image_hash \n");
|
|
|
if (image_hash)
|
|
|
free((void *) image_hash);
|
|
|
- if (ctx->log) fprintf(ctx->log, "image_hash 2 \n");
|
|
|
+ if (ctx->log) fprintf(ctx->log, "av_frame_free\n");
|
|
|
av_frame_free(&video_frame);
|
|
|
+ if (ctx->log) fprintf(ctx->log, "av_frame_free 2\n");
|
|
|
}
|
|
|
if (ctx->log) fprintf(ctx->log, "loop exit \n");
|
|
|
return 0;
|
|
@@ -206,10 +209,12 @@ const char *get_video_similarity_list(const char *inputjson) {
|
|
|
sprintf(args, "/datalog/ffmpeg_opencv/%s.log", name);
|
|
|
((VideoSimilarityContext *) id)->log = fopen(args, "wb+");
|
|
|
printf("args===%s \n", args);
|
|
|
- fprintf(((VideoSimilarityContext *) id)->log, inputjson);
|
|
|
+ if (((VideoSimilarityContext *) id)->log)fprintf(((VideoSimilarityContext *) id)->log, inputjson);
|
|
|
}
|
|
|
+ if (((VideoSimilarityContext *) id)->log)fprintf(((VideoSimilarityContext *) id)->log, "video_similarity_detection_start \n");
|
|
|
video_similarity_detection_start(id, 0, AUDIO,
|
|
|
&vs->clips);
|
|
|
+ if (((VideoSimilarityContext *) id)->log)fprintf(((VideoSimilarityContext *) id)->log, "video_similarity_detection_start exit \n");
|
|
|
video_similarity_detection_close(id);
|
|
|
ret_json = videoSimilarity2json(vs);
|
|
|
delete vs;
|