@@ -367,6 +367,112 @@ Json::Value Meta_Data::construct_find_video_with_dynamic_metadata() {
367367 return tuple;
368368}
369369
370+ Json::Value Meta_Data::construct_find_video_withop (Json::Value operations) {
371+ Json::Value tuple;
372+
373+ Json::Value results;
374+ results[" blob" ] = true ;
375+ results[" limit" ] = 1 ;
376+
377+ Json::Value video;
378+ video[" results" ] = results;
379+ video[" operations" ].append (operations);
380+
381+ Json::Value find_video;
382+ find_video[" FindVideo" ] = video;
383+
384+ tuple.append (find_video);
385+ return tuple;
386+ }
387+
388+ Json::Value Meta_Data::construct_find_image_with_dynamic_metadata () {
389+ Json::Value tuple;
390+
391+ Json::Value cons;
392+ cons[" category" ][0 ] = " ==" ;
393+ cons[" category" ][1 ] = " image_dynamic_metadata" ;
394+
395+ Json::Value metacons;
396+ metacons[" objectID" ][0 ] = " ==" ;
397+ metacons[" objectID" ][1 ] = " face" ;
398+
399+ Json::Value results;
400+ results[" blob" ] = true ;
401+
402+ Json::Value link_image;
403+ link_image[" ref" ] = 1 ;
404+
405+ Json::Value image;
406+ image[" constraints" ] = cons;
407+ image[" _ref" ] = 1 ;
408+
409+ Json::Value find_image;
410+ find_image[" FindImage" ] = image;
411+
412+ tuple.append (find_image);
413+
414+ Json::Value bimage;
415+ bimage[" metaconstraints" ] = metacons;
416+ bimage[" link" ] = link_image;
417+
418+ Json::Value find_image_bbox;
419+ find_image_bbox[" FindImage" ] = bimage;
420+
421+ tuple.append (find_image_bbox);
422+
423+ return tuple;
424+ }
425+
426+ Json::Value Meta_Data::construct_find_video_with_dynamic_metadata () {
427+ Json::Value tuple;
428+
429+ Json::Value cons;
430+ cons[" category" ][0 ] = " ==" ;
431+ cons[" category" ][1 ] = " dynamic_metadata" ;
432+
433+ Json::Value metacons;
434+ metacons[" objectID" ][0 ] = " ==" ;
435+ metacons[" objectID" ][1 ] = " face" ;
436+
437+ Json::Value results;
438+ results[" blob" ] = true ;
439+
440+ Json::Value link_video;
441+ link_video[" ref" ] = 1 ;
442+ Json::Value link_frame;
443+ link_frame[" ref" ] = 2 ;
444+
445+ Json::Value video;
446+ video[" constraints" ] = cons;
447+ video[" _ref" ] = 1 ;
448+
449+ Json::Value find_video;
450+ find_video[" FindVideo" ] = video;
451+
452+ tuple.append (find_video);
453+
454+ Json::Value fvideo;
455+ fvideo[" frameconstraints" ] = false ;
456+ fvideo[" _ref" ] = 2 ;
457+ fvideo[" link" ] = link_video;
458+
459+ Json::Value find_video_frame;
460+ find_video_frame[" FindVideo" ] = fvideo;
461+
462+ tuple.append (find_video_frame);
463+
464+ Json::Value bvideo;
465+ bvideo[" metaconstraints" ] = metacons;
466+ bvideo[" link" ] = link_frame;
467+
468+ Json::Value find_video_bbox;
469+ find_video_bbox[" FindVideo" ] = bvideo;
470+
471+ tuple.append (find_video_bbox);
472+
473+ return tuple;
474+ }
475+
370476std::string *Meta_Data::read_blob (std::string &fname) {
371477 std::string video;
372478 std::ifstream video_file (fname,
0 commit comments