├── .gitignore ├── .vsconfig ├── Config ├── DefaultEditor.ini ├── DefaultEngine.ini ├── DefaultGame.ini └── DefaultInput.ini ├── Content ├── Mannequin │ ├── Animations │ │ ├── ThirdPersonIdle.uasset │ │ ├── ThirdPersonJump_End.uasset │ │ ├── ThirdPersonJump_Loop.uasset │ │ ├── ThirdPersonJump_Start.uasset │ │ ├── ThirdPersonRun.uasset │ │ ├── ThirdPersonWalk.uasset │ │ ├── ThirdPerson_AnimBP.uasset │ │ ├── ThirdPerson_IdleRun_2D.uasset │ │ └── ThirdPerson_Jump.uasset │ └── Character │ │ ├── Materials │ │ ├── MI_Female_Body.uasset │ │ ├── M_Male_Body.uasset │ │ ├── M_UE4Man_ChestLogo.uasset │ │ └── MaterialLayers │ │ │ ├── ML_GlossyBlack_Latex_UE4.uasset │ │ │ ├── ML_Plastic_Shiny_Beige.uasset │ │ │ ├── ML_Plastic_Shiny_Beige_LOGO.uasset │ │ │ ├── ML_SoftMetal_UE4.uasset │ │ │ ├── T_ML_Aluminum01.uasset │ │ │ ├── T_ML_Aluminum01_N.uasset │ │ │ ├── T_ML_Rubber_Blue_01_D.uasset │ │ │ └── T_ML_Rubber_Blue_01_N.uasset │ │ ├── Mesh │ │ ├── SK_Mannequin.uasset │ │ ├── SK_Mannequin_Female.uasset │ │ ├── SK_Mannequin_Female_PhysicsAsset.uasset │ │ ├── SK_Mannequin_PhysicsAsset.uasset │ │ └── UE4_Mannequin_Skeleton.uasset │ │ └── Textures │ │ ├── T_Female_Mask.uasset │ │ ├── T_Female_N.uasset │ │ ├── T_Male_Mask.uasset │ │ ├── T_Male_N.uasset │ │ ├── T_UE4Logo_Mask.uasset │ │ └── T_UE4Logo_N.uasset └── MediaPipe │ ├── Blueprints │ ├── MAT_VideoTexture.uasset │ ├── MP_3DFaceGeometry.uasset │ ├── MP_3DPoseLandmarks.uasset │ ├── MP_BoneMapping.uasset │ ├── MP_FaceLandmarksWithIris.uasset │ ├── MP_HolisticLandmarks.uasset │ ├── MP_LandmarkObserver.uasset │ ├── MP_Pipeline.uasset │ └── MP_PuppetAvatar.uasset │ ├── FaceModel │ ├── MAT_Grid_Twosided.uasset │ └── SM_CanonicalFace.uasset │ └── Maps │ ├── 3DFaceGeometry.umap │ ├── 3DHolisticLandmarks.umap │ ├── 3DPoseLandmarks.umap │ ├── CppExample.umap │ ├── FaceLandmarks.umap │ ├── FaceLandmarksWithIris.umap │ ├── HandLandmarks.umap │ ├── HolisticLandmarks.umap │ ├── PoseLandmarks.umap │ ├── PuppetAvatar.umap │ └── VideoTexture.umap ├── LICENSE ├── Plugins └── MediaPipe │ ├── Config │ └── FilterPlugin.ini │ ├── MediaPipe.uplugin │ ├── Resources │ └── Icon128.png │ ├── Source │ └── MediaPipe │ │ ├── MediaPipe.Build.cs │ │ ├── Private │ │ ├── DynamicTexture.cpp │ │ ├── Hakz.h │ │ ├── MediaPipeClassificationObserverComponent.cpp │ │ ├── MediaPipeFaceMeshObserverComponent.cpp │ │ ├── MediaPipeLandmarkObserverComponent.cpp │ │ ├── MediaPipeModule.cpp │ │ ├── MediaPipeModule.h │ │ ├── MediaPipeObserverComponent.cpp │ │ ├── MediaPipePipelineComponent.cpp │ │ ├── MediaPipePresenceObserverComponent.cpp │ │ ├── MediaPipeShared.h │ │ └── mediapipe │ │ │ ├── framework │ │ │ └── formats │ │ │ │ ├── annotation │ │ │ │ ├── locus.pb.cc │ │ │ │ ├── locus.pb.h │ │ │ │ ├── rasterization.pb.cc │ │ │ │ └── rasterization.pb.h │ │ │ │ ├── classification.pb.cc │ │ │ │ ├── classification.pb.h │ │ │ │ ├── detection.pb.cc │ │ │ │ ├── detection.pb.h │ │ │ │ ├── image_file_properties.pb.cc │ │ │ │ ├── image_file_properties.pb.h │ │ │ │ ├── image_format.pb.cc │ │ │ │ ├── image_format.pb.h │ │ │ │ ├── landmark.pb.cc │ │ │ │ ├── landmark.pb.h │ │ │ │ ├── location_data.pb.cc │ │ │ │ ├── location_data.pb.h │ │ │ │ ├── matrix_data.pb.cc │ │ │ │ ├── matrix_data.pb.h │ │ │ │ ├── motion │ │ │ │ ├── optical_flow_field_data.pb.cc │ │ │ │ └── optical_flow_field_data.pb.h │ │ │ │ ├── object_detection │ │ │ │ ├── anchor.pb.cc │ │ │ │ └── anchor.pb.h │ │ │ │ ├── rect.pb.cc │ │ │ │ ├── rect.pb.h │ │ │ │ ├── time_series_header.pb.cc │ │ │ │ └── time_series_header.pb.h │ │ │ └── modules │ │ │ └── face_geometry │ │ │ └── protos │ │ │ ├── environment.pb.cc │ │ │ ├── environment.pb.h │ │ │ ├── face_geometry.pb.cc │ │ │ ├── face_geometry.pb.h │ │ │ ├── geometry_pipeline_metadata.pb.cc │ │ │ ├── geometry_pipeline_metadata.pb.h │ │ │ ├── mesh_3d.pb.cc │ │ │ └── mesh_3d.pb.h │ │ └── Public │ │ ├── DynamicTexture.h │ │ ├── IMediaPipeModule.h │ │ ├── MediaPipeClassificationObserverComponent.h │ │ ├── MediaPipeFaceMeshObserverComponent.h │ │ ├── MediaPipeLandmarkObserverComponent.h │ │ ├── MediaPipeObserverComponent.h │ │ ├── MediaPipePipelineComponent.h │ │ ├── MediaPipePresenceObserverComponent.h │ │ └── ump_api.h │ └── ThirdParty │ ├── mediapipe │ ├── Binaries │ │ └── Win64 │ │ │ ├── opencv_world3410.dll │ │ │ └── ump_shared.dll │ └── Data │ │ └── mediapipe │ │ ├── modules │ │ ├── face_detection │ │ │ └── face_detection_short_range.tflite │ │ ├── face_geometry │ │ │ └── data │ │ │ │ └── geometry_pipeline_metadata_landmarks.binarypb │ │ ├── face_landmark │ │ │ └── face_landmark.tflite │ │ ├── hand_landmark │ │ │ ├── hand_landmark.tflite │ │ │ └── handedness.txt │ │ ├── holistic_landmark │ │ │ └── hand_recrop.tflite │ │ ├── iris_landmark │ │ │ └── iris_landmark.tflite │ │ ├── objectron │ │ │ ├── object_detection_3d_cup.tflite │ │ │ ├── object_detection_oidv4_labelmap.txt │ │ │ └── object_detection_ssd_mobilenetv2_oidv4_fp16.tflite │ │ ├── palm_detection │ │ │ └── palm_detection.tflite │ │ ├── pose_detection │ │ │ └── pose_detection.tflite │ │ └── pose_landmark │ │ │ └── pose_landmark_full.tflite │ │ └── unreal │ │ ├── face_landmarks_with_iris.pbtxt │ │ ├── holistic_landmarks.pbtxt │ │ ├── holistic_with_iris.pbtxt │ │ ├── multi_face_geometry.pbtxt │ │ ├── multi_face_landmarks.pbtxt │ │ ├── multi_hand_landmarks.pbtxt │ │ ├── objectron_landmarks.pbtxt │ │ └── pose_landmarks.pbtxt │ └── protobuf │ ├── Binaries │ └── Win64 │ │ └── libprotobuf.dll │ ├── Include │ └── google │ │ └── protobuf │ │ ├── any.h │ │ ├── any.pb.h │ │ ├── any.proto │ │ ├── api.pb.h │ │ ├── api.proto │ │ ├── arena.h │ │ ├── arena_impl.h │ │ ├── arenastring.h │ │ ├── compiler │ │ ├── code_generator.h │ │ ├── command_line_interface.h │ │ ├── cpp │ │ │ └── cpp_generator.h │ │ ├── csharp │ │ │ ├── csharp_generator.h │ │ │ └── csharp_names.h │ │ ├── importer.h │ │ ├── java │ │ │ ├── java_generator.h │ │ │ └── java_names.h │ │ ├── js │ │ │ ├── js_generator.h │ │ │ └── well_known_types_embed.h │ │ ├── objectivec │ │ │ ├── objectivec_generator.h │ │ │ └── objectivec_helpers.h │ │ ├── parser.h │ │ ├── php │ │ │ └── php_generator.h │ │ ├── plugin.h │ │ ├── plugin.pb.h │ │ ├── plugin.proto │ │ ├── python │ │ │ └── python_generator.h │ │ └── ruby │ │ │ └── ruby_generator.h │ │ ├── descriptor.h │ │ ├── descriptor.pb.h │ │ ├── descriptor.proto │ │ ├── descriptor_database.h │ │ ├── duration.pb.h │ │ ├── duration.proto │ │ ├── dynamic_message.h │ │ ├── empty.pb.h │ │ ├── empty.proto │ │ ├── extension_set.h │ │ ├── extension_set_inl.h │ │ ├── field_mask.pb.h │ │ ├── field_mask.proto │ │ ├── generated_enum_reflection.h │ │ ├── generated_enum_util.h │ │ ├── generated_message_reflection.h │ │ ├── generated_message_table_driven.h │ │ ├── generated_message_util.h │ │ ├── has_bits.h │ │ ├── implicit_weak_message.h │ │ ├── inlined_string_field.h │ │ ├── io │ │ ├── coded_stream.h │ │ ├── gzip_stream.h │ │ ├── io_win32.h │ │ ├── printer.h │ │ ├── strtod.h │ │ ├── tokenizer.h │ │ ├── zero_copy_stream.h │ │ ├── zero_copy_stream_impl.h │ │ └── zero_copy_stream_impl_lite.h │ │ ├── map.h │ │ ├── map_entry.h │ │ ├── map_entry_lite.h │ │ ├── map_field.h │ │ ├── map_field_inl.h │ │ ├── map_field_lite.h │ │ ├── map_type_handler.h │ │ ├── message.h │ │ ├── message_lite.h │ │ ├── metadata.h │ │ ├── metadata_lite.h │ │ ├── parse_context.h │ │ ├── port.h │ │ ├── port_def.inc │ │ ├── port_undef.inc │ │ ├── reflection.h │ │ ├── reflection_ops.h │ │ ├── repeated_field.h │ │ ├── service.h │ │ ├── source_context.pb.h │ │ ├── source_context.proto │ │ ├── struct.pb.h │ │ ├── struct.proto │ │ ├── stubs │ │ ├── bytestream.h │ │ ├── callback.h │ │ ├── casts.h │ │ ├── common.h │ │ ├── fastmem.h │ │ ├── hash.h │ │ ├── logging.h │ │ ├── macros.h │ │ ├── map_util.h │ │ ├── mutex.h │ │ ├── once.h │ │ ├── platform_macros.h │ │ ├── port.h │ │ ├── status.h │ │ ├── stl_util.h │ │ ├── stringpiece.h │ │ ├── strutil.h │ │ └── template_util.h │ │ ├── text_format.h │ │ ├── timestamp.pb.h │ │ ├── timestamp.proto │ │ ├── type.pb.h │ │ ├── type.proto │ │ ├── unknown_field_set.h │ │ ├── util │ │ ├── delimited_message_util.h │ │ ├── field_comparator.h │ │ ├── field_mask_util.h │ │ ├── json_util.h │ │ ├── message_differencer.h │ │ ├── time_util.h │ │ ├── type_resolver.h │ │ └── type_resolver_util.h │ │ ├── wire_format.h │ │ ├── wire_format_lite.h │ │ ├── wrappers.pb.h │ │ └── wrappers.proto │ └── Lib │ └── Win64 │ └── libprotobuf.lib ├── README.md ├── Source ├── ue5mediapipeC.Target.cs ├── ue5mediapipeC │ ├── ue5mediapipeC.Build.cs │ ├── ue5mediapipeC.cpp │ ├── ue5mediapipeC.h │ ├── ue5mediapipeCGameModeBase.cpp │ └── ue5mediapipeCGameModeBase.h └── ue5mediapipeCEditor.Target.cs ├── _precompile.cmd └── ue5mediapipeC.uproject /.gitignore: -------------------------------------------------------------------------------- 1 | /Binaries/ 2 | /Build/ 3 | /Intermediate/ 4 | /Saved/ 5 | 6 | /Content/Collections/ 7 | /Content/Developers/ 8 | 9 | /Plugins/MediaPipe/Binaries/ 10 | /Plugins/MediaPipe/Intermediate/ 11 | 12 | .vs/ 13 | *.sln 14 | *.suo 15 | *.sdf 16 | *.opensdf 17 | *.db 18 | *.opendb 19 | *.pdb 20 | -------------------------------------------------------------------------------- /.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Component.VC.Tools.ARM64", 5 | "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", 6 | "Microsoft.VisualStudio.Component.Windows10SDK", 7 | "Microsoft.VisualStudio.Workload.CoreEditor", 8 | "Microsoft.VisualStudio.Workload.NativeDesktop", 9 | "Microsoft.VisualStudio.Workload.NativeGame", 10 | "Microsoft.VisualStudio.Workload.Universal" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /Config/DefaultEditor.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Config/DefaultEditor.ini -------------------------------------------------------------------------------- /Config/DefaultEngine.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | [Audio] 4 | UseAudioMixer=True 5 | 6 | [/Script/HardwareTargeting.HardwareTargetingSettings] 7 | TargetedHardwareClass=Desktop 8 | AppliedTargetedHardwareClass=Desktop 9 | DefaultGraphicsPerformance=Maximum 10 | AppliedDefaultGraphicsPerformance=Maximum 11 | 12 | [/Script/WindowsTargetPlatform.WindowsTargetSettings] 13 | DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 14 | !D3D12TargetedShaderFormats=ClearArray 15 | +D3D12TargetedShaderFormats=PCD3D_SM6 16 | 17 | [/Script/Engine.RendererSettings] 18 | r.GenerateMeshDistanceFields=True 19 | r.DynamicGlobalIlluminationMethod=1 20 | r.ReflectionMethod=1 21 | r.Shadow.Virtual.Enable=1 22 | r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True 23 | 24 | [/Script/WorldPartitionEditor.WorldPartitionEditorSettings] 25 | CommandletClass=Class'/Script/UnrealEd.WorldPartitionConvertCommandlet' 26 | 27 | [/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] 28 | bEnablePlugin=True 29 | bAllowNetworkConnection=True 30 | SecurityToken=41038EAF41CCAA8992F481A4753E6F64 31 | bIncludeInShipping=False 32 | bAllowExternalStartInShipping=False 33 | bCompileAFSProject=False 34 | bUseCompression=False 35 | bLogFiles=False 36 | bReportStats=False 37 | ConnectionType=USBOnly 38 | bUseManualIPAddress=False 39 | ManualIPAddress= 40 | 41 | -------------------------------------------------------------------------------- /Config/DefaultGame.ini: -------------------------------------------------------------------------------- 1 | [/Script/EngineSettings.GeneralProjectSettings] 2 | ProjectID=D9F84F514F93ECEA202530A6748FEF4E 3 | -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonIdle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPersonIdle.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_End.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPersonJump_End.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_Loop.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPersonJump_Loop.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_Start.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPersonJump_Start.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonRun.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPersonRun.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonWalk.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPersonWalk.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_AnimBP.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPerson_AnimBP.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_IdleRun_2D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPerson_IdleRun_2D.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_Jump.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Animations/ThirdPerson_Jump.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MI_Female_Body.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MI_Female_Body.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/M_Male_Body.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/M_Male_Body.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/M_UE4Man_ChestLogo.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/M_UE4Man_ChestLogo.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Mesh/SK_Mannequin.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_Female.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Mesh/SK_Mannequin_Female.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_Female_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Mesh/SK_Mannequin_Female_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Mesh/SK_Mannequin_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/UE4_Mannequin_Skeleton.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Mesh/UE4_Mannequin_Skeleton.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Female_Mask.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Textures/T_Female_Mask.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Female_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Textures/T_Female_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Male_Mask.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Textures/T_Male_Mask.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Male_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Textures/T_Male_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_UE4Logo_Mask.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Textures/T_UE4Logo_Mask.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_UE4Logo_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/Mannequin/Character/Textures/T_UE4Logo_N.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MAT_VideoTexture.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MAT_VideoTexture.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_3DFaceGeometry.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_3DFaceGeometry.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_3DPoseLandmarks.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_3DPoseLandmarks.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_BoneMapping.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_BoneMapping.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_FaceLandmarksWithIris.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_FaceLandmarksWithIris.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_HolisticLandmarks.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_HolisticLandmarks.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_LandmarkObserver.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_LandmarkObserver.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_Pipeline.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_Pipeline.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Blueprints/MP_PuppetAvatar.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Blueprints/MP_PuppetAvatar.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/FaceModel/MAT_Grid_Twosided.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/FaceModel/MAT_Grid_Twosided.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/FaceModel/SM_CanonicalFace.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/FaceModel/SM_CanonicalFace.uasset -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/3DFaceGeometry.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/3DFaceGeometry.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/3DHolisticLandmarks.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/3DHolisticLandmarks.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/3DPoseLandmarks.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/3DPoseLandmarks.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/CppExample.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/CppExample.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/FaceLandmarks.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/FaceLandmarks.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/FaceLandmarksWithIris.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/FaceLandmarksWithIris.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/HandLandmarks.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/HandLandmarks.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/HolisticLandmarks.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/HolisticLandmarks.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/PoseLandmarks.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/PoseLandmarks.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/PuppetAvatar.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/PuppetAvatar.umap -------------------------------------------------------------------------------- /Content/MediaPipe/Maps/VideoTexture.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Content/MediaPipe/Maps/VideoTexture.umap -------------------------------------------------------------------------------- /Plugins/MediaPipe/Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and 3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. 4 | ; 5 | ; Examples: 6 | ; /README.txt 7 | ; /Extras/... 8 | ; /Binaries/ThirdParty/*.dll 9 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/MediaPipe.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 2, 4 | "EngineVersion": "5.1", 5 | "VersionName": "1.1", 6 | "FriendlyName": "MediaPipe", 7 | "Description": "Unreal MediaPipe integration", 8 | "CreatedBy": "wongfei", 9 | "CreatedByURL": "https://github.com/wongfei", 10 | "DocsURL": "", 11 | "MarketplaceURL" : "", 12 | "Category": "Animation", 13 | "CanContainContent": true, 14 | "Installed": true, 15 | "Modules": [ 16 | { 17 | "Name": "MediaPipe", 18 | "Type": "Runtime", 19 | "LoadingPhase": "Default", 20 | "WhitelistPlatforms": [ "Win64" ] 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/Resources/Icon128.png -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/MediaPipe.Build.cs: -------------------------------------------------------------------------------- 1 | using UnrealBuildTool; 2 | using System.IO; 3 | 4 | public class MediaPipe : ModuleRules 5 | { 6 | public MediaPipe(ReadOnlyTargetRules Target) : base(Target) 7 | { 8 | PCHUsage = PCHUsageMode.NoPCHs; // UseExplicitOrSharedPCHs; 9 | bUseUnity = false; 10 | bUseRTTI = true; 11 | 12 | PublicDependencyModuleNames.AddRange( 13 | new string[] { 14 | "Core", 15 | "CoreUObject", 16 | "Engine", 17 | "InputCore", 18 | "Slate", 19 | "SlateCore", 20 | "RHI", 21 | "RenderCore" 22 | } 23 | ); 24 | 25 | PrivateDependencyModuleNames.AddRange( 26 | new string[] { 27 | "Projects", 28 | } 29 | ); 30 | 31 | string BinArch = Target.Platform.ToString(); 32 | string LibExt = ""; 33 | string DllExt = ".so"; 34 | 35 | if (Target.Platform == UnrealTargetPlatform.Win64) 36 | { 37 | LibExt = ".lib"; 38 | DllExt = ".dll"; 39 | } 40 | 41 | string BinaryOutputDir = "$(BinaryOutputDir)"; 42 | string ThirdPartyDir = Path.Combine(ModuleDirectory, "..", "..", "ThirdParty"); 43 | 44 | // protobuf deps 45 | 46 | if (Target.Platform == UnrealTargetPlatform.Win64) 47 | { 48 | PublicDefinitions.Add("PROTOBUF_USE_DLLS=1"); 49 | } 50 | 51 | PublicIncludePaths.Add(Path.Combine(ThirdPartyDir, "protobuf", "Include")); 52 | PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyDir, "protobuf", "Lib", BinArch, "libprotobuf" + LibExt)); 53 | 54 | string ProtobufBinDir = Path.Combine(ThirdPartyDir, "protobuf", "Binaries", BinArch); 55 | AddDep("libprotobuf", DllExt, ProtobufBinDir, BinaryOutputDir); 56 | 57 | // mediapipe deps 58 | 59 | string MPBinDir = Path.Combine(ThirdPartyDir, "mediapipe", "Binaries", BinArch); 60 | string MPDataDir = Path.Combine(ThirdPartyDir, "mediapipe", "Data"); 61 | 62 | AddDep("opencv_world3410", DllExt, MPBinDir, BinaryOutputDir); 63 | AddDep("ump_shared", DllExt, MPBinDir, BinaryOutputDir); 64 | 65 | if (Target.Type != TargetType.Editor) 66 | AddDepFolder(MPDataDir, BinaryOutputDir); 67 | } 68 | 69 | private void AddDep(string FileName, string Ext, string SourceDir, string TargetDir) 70 | { 71 | RuntimeDependencies.Add(Path.Combine(TargetDir, FileName + Ext), Path.Combine(SourceDir, FileName + Ext)); 72 | } 73 | 74 | private void AddDepFolder(string SourceDir, string TargetDir) 75 | { 76 | foreach (string filePath in Directory.GetFiles(SourceDir, "*.*", SearchOption.AllDirectories)) 77 | { 78 | string dst = filePath.Replace(SourceDir, TargetDir); 79 | RuntimeDependencies.Add(dst, filePath); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/DynamicTexture.cpp: -------------------------------------------------------------------------------- 1 | #include "DynamicTexture.h" 2 | #include "TextureResource.h" 3 | #include "RenderUtils.h" 4 | #include "Async/Async.h" 5 | #include "Runtime/Launch/Resources/Version.h" 6 | #include "MediaPipeShared.h" 7 | 8 | FDynamicTexture::FDynamicTexture() 9 | { 10 | PLUGIN_LOG(Display, TEXT("+FDynamicTexture %p"), this); 11 | } 12 | 13 | FDynamicTexture::~FDynamicTexture() 14 | { 15 | PLUGIN_LOG(Display, TEXT("~FDynamicTexture %p"), this); 16 | Release(); 17 | } 18 | 19 | // POOL 20 | 21 | FPixelBuffer* FDynamicTexture::AllocBuffer() 22 | { 23 | FPixelBuffer* Buffer = nullptr; 24 | 25 | if (BufferPool.Num() > 0) 26 | { 27 | FScopeLock Lock(&BufferMux); 28 | if (BufferPool.Num() > 0) 29 | { 30 | Buffer = BufferPool.Pop(false); 31 | //PLUGIN_LOG(Display, TEXT("reuse FPixelBuffer %p"), Buffer); 32 | return Buffer; 33 | } 34 | } 35 | 36 | Buffer = new FPixelBuffer(); 37 | PLUGIN_LOG(Display, TEXT("new FPixelBuffer %p"), Buffer); 38 | return Buffer; 39 | } 40 | 41 | void FDynamicTexture::ReturnBufferToPool(FPixelBuffer* Buffer) 42 | { 43 | //PLUGIN_LOG(Display, TEXT("pool FPixelBuffer %p"), Buffer); 44 | FScopeLock Lock(&BufferMux); 45 | BufferPool.Push(Buffer); 46 | } 47 | 48 | void FDynamicTexture::ReleaseBufferPool() 49 | { 50 | if (BufferPool.Num() > 0) 51 | { 52 | FScopeLock Lock(&BufferMux); 53 | for (int i = 0; i < BufferPool.Num(); ++i) 54 | { 55 | PLUGIN_LOG(Display, TEXT("delete FPixelBuffer %p"), BufferPool[i]); 56 | delete BufferPool[i]; 57 | } 58 | BufferPool.Reset(); 59 | } 60 | } 61 | 62 | // ENQUE 63 | 64 | void FDynamicTexture::EnqueBuffer(const FPixelBuffer& InBuffer) 65 | { 66 | if (InBuffer.Width <= 0 || InBuffer.Height <= 0) 67 | return; 68 | 69 | switch (InBuffer.Format) 70 | { 71 | case EPixelFormat::PF_B8G8R8A8: 72 | case EPixelFormat::PF_R8G8B8A8: 73 | break; 74 | 75 | default: 76 | // UNSUPPORTED 77 | return; 78 | } 79 | 80 | auto* Buffer = AllocBuffer(); 81 | *Buffer = InBuffer; 82 | 83 | auto Context = this; 84 | ENQUEUE_RENDER_COMMAND(SceneDrawCompletion)([Context, Buffer](FRHICommandListImmediate& RHICmdList) 85 | { 86 | Context->RenderCmd_UpdateTexture(Buffer); 87 | }); 88 | } 89 | 90 | void FDynamicTexture::RenderCmd_UpdateTexture(FPixelBuffer* InBuffer) 91 | { 92 | Resize(InBuffer->Width, InBuffer->Height, InBuffer->Format); 93 | 94 | auto* Tex = GetTextureObject(); 95 | if (Tex) 96 | { 97 | #if (ENGINE_MAJOR_VERSION == 5) 98 | #define TMP_TEX_RES Tex->GetResource() 99 | #else 100 | #define TMP_TEX_RES Tex->Resource 101 | #endif 102 | 103 | if (TMP_TEX_RES) 104 | { 105 | RHIUpdateTexture2D( 106 | TMP_TEX_RES->GetTexture2DRHI(), 107 | 0, 108 | FUpdateTextureRegion2D(0, 0, 0, 0, InBuffer->Width, InBuffer->Height), 109 | InBuffer->Pitch, 110 | (const uint8*)InBuffer->Data 111 | ); 112 | } 113 | 114 | #undef TMP_TEX_RES 115 | } 116 | 117 | if (FuncBufferSubmitted) 118 | { 119 | FuncBufferSubmitted(InBuffer->Handle); 120 | } 121 | 122 | ReturnBufferToPool(InBuffer); 123 | } 124 | 125 | // RESIZE 126 | 127 | void FDynamicTexture::Resize(int InWidth, int InHeight, EPixelFormat InFormat) 128 | { 129 | if (Format != InFormat 130 | || Width != InWidth 131 | || Height != InHeight) 132 | { 133 | Release(); 134 | 135 | PLUGIN_LOG(Display, TEXT("FDynamicTexture::Resize Width=%d Height=%d Format=%d"), InWidth, InHeight, (int)InFormat); 136 | 137 | Format = InFormat; 138 | Width = InWidth; 139 | Height = InHeight; 140 | Pitch = Width * GPixelFormats[Format].BlockBytes; 141 | 142 | auto Context = this; 143 | 144 | #if (ENGINE_MAJOR_VERSION == 4 && ENGINE_MINOR_VERSION <= 26) 145 | 146 | // already in render thread context (see RenderCmd_UpdateTexture) 147 | //ENQUEUE_RENDER_COMMAND(SceneDrawCompletion)([Context](FRHICommandListImmediate& RHICmdList) 148 | //{ 149 | Context->RenderCmd_CreateTexture(); 150 | //}); 151 | 152 | #else // VERSION > 4.26 153 | 154 | AsyncTask(ENamedThreads::GameThread, [Context]() 155 | { 156 | Context->RenderCmd_CreateTexture(); 157 | }); 158 | 159 | #endif 160 | } 161 | } 162 | 163 | void FDynamicTexture::RenderCmd_CreateTexture() 164 | { 165 | auto Tex = UTexture2D::CreateTransient(Width, Height, Format); 166 | if (Tex) 167 | { 168 | #if WITH_EDITORONLY_DATA 169 | Tex->MipGenSettings = TextureMipGenSettings::TMGS_NoMipmaps; 170 | #endif 171 | 172 | Tex->CompressionSettings = TextureCompressionSettings::TC_VectorDisplacementmap; 173 | Tex->Filter = TextureFilter::TF_Nearest; 174 | Tex->SRGB = 0; 175 | 176 | Tex->AddToRoot(); 177 | Tex->UpdateResource(); 178 | 179 | TextureObject = Tex; 180 | 181 | if (FuncTextureCreated) 182 | { 183 | FuncTextureCreated(Tex); 184 | } 185 | } 186 | } 187 | 188 | // RELEASE 189 | 190 | void FDynamicTexture::Release() 191 | { 192 | if (TextureObject) 193 | { 194 | FlushRenderingCommands(); 195 | TextureObject->RemoveFromRoot(); 196 | TextureObject = nullptr; 197 | } 198 | 199 | Format = EPixelFormat::PF_Unknown; 200 | Pitch = 0; 201 | Width = 0; 202 | Height = 0; 203 | 204 | ReleaseBufferPool(); 205 | } 206 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/Hakz.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | inline uint8_t CkParseHex(uint8_t Val) 8 | { 9 | if (Val >= '0' && Val <= '9') return (Val - '0'); 10 | if (Val >= 'a' && Val <= 'f') return (Val - 'a') + 10; 11 | if (Val >= 'A' && Val <= 'F') return (Val - 'A') + 10; 12 | return 0; 13 | } 14 | 15 | inline uint8_t CkParseByte(const char* Str) 16 | { 17 | uint8_t hi = CkParseHex((uint8_t)Str[0]); 18 | uint8_t lo = CkParseHex((uint8_t)Str[1]); 19 | return ((hi << 4) | lo); 20 | } 21 | 22 | inline std::vector CkParseByteArray(const char* Str) 23 | { 24 | std::vector Result; 25 | if (Str) 26 | { 27 | const size_t Len = strlen(Str); 28 | if (Len) 29 | { 30 | std::vector Tmp; 31 | Tmp.reserve(Len); 32 | 33 | for (size_t i = 0; i < Len; i++) 34 | { 35 | if (isalnum(Str[i])) 36 | Tmp.push_back(Str[i]); 37 | } 38 | 39 | const size_t NumBytes = Tmp.size() / 2; 40 | if (NumBytes) 41 | { 42 | Result.resize(NumBytes); 43 | for (size_t i = 0; i < NumBytes; i++) 44 | { 45 | uint8_t hi = CkParseHex(Tmp[i*2]); 46 | uint8_t lo = CkParseHex(Tmp[(i*2)+1]); 47 | Result[i] = ((hi << 4) | lo); 48 | } 49 | } 50 | } 51 | } 52 | return std::move(Result); 53 | } 54 | 55 | template 56 | struct CkWildcard 57 | { 58 | inline bool operator()(const uint8_t &a, const uint8_t &b) const 59 | { 60 | return (a == b || b == Wildcard); 61 | } 62 | }; 63 | 64 | typedef CkWildcard<0xCC> CkWildcardCC; // Interrupt Type 3 65 | typedef CkWildcard<0xCE> CkWildcardCE; // Interrupt if Overflow 66 | 67 | #define CK_PAGE_EXECUTE_RWC (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY) 68 | 69 | template 70 | inline DWORD CkFindPatternIntern(HANDLE Process, const std::vector& Pattern, size_t Limit, std::vector& Result) 71 | { 72 | if (!Process) 73 | Process = GetCurrentProcess(); 74 | 75 | SYSTEM_INFO SysInfo; 76 | ZeroMemory(&SysInfo, sizeof(SysInfo)); 77 | GetSystemInfo(&SysInfo); 78 | 79 | uint8_t* MaxAddress = (uint8_t*)SysInfo.lpMaximumApplicationAddress; 80 | uint8_t* Ptr = (uint8_t*)SysInfo.lpMinimumApplicationAddress; 81 | 82 | TCompare Compare; 83 | 84 | while (Ptr < MaxAddress) 85 | { 86 | MEMORY_BASIC_INFORMATION MemInfo; 87 | if (VirtualQueryEx(Process, Ptr, &MemInfo, sizeof(MemInfo)) != sizeof(MemInfo)) 88 | { 89 | return GetLastError(); 90 | } 91 | 92 | if ((MemInfo.Protect & CK_PAGE_EXECUTE_RWC) && ((MemInfo.Protect & PAGE_GUARD) == 0) && ((MemInfo.Protect & PAGE_NOACCESS) == 0)) 93 | { 94 | uint8_t* RegionPos = (uint8_t*)MemInfo.BaseAddress; 95 | uint8_t* RegionEnd = RegionPos + MemInfo.RegionSize; 96 | 97 | while ((RegionPos = std::search(RegionPos, RegionEnd, Pattern.begin(), Pattern.end(), Compare)) != RegionEnd) 98 | { 99 | Result.push_back(RegionPos); 100 | 101 | if (Limit && Result.size() >= Limit) 102 | return 0; 103 | 104 | RegionPos++; 105 | } 106 | } 107 | 108 | Ptr += MemInfo.RegionSize; 109 | } 110 | 111 | return 0; 112 | } 113 | 114 | inline DWORD CkProtectWriteMemory(HANDLE Process, const std::vector& Data, PVOID Addr, SIZE_T Offset) 115 | { 116 | if (!Process) 117 | Process = GetCurrentProcess(); 118 | 119 | DWORD Prot = 0; 120 | if (!VirtualProtectEx(Process, Addr, Data.size(), PAGE_EXECUTE_READWRITE, &Prot)) 121 | return GetLastError(); 122 | 123 | memcpy((PVOID)((UINT64)Addr + (UINT64)Offset), &Data[0], Data.size()); 124 | 125 | DWORD Prot2 = 0; 126 | VirtualProtectEx(Process, Addr, Data.size(), Prot, &Prot2); 127 | 128 | return 0; 129 | } 130 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/MediaPipeClassificationObserverComponent.cpp: -------------------------------------------------------------------------------- 1 | #include "MediaPipeClassificationObserverComponent.h" 2 | #include "MediaPipePipelineComponent.h" 3 | #include "MediaPipeShared.h" 4 | 5 | #include "mediapipe/framework/formats/classification.pb.h" 6 | 7 | using FMediaPipeClassificationList = TArray; 8 | 9 | UMediaPipeClassificationObserverComponent::UMediaPipeClassificationObserverComponent() 10 | { 11 | } 12 | 13 | // WARNING: executed in MediaPipe thread context! 14 | void UMediaPipeClassificationObserverComponent::OnUmpPacket(IUmpObserver* Observer) 15 | { 16 | using TList = std::vector; 17 | 18 | if (!UmpCompareType(Observer)) 19 | { 20 | PLUGIN_LOG(Error, TEXT("Invalid Classification message")); 21 | NumDetections = 0; 22 | return; 23 | } 24 | 25 | const auto& Message = UmpCastPacket(Observer->GetData()); 26 | const int ListCount = Message.size(); 27 | Grow(MultiClassifications, ListCount); 28 | 29 | for (int i = 0; i < ListCount; ++i) 30 | { 31 | const auto& ListRef = Message[i]; 32 | const int NodeCount = ListRef.classification_size(); 33 | 34 | auto& StorageRef = MultiClassifications[i]; 35 | StorageRef.SetNum(NodeCount); 36 | 37 | for (int j = 0; j < NodeCount; ++j) 38 | { 39 | const auto& Src = ListRef.classification(j); 40 | auto& Dst = StorageRef[j]; 41 | 42 | Dst.Index = Src.index(); 43 | Dst.Score = Src.score(); 44 | Dst.Label = ANSI_TO_TCHAR(Src.label().c_str()); 45 | Dst.DisplayName = ANSI_TO_TCHAR(Src.display_name().c_str()); 46 | } 47 | } 48 | 49 | NumDetections = ListCount; 50 | UpdateTimestamp(); 51 | } 52 | 53 | const TArray& UMediaPipeClassificationObserverComponent::GetClassificationList(int ObjectId) 54 | { 55 | if (ObjectId >= 0 && ObjectId < NumDetections) 56 | { 57 | return MultiClassifications[ObjectId]; 58 | } 59 | PLUGIN_LOG(Error, TEXT("ObjectId out of range")); 60 | static FMediaPipeClassificationList Dummy; 61 | return Dummy; 62 | } 63 | 64 | const FMediaPipeClassification& UMediaPipeClassificationObserverComponent::GetClassification(int ObjectId, int ClassificationId) 65 | { 66 | const auto& List = GetClassificationList(ObjectId); 67 | if (ClassificationId >= 0 && ClassificationId < List.Num()) 68 | { 69 | return List[ClassificationId]; 70 | } 71 | PLUGIN_LOG(Error, TEXT("ClassificationId out of range")); 72 | static FMediaPipeClassification Dummy; 73 | return Dummy; 74 | } 75 | 76 | bool UMediaPipeClassificationObserverComponent::TryGetClassificationList(int ObjectId, TArray& ClassificationList) 77 | { 78 | if (ObjectId >= 0 && ObjectId < NumDetections) 79 | { 80 | ClassificationList = MultiClassifications[ObjectId]; 81 | return true; 82 | } 83 | return false; 84 | } 85 | 86 | bool UMediaPipeClassificationObserverComponent::TryGetClassification(int ObjectId, int ClassificationId, FMediaPipeClassification& Classification) 87 | { 88 | if (ObjectId >= 0 && ObjectId < NumDetections) 89 | { 90 | const auto& List = MultiClassifications[ObjectId]; 91 | if (ClassificationId >= 0 && ClassificationId < List.Num()) 92 | { 93 | Classification = List[ClassificationId]; 94 | return true; 95 | } 96 | } 97 | return false; 98 | } 99 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/MediaPipeModule.cpp: -------------------------------------------------------------------------------- 1 | #include "MediaPipeModule.h" 2 | #include "MediaPipeShared.h" 3 | #include "Misc/Paths.h" 4 | #include "Runtime/Launch/Resources/Version.h" 5 | 6 | #if PLATFORM_WINDOWS 7 | #include "Windows/WindowsPlatformProcess.h" 8 | #include "Windows/AllowWindowsPlatformTypes.h" 9 | #include 10 | #include "Windows/HideWindowsPlatformTypes.h" 11 | #include "Hakz.h" 12 | #endif 13 | 14 | DEFINE_LOG_CATEGORY(LogMediaPipe); 15 | 16 | IMPLEMENT_MODULE(FMediaPipeModule, MediaPipe) 17 | 18 | class UmpLog : public IUmpLog 19 | { 20 | public: 21 | void Println(EUmpVerbosity verbosity, const char* msg) const override 22 | { 23 | #define LOG_IMPL(v, msg) PLUGIN_LOG(v, TEXT("%S"), msg) 24 | switch (verbosity) 25 | { 26 | case EUmpVerbosity::Error: LOG_IMPL(Error, msg); break; 27 | case EUmpVerbosity::Warning: LOG_IMPL(Warning, msg); break; 28 | case EUmpVerbosity::Info: LOG_IMPL(Display, msg); break; 29 | //default: LOG_IMPL(Verbose, msg); break; 30 | default: LOG_IMPL(Display, msg); break; 31 | } 32 | } 33 | }; 34 | 35 | static UmpLog UmpLogger; 36 | 37 | // SUPER LAME FIX for deadlock in FModuleTrace::OnDllLoaded (hello EPIC? plz don't use LdrRegisterDllNotification) 38 | void FixDeadlock() 39 | { 40 | #if (ENGINE_MAJOR_VERSION == 5) 41 | 42 | const char* Variants[] = { 43 | // 5.0.0 44 | "48 89 5C 24 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 D9 48 81 EC B0 00 00 00 48 8B 05 B5 C6 B5 00", // dev editor (unrealeditor-core.dll) 45 | "48 89 5C 24 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 D9 48 81 EC B0 00 00 00 48 8B 05 CC CC CC CC 48 33 C4 48 89 45 17 4D 63 68 3C 33 C0", // dev game 46 | }; 47 | const int NumVariants = sizeof(Variants) / sizeof(Variants[0]); 48 | 49 | auto Process = GetCurrentProcess(); 50 | 51 | for (int i = 0; i < NumVariants; ++i) 52 | { 53 | auto Pattern = CkParseByteArray(Variants[i]); 54 | std::vector Loc; 55 | auto Status = CkFindPatternIntern(Process, Pattern, 2, Loc); 56 | PLUGIN_LOG_INFO(TEXT("FindPattern Id=%d Status=%d Count=%d [%s]"), i, (int)Status, (int)Loc.size()); 57 | 58 | if (Status == 0 && Loc.size() == 1) 59 | { 60 | PLUGIN_LOG_INFO(TEXT("FModuleTrace::OnDllLoaded -> %p"), Loc[0]); 61 | auto Fix = CkParseByteArray("C3"); 62 | Status = CkProtectWriteMemory(Process, Fix, Loc[0], 0); 63 | PLUGIN_LOG_INFO(TEXT("WriteMemory -> %u"), (unsigned int)Status); 64 | return; 65 | } 66 | } 67 | 68 | PLUGIN_LOG(Warning, TEXT("FModuleTrace::OnDllLoaded NOT FOUND")); 69 | 70 | #endif 71 | } 72 | 73 | void FMediaPipeModule::StartupModule() 74 | { 75 | PLUGIN_TRACE; 76 | 77 | #define UMP_BIN_ARCH UMP_STRINGIZE(UBT_COMPILED_PLATFORM) 78 | 79 | #define UMP_LIB_NAME "ump_shared" 80 | 81 | #if PLATFORM_WINDOWS 82 | #define UMP_LIB_EXT ".dll" 83 | #else 84 | #define UMP_LIB_EXT ".so" 85 | #endif 86 | 87 | FixDeadlock(); 88 | 89 | auto Plugin = IPluginManager::Get().FindPlugin(TEXT(PLUGIN_NAME)); 90 | auto PluginBaseDir = FPaths::ConvertRelativePathToFull(Plugin->GetBaseDir()); 91 | PLUGIN_LOG_INFO(TEXT("PluginBaseDir: %s"), *PluginBaseDir); 92 | 93 | FString BinariesDir, DataDir; 94 | #if WITH_EDITOR 95 | BinariesDir = FPaths::Combine(*PluginBaseDir, TEXT("Binaries"), TEXT(UMP_BIN_ARCH)); 96 | DataDir = FPaths::Combine(*PluginBaseDir, TEXT("ThirdParty/mediapipe/Data")); 97 | #else 98 | BinariesDir = FPlatformProcess::BaseDir(); 99 | DataDir = BinariesDir; 100 | #endif 101 | PLUGIN_LOG_INFO(TEXT("BinariesDir: %s"), *BinariesDir); 102 | PLUGIN_LOG_INFO(TEXT("DataDir: %s"), *DataDir); 103 | 104 | FString LibPath = FPaths::Combine(*BinariesDir, TEXT(UMP_LIB_NAME) TEXT(UMP_LIB_EXT)); 105 | 106 | PLUGIN_LOG_INFO(TEXT("GetDllHandle: %s"), *LibPath); 107 | LibUmp = FPlatformProcess::GetDllHandle(*LibPath); 108 | PLUGIN_LOG_INFO(TEXT("-> %p"), LibUmp); 109 | 110 | if (!LibUmp) 111 | { 112 | PLUGIN_LOG(Error, TEXT("Unable to load: %s"), *LibPath); 113 | } 114 | else 115 | { 116 | CreateContextPtr = FPlatformProcess::GetDllExport(LibUmp, TEXT("DYN_UmpCreateContext")); 117 | if (!CreateContextPtr) 118 | { 119 | PLUGIN_LOG(Error, TEXT("Export not found: DYN_UmpCreateContext")); 120 | } 121 | else 122 | { 123 | Context = ((UmpCreateContext_Proto*)CreateContextPtr)(); 124 | if (!Context) 125 | { 126 | PLUGIN_LOG(Error, TEXT("Unable to create IUmpContext")); 127 | } 128 | else 129 | { 130 | Context->SetLog(&UmpLogger); 131 | Context->SetResourceDir(TCHAR_TO_ANSI(*DataDir)); 132 | } 133 | } 134 | } 135 | } 136 | 137 | void FMediaPipeModule::ShutdownModule() 138 | { 139 | PLUGIN_TRACE; 140 | 141 | if (Context) 142 | { 143 | Context->SetLog(nullptr); 144 | Context->Release(); 145 | Context = nullptr; 146 | } 147 | 148 | if (LibUmp) 149 | { 150 | FPlatformProcess::FreeDllHandle(LibUmp); 151 | LibUmp = nullptr; 152 | } 153 | } 154 | 155 | IUmpPipeline* FMediaPipeModule::CreatePipeline() 156 | { 157 | PLUGIN_TRACE; 158 | 159 | if (!Context) 160 | { 161 | PLUGIN_LOG(Error, TEXT("Invalid state: IUmpContext")); 162 | return nullptr; 163 | } 164 | 165 | auto Pipeline = Context->CreatePipeline(); 166 | if (!Pipeline) 167 | { 168 | PLUGIN_LOG(Error, TEXT("Unable to create IUmpPipeline")); 169 | } 170 | 171 | return Pipeline; 172 | } 173 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/MediaPipeModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "IMediaPipeModule.h" 4 | #include "Interfaces/IPluginManager.h" 5 | 6 | class FMediaPipeModule : public IMediaPipeModule 7 | { 8 | public: 9 | void StartupModule() override; 10 | void ShutdownModule() override; 11 | class IUmpPipeline* CreatePipeline() override; 12 | 13 | private: 14 | void* LibUmp = nullptr; 15 | void* CreateContextPtr = nullptr; 16 | class IUmpContext* Context = nullptr; 17 | }; 18 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/MediaPipeObserverComponent.cpp: -------------------------------------------------------------------------------- 1 | #include "MediaPipeObserverComponent.h" 2 | #include "MediaPipePipelineComponent.h" 3 | #include "MediaPipeShared.h" 4 | #include "Engine/World.h" 5 | 6 | UMediaPipeObserverComponent::UMediaPipeObserverComponent() 7 | { 8 | } 9 | 10 | void UMediaPipeObserverComponent::OnPipelineStarting(IUmpPipeline* Pipeline) 11 | { 12 | UmpSafeRelease(Impl); 13 | 14 | PLUGIN_LOG_INFO(TEXT("OnPipelineStarting: %s"), *StreamName); 15 | 16 | if (StreamName.IsEmpty()) 17 | { 18 | PLUGIN_LOG(Error, TEXT("Invalid property: StreamName")); 19 | return; 20 | } 21 | 22 | Impl = Pipeline->CreateObserver(TCHAR_TO_ANSI(*StreamName)); 23 | if (!Impl) 24 | { 25 | PLUGIN_LOG(Error, TEXT("Unable to create IUmpObserver")); 26 | return; 27 | } 28 | 29 | Impl->SetPacketCallback(static_cast(this)); 30 | } 31 | 32 | void UMediaPipeObserverComponent::OnPipelineStopping(IUmpPipeline* Pipeline) 33 | { 34 | PLUGIN_LOG_INFO(TEXT("OnPipelineStopping: %s"), *StreamName); 35 | 36 | UmpSafeRelease(Impl); 37 | } 38 | 39 | void UMediaPipeObserverComponent::OnUmpPresence(class IUmpObserver* observer, bool present) 40 | { 41 | if (!present) 42 | NumDetections = 0; 43 | } 44 | 45 | int UMediaPipeObserverComponent::GetNumDetections() 46 | { 47 | return NumDetections; 48 | } 49 | 50 | bool UMediaPipeObserverComponent::HaveDetections() 51 | { 52 | return NumDetections > 0; 53 | } 54 | 55 | void UMediaPipeObserverComponent::UpdateTimestamp() 56 | { 57 | LastUpdate = GetWorld()->GetRealTimeSeconds(); 58 | PacketCounter.Increment(); 59 | } 60 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/MediaPipePresenceObserverComponent.cpp: -------------------------------------------------------------------------------- 1 | #include "MediaPipePresenceObserverComponent.h" 2 | #include "MediaPipePipelineComponent.h" 3 | #include "MediaPipeShared.h" 4 | 5 | UMediaPipePresenceObserverComponent::UMediaPipePresenceObserverComponent() 6 | { 7 | } 8 | 9 | void UMediaPipePresenceObserverComponent::OnUmpPacket(IUmpObserver* Observer) 10 | { 11 | if (!UmpCompareType(Observer)) 12 | { 13 | PLUGIN_LOG(Error, TEXT("Invalid Presence message")); 14 | return; 15 | } 16 | 17 | bPresent = UmpCastPacket(Observer->GetData()); 18 | UpdateTimestamp(); 19 | } 20 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Private/MediaPipeShared.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "ump_api.h" 5 | #include 6 | 7 | #define PLUGIN_NAME "MediaPipe" 8 | 9 | DECLARE_LOG_CATEGORY_EXTERN(LogMediaPipe, Log, All); 10 | 11 | #define PLUGIN_LOG(Verbosity, Format, ...) UE_LOG(LogMediaPipe, Verbosity, Format, __VA_ARGS__) 12 | #define PLUGIN_LOG_INFO(Format, ...) UE_LOG(LogMediaPipe, Display, Format, __VA_ARGS__) 13 | #define PLUGIN_TRACE PLUGIN_LOG_INFO(TEXT("%S"), __FUNCTION__) 14 | 15 | #define UMP_STRINGIZE_INNER(x) #x 16 | #define UMP_STRINGIZE(x) UMP_STRINGIZE_INNER(x) 17 | 18 | struct UmpMat4 19 | { 20 | union 21 | { 22 | float arr[16]; 23 | float m[4][4]; 24 | }; 25 | }; 26 | 27 | class TypeInfo { 28 | public: 29 | template 30 | static const TypeInfo& Get() { 31 | //static TypeInfo* static_type_info = new TypeInfo(typeid(T)); 32 | //return *static_type_info; 33 | static TypeInfo static_type_info(typeid(T)); 34 | return static_type_info; 35 | } 36 | size_t hash_code() const { return info_.hash_code(); } 37 | 38 | private: 39 | TypeInfo(const std::type_info& info) : info_(info) {} 40 | TypeInfo(const TypeInfo&) = delete; 41 | 42 | private: 43 | const std::type_info& info_; 44 | }; 45 | 46 | template 47 | inline bool UmpCompareType(size_t type) 48 | { 49 | return (type == TypeInfo::Get().hash_code()); 50 | } 51 | 52 | template 53 | inline bool UmpCompareType(class IUmpObserver* observer) 54 | { 55 | return (observer->GetMessageType() == TypeInfo::Get().hash_code()); 56 | } 57 | 58 | template 59 | inline const T& UmpCastPacket(const void * const pk_data) 60 | { 61 | return *((const T * const)pk_data); 62 | } 63 | 64 | template 65 | inline void UmpSafeRelease(T*& obj) { if (obj) { obj->Release(); obj = nullptr; } } 66 | 67 | template 68 | inline void Grow(TArray& Storage, int Cap) 69 | { 70 | if (Storage.Num() < Cap) 71 | Storage.SetNum(Cap); 72 | } 73 | 74 | inline FVector Scale3D(const FVector& V, const FVector& S) 75 | { 76 | return FVector(V.X * S.X, V.Y * S.Y, V.Z * S.Z); 77 | } 78 | 79 | inline FVector ShuffleAxes(const FVector& V, int X, int Y, int Z) 80 | { 81 | constexpr int Id[] = {0, 1, 2, 0, 1, 2}; 82 | constexpr float Sign[] = {1, 1, 1, -1, -1, -1}; 83 | 84 | const auto* Vptr = &V.X; 85 | FVector Out; 86 | Out.X = Vptr[Id[X]] * Sign[X]; 87 | Out.Y = Vptr[Id[Y]] * Sign[Y]; 88 | Out.Z = Vptr[Id[Z]] * Sign[Z]; 89 | return Out; 90 | } 91 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/DynamicTexture.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CoreMinimal.h" 4 | #include "PixelFormat.h" 5 | #include "Engine/Texture2D.h" 6 | #include 7 | 8 | struct FPixelBuffer 9 | { 10 | void* Handle = nullptr; 11 | const void* Data = nullptr; 12 | EPixelFormat Format = EPixelFormat::PF_Unknown; 13 | int Pitch = 0; 14 | int Width = 0; 15 | int Height = 0; 16 | }; 17 | 18 | class MEDIAPIPE_API FDynamicTexture 19 | { 20 | public: 21 | FDynamicTexture(); 22 | ~FDynamicTexture(); 23 | 24 | void EnqueBuffer(const FPixelBuffer& InBuffer); 25 | inline UTexture2D* GetTextureObject() { return TextureObject; } 26 | 27 | std::function FuncTextureCreated; 28 | std::function FuncBufferSubmitted; 29 | 30 | private: 31 | FPixelBuffer* AllocBuffer(); 32 | void ReturnBufferToPool(FPixelBuffer* Buffer); 33 | void ReleaseBufferPool(); 34 | void Resize(int InWidth, int InHeight, EPixelFormat InFormat); 35 | void Release(); 36 | void RenderCmd_CreateTexture(); 37 | void RenderCmd_UpdateTexture(FPixelBuffer* InBuffer); 38 | 39 | private: 40 | UTexture2D* TextureObject = nullptr; 41 | TArray BufferPool; 42 | FCriticalSection BufferMux; 43 | EPixelFormat Format = EPixelFormat::PF_Unknown; 44 | int Pitch = 0; 45 | int Width = 0; 46 | int Height = 0; 47 | }; 48 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/IMediaPipeModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Modules/ModuleManager.h" 4 | 5 | class MEDIAPIPE_API IMediaPipeModule : public IModuleInterface 6 | { 7 | public: 8 | 9 | static inline IMediaPipeModule& Get() 10 | { 11 | return FModuleManager::LoadModuleChecked("MediaPipe"); 12 | } 13 | 14 | static inline bool IsAvailable() 15 | { 16 | return FModuleManager::Get().IsModuleLoaded("MediaPipe"); 17 | } 18 | 19 | virtual class IUmpPipeline* CreatePipeline() = 0; 20 | }; 21 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/MediaPipeClassificationObserverComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MediaPipeObserverComponent.h" 4 | #include "MediaPipeClassificationObserverComponent.generated.h" 5 | 6 | // classification.proto 7 | 8 | USTRUCT(BlueprintType) 9 | struct FMediaPipeClassification 10 | { 11 | GENERATED_BODY() 12 | 13 | UPROPERTY(BlueprintReadOnly) 14 | int Index; 15 | 16 | UPROPERTY(BlueprintReadOnly) 17 | float Score; 18 | 19 | UPROPERTY(BlueprintReadOnly) 20 | FString Label; 21 | 22 | UPROPERTY(BlueprintReadOnly) 23 | FString DisplayName; 24 | }; 25 | 26 | UCLASS(ClassGroup="MediaPipe", meta=(BlueprintSpawnableComponent)) 27 | class MEDIAPIPE_API UMediaPipeClassificationObserverComponent : public UMediaPipeObserverComponent 28 | { 29 | GENERATED_BODY() 30 | 31 | public: 32 | UMediaPipeClassificationObserverComponent(); 33 | 34 | // Getters 35 | 36 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 37 | const TArray& GetClassificationList(int ObjectId); 38 | 39 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 40 | const FMediaPipeClassification& GetClassification(int ObjectId, int ClassificationId); 41 | 42 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 43 | bool TryGetClassificationList(int ObjectId, TArray& ClassificationList); 44 | 45 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 46 | bool TryGetClassification(int ObjectId, int ClassificationId, FMediaPipeClassification& Classification); 47 | 48 | protected: 49 | void OnUmpPacket(class IUmpObserver* Observer) override; 50 | 51 | TArray> MultiClassifications; 52 | }; 53 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/MediaPipeFaceMeshObserverComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MediaPipeObserverComponent.h" 4 | #include "MediaPipeFaceMeshObserverComponent.generated.h" 5 | 6 | USTRUCT(BlueprintType) 7 | struct FMediaPipeVertex 8 | { 9 | GENERATED_BODY() 10 | 11 | UPROPERTY(BlueprintReadOnly) 12 | FVector Pos; 13 | 14 | UPROPERTY(BlueprintReadOnly) 15 | FVector2D TexCoord; 16 | }; 17 | 18 | USTRUCT(BlueprintType) 19 | struct FMediaPipeFaceMesh 20 | { 21 | GENERATED_BODY() 22 | 23 | UPROPERTY(BlueprintReadOnly) 24 | FTransform Pose; 25 | 26 | UPROPERTY(BlueprintReadOnly) 27 | TArray Vertices; 28 | 29 | UPROPERTY(BlueprintReadOnly) 30 | TArray Indices; 31 | }; 32 | 33 | UCLASS(ClassGroup="MediaPipe", meta=(BlueprintSpawnableComponent)) 34 | class MEDIAPIPE_API UMediaPipeFaceMeshObserverComponent : public UMediaPipeObserverComponent 35 | { 36 | GENERATED_BODY() 37 | 38 | public: 39 | UMediaPipeFaceMeshObserverComponent(); 40 | 41 | // Config 42 | 43 | UPROPERTY(Category="MediaPipe|FaceMesh", BlueprintReadWrite, EditAnywhere) 44 | float UniformScale = 1; 45 | 46 | UPROPERTY(Category="MediaPipe|FaceMesh", BlueprintReadWrite, EditAnywhere) 47 | bool bFlipHorizontal; 48 | 49 | // Getters 50 | 51 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 52 | const FMediaPipeFaceMesh& GetMesh(int MeshId); 53 | 54 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 55 | const FTransform& GetMeshPose(int MeshId); 56 | 57 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 58 | const FMediaPipeVertex& GetMeshVertex(int MeshId, int VertexId); 59 | 60 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 61 | bool TryGetMesh(int MeshId, FMediaPipeFaceMesh& Mesh); 62 | 63 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 64 | bool TryGetMeshPose(int MeshId, FTransform& Pose); 65 | 66 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 67 | bool TryGetMeshVertex(int MeshId, int VertexId, FMediaPipeVertex& Vertex); 68 | 69 | // Utils 70 | 71 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 72 | void DrawDebugMeshVertices(int MeshId, const FTransform& Transform, float PrimitiveScale = 1.0f, FLinearColor Color = FLinearColor(0, 1, 0, 1)); 73 | 74 | protected: 75 | void OnUmpPacket(class IUmpObserver* Observer) override; 76 | 77 | TArray Meshes; 78 | }; 79 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/MediaPipeLandmarkObserverComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MediaPipeObserverComponent.h" 4 | #include "MediaPipeLandmarkObserverComponent.generated.h" 5 | 6 | UENUM(Blueprintable) 7 | enum class EMediaPipeLandmarkListType : uint8 8 | { 9 | LandmarkList = 0, 10 | NormalizedLandmarkList, 11 | MultiLandmarkList, 12 | MultiNormalizedLandmarkList, 13 | }; 14 | 15 | UENUM(Blueprintable) 16 | enum class EMediaPipeLandmarkAxisMapping : uint8 17 | { 18 | X = 0, 19 | Y, 20 | Z, 21 | NegX, 22 | NegY, 23 | NegZ, 24 | }; 25 | 26 | USTRUCT(BlueprintType) 27 | struct FMediaPipeLandmark 28 | { 29 | GENERATED_BODY() 30 | 31 | UPROPERTY(BlueprintReadOnly) 32 | FVector Pos = {0, 0, 0}; 33 | 34 | UPROPERTY(BlueprintReadOnly) 35 | float Visibility = 0; 36 | 37 | UPROPERTY(BlueprintReadOnly) 38 | float Presence = 0; 39 | }; 40 | 41 | UCLASS(ClassGroup="MediaPipe", meta=(BlueprintSpawnableComponent)) 42 | class MEDIAPIPE_API UMediaPipeLandmarkObserverComponent : public UMediaPipeObserverComponent 43 | { 44 | GENERATED_BODY() 45 | 46 | public: 47 | UMediaPipeLandmarkObserverComponent(); 48 | 49 | // Config 50 | 51 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 52 | EMediaPipeLandmarkListType LandmarkListType = EMediaPipeLandmarkListType::MultiNormalizedLandmarkList; 53 | 54 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 55 | EMediaPipeLandmarkAxisMapping AxisX = EMediaPipeLandmarkAxisMapping::X; 56 | 57 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 58 | EMediaPipeLandmarkAxisMapping AxisY = EMediaPipeLandmarkAxisMapping::Y; 59 | 60 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 61 | EMediaPipeLandmarkAxisMapping AxisZ = EMediaPipeLandmarkAxisMapping::Z; 62 | 63 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 64 | FVector WorldScale = FVector(1, 1, 1); 65 | 66 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 67 | float MinVisibility = -1; 68 | 69 | UPROPERTY(Category="MediaPipe|Landmarks", BlueprintReadWrite, EditAnywhere) 70 | float MinPresence = -1; 71 | 72 | // Getters 73 | 74 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 75 | const TArray& GetLandmarkList(int ObjectId); 76 | 77 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 78 | const FMediaPipeLandmark& GetLandmark(int ObjectId, int LandmarkId); 79 | 80 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 81 | bool TryGetLandmarkList(int ObjectId, TArray& LandmarkList); 82 | 83 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 84 | bool TryGetLandmark(int ObjectId, int LandmarkId, FMediaPipeLandmark& Landmark); 85 | 86 | // Utils 87 | 88 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 89 | void DrawDebugLandmarks(int ObjectId, const FTransform& Transform, float PrimitiveScale = 1.0f, FLinearColor Color = FLinearColor(0, 1, 0, 1)); 90 | 91 | protected: 92 | void OnUmpPacket(class IUmpObserver* Observer) override; 93 | 94 | TArray> MultiLandmarks; 95 | }; 96 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/MediaPipeObserverComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ump_api.h" 4 | #include "Components/ActorComponent.h" 5 | #include "MediaPipeObserverComponent.generated.h" 6 | 7 | class IMediaPipePipelineCallback 8 | { 9 | public: 10 | virtual void OnPipelineStarting(class IUmpPipeline* Pipeline) = 0; 11 | virtual void OnPipelineStopping(class IUmpPipeline* Pipeline) = 0; 12 | }; 13 | 14 | UCLASS(ClassGroup="MediaPipe") 15 | class MEDIAPIPE_API UMediaPipeObserverComponent : 16 | public UActorComponent, 17 | public IMediaPipePipelineCallback, 18 | public IUmpPacketCallback 19 | { 20 | GENERATED_BODY() 21 | 22 | public: 23 | UMediaPipeObserverComponent(); 24 | 25 | // Config 26 | 27 | UPROPERTY(Category="MediaPipe|Observer", BlueprintReadWrite, EditAnywhere) 28 | FString PipelineName; 29 | 30 | UPROPERTY(Category="MediaPipe|Observer", BlueprintReadWrite, EditAnywhere) 31 | FString StreamName; 32 | 33 | UPROPERTY(Category="MediaPipe|Observer", BlueprintReadWrite, EditAnywhere) 34 | bool bAllowAutoBind = true; 35 | 36 | // Runtime 37 | 38 | UPROPERTY(Category="MediaPipe", BlueprintReadOnly) 39 | float LastUpdate; 40 | 41 | // Getters 42 | 43 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 44 | int GetNumDetections(); 45 | 46 | UFUNCTION(Category="MediaPipe", BlueprintCallable, BlueprintPure) 47 | bool HaveDetections(); 48 | 49 | int32 GetPacketCounter() const { return PacketCounter.GetValue(); } 50 | void ResetPacketCounter() { PacketCounter.Reset(); } 51 | 52 | protected: 53 | void UpdateTimestamp(); 54 | 55 | protected: 56 | friend class UMediaPipePipelineComponent; 57 | void OnPipelineStarting(class IUmpPipeline* Pipeline) override; 58 | void OnPipelineStopping(class IUmpPipeline* Pipeline) override; 59 | void OnUmpPresence(class IUmpObserver* observer, bool present) override; 60 | void OnUmpPacket(class IUmpObserver* observer) override {} 61 | 62 | protected: 63 | class IUmpObserver* Impl = nullptr; 64 | TAtomic NumDetections = 0; 65 | FThreadSafeCounter PacketCounter; 66 | }; 67 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/MediaPipePipelineComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ump_api.h" 4 | #include "Components/ActorComponent.h" 5 | #include "DynamicTexture.h" 6 | #include "MediaPipePipelineComponent.generated.h" 7 | 8 | DECLARE_STATS_GROUP(TEXT("MediaPipe"), STATGROUP_MediaPipe, STATCAT_Advanced); 9 | 10 | class FDynamicTexture; 11 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDynamicTextureCreatedSignature, UTexture2D*, NewTexture); 12 | 13 | UCLASS(ClassGroup="MediaPipe", meta=(BlueprintSpawnableComponent)) 14 | class MEDIAPIPE_API UMediaPipePipelineComponent : 15 | public UActorComponent, 16 | public IUmpFrameCallback 17 | { 18 | GENERATED_BODY() 19 | 20 | public: 21 | UMediaPipePipelineComponent(); 22 | 23 | // UObject 24 | void BeginDestroy() override; 25 | 26 | // UActorComponent 27 | void InitializeComponent() override; 28 | void BeginPlay() override; 29 | void EndPlay(const EEndPlayReason::Type EndPlayReason) override; 30 | void UninitializeComponent() override; 31 | void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; 32 | 33 | // IMediaPipeFrameCallback 34 | void OnUmpFrame(class IUmpFrame* frame) override; 35 | 36 | // Core config 37 | 38 | UPROPERTY(Category="MediaPipe|Graph", BlueprintReadWrite, EditAnywhere) 39 | FString PipelineName; 40 | 41 | UPROPERTY(Category="MediaPipe|Graph", BlueprintReadWrite, EditAnywhere) 42 | FString GraphPrefix = TEXT("mediapipe/unreal/"); 43 | 44 | UPROPERTY(Category="MediaPipe|Graph", BlueprintReadWrite, EditAnywhere) 45 | FString GraphExt = TEXT(".pbtxt"); 46 | 47 | UPROPERTY(Category="MediaPipe|Graph", BlueprintReadWrite, EditAnywhere) 48 | TArray GraphNodes; 49 | 50 | UPROPERTY(Category="MediaPipe|Graph", BlueprintReadWrite, EditAnywhere) 51 | bool bAutoBindObservers = true; 52 | 53 | // Capture config 54 | 55 | UPROPERTY(Category="MediaPipe|Capture", BlueprintReadWrite, EditAnywhere) 56 | FString InputFile; 57 | 58 | UPROPERTY(Category="MediaPipe|Capture", BlueprintReadWrite, EditAnywhere) 59 | int CameraId = 0; 60 | 61 | UPROPERTY(Category="MediaPipe|Capture", BlueprintReadWrite, EditAnywhere) 62 | int CaptureApi = 0; 63 | 64 | UPROPERTY(Category="MediaPipe|Capture", BlueprintReadWrite, EditAnywhere) 65 | int ResX = 0; 66 | 67 | UPROPERTY(Category="MediaPipe|Capture", BlueprintReadWrite, EditAnywhere) 68 | int ResY = 0; 69 | 70 | UPROPERTY(Category="MediaPipe|Capture", BlueprintReadWrite, EditAnywhere) 71 | int Fps = 0; 72 | 73 | // Video texture 74 | 75 | UPROPERTY(Category="MediaPipe|VideoTexture", BlueprintReadWrite, EditAnywhere) 76 | bool bEnableVideoTexture; 77 | 78 | UPROPERTY(Category="MediaPipe|VideoTexture", BlueprintAssignable) 79 | FDynamicTextureCreatedSignature OnVideoTextureCreated; 80 | 81 | // Utils config 82 | 83 | UPROPERTY(Category="MediaPipe|Utils", BlueprintReadWrite, EditAnywhere) 84 | bool bEnableOverlay; 85 | 86 | // Stats 87 | 88 | UPROPERTY(Category="MediaPipe|Stats", BlueprintReadOnly) 89 | int LastFrameId = 0; 90 | 91 | UPROPERTY(Category="MediaPipe|Stats", BlueprintReadOnly) 92 | float LastFrameTimestamp = 0; 93 | 94 | // Methods 95 | 96 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 97 | void AddObserver(class UMediaPipeObserverComponent* Observer); 98 | 99 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 100 | void RemoveObserver(class UMediaPipeObserverComponent* Observer); 101 | 102 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 103 | void RemoveAllObservers(); 104 | 105 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 106 | bool Start(); 107 | 108 | UFUNCTION(Category="MediaPipe", BlueprintCallable) 109 | void Stop(); 110 | 111 | protected: 112 | bool CreatePipeline(); 113 | void ReleasePipeline(); 114 | 115 | protected: 116 | class IUmpPipeline* Impl = nullptr; 117 | bool IsPipelineRunning = false; 118 | float StatAccum = 0; 119 | 120 | UPROPERTY() 121 | TArray Observers; 122 | 123 | TUniquePtr VideoTexture; 124 | }; 125 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/MediaPipePresenceObserverComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MediaPipeObserverComponent.h" 4 | #include "MediaPipePresenceObserverComponent.generated.h" 5 | 6 | UCLASS(ClassGroup="MediaPipe", meta=(BlueprintSpawnableComponent)) 7 | class MEDIAPIPE_API UMediaPipePresenceObserverComponent : public UMediaPipeObserverComponent 8 | { 9 | GENERATED_BODY() 10 | 11 | public: 12 | UMediaPipePresenceObserverComponent(); 13 | 14 | UPROPERTY(Category="MediaPipe", BlueprintReadOnly) 15 | bool bPresent; 16 | 17 | protected: 18 | void OnUmpPacket(class IUmpObserver* Observer) override; 19 | }; 20 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/Source/MediaPipe/Public/ump_api.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | // 6 | // Log 7 | // 8 | 9 | enum class EUmpVerbosity 10 | { 11 | Error = 0, 12 | Warning, 13 | Info, 14 | Debug 15 | }; 16 | 17 | class IUmpLog 18 | { 19 | protected: 20 | virtual ~IUmpLog() {} 21 | 22 | public: 23 | virtual void Println(EUmpVerbosity verbosity, const char* msg) const { (void)verbosity; (void)msg; } 24 | }; 25 | 26 | // 27 | // Object 28 | // 29 | 30 | class IUmpObject 31 | { 32 | protected: 33 | virtual ~IUmpObject() {} 34 | 35 | public: 36 | struct Dtor { void operator()(IUmpObject* obj) { obj->Release(); } }; 37 | virtual void Release() = 0; 38 | virtual void AddRef() = 0; 39 | }; 40 | 41 | // 42 | // Context 43 | // 44 | 45 | class IUmpContext : public IUmpObject 46 | { 47 | public: 48 | virtual void SetLog(IUmpLog* log) = 0; 49 | virtual void SetResourceDir(const char* resource_dir) = 0; 50 | virtual class IUmpPipeline* CreatePipeline() = 0; 51 | }; 52 | 53 | extern "C" 54 | { 55 | IUmpContext* UmpCreateContext(); 56 | typedef IUmpContext* UmpCreateContext_Proto(); 57 | } 58 | 59 | // 60 | // Pipeline 61 | // 62 | 63 | class IUmpPipeline : public IUmpObject 64 | { 65 | public: 66 | virtual void SetGraphConfiguration(const char* filename) = 0; 67 | virtual void SetCaptureFromFile(const char* filename) = 0; 68 | virtual void SetCaptureParams(int cam_id, int cam_api, int cam_resx, int cam_resy, int cam_fps) = 0; 69 | virtual void SetOverlay(bool overlay) = 0; 70 | virtual class IUmpObserver* CreateObserver(const char* stream_name) = 0; 71 | virtual void SetFrameCallback(class IUmpFrameCallback* callback) = 0; 72 | virtual bool Start() = 0; 73 | virtual void Stop() = 0; 74 | 75 | // debug 76 | virtual void LogProfilerStats() = 0; 77 | virtual uint64_t GetLastFrameId() = 0; 78 | virtual double GetLastFrameTimestamp() = 0; 79 | }; 80 | 81 | // 82 | // Observer 83 | // 84 | 85 | class IUmpPacketCallback 86 | { 87 | public: 88 | virtual void OnUmpPresence(class IUmpObserver* observer, bool present) = 0; 89 | virtual void OnUmpPacket(class IUmpObserver* observer) = 0; 90 | }; 91 | 92 | class IUmpObserver : public IUmpObject 93 | { 94 | public: 95 | virtual void SetPacketCallback(IUmpPacketCallback* callback) = 0; 96 | virtual size_t GetMessageType() = 0; 97 | virtual const void* const GetData() = 0; 98 | }; 99 | 100 | // 101 | // Frame callback 102 | // 103 | 104 | enum class EUmpPixelFormat 105 | { 106 | Unknown = 0, 107 | B8G8R8A8, 108 | R8G8B8A8, 109 | NUM_ITEMS // last 110 | }; 111 | 112 | class IUmpFrame : public IUmpObject 113 | { 114 | public: 115 | virtual const void* GetData() const = 0; 116 | virtual EUmpPixelFormat GetFormat() const = 0; 117 | virtual int GetPitch() const = 0; 118 | virtual int GetWidth() const = 0; 119 | virtual int GetHeight() const = 0; 120 | }; 121 | 122 | class IUmpFrameCallback 123 | { 124 | public: 125 | virtual void OnUmpFrame(IUmpFrame* frame) = 0; 126 | }; 127 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Binaries/Win64/opencv_world3410.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Binaries/Win64/opencv_world3410.dll -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Binaries/Win64/ump_shared.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Binaries/Win64/ump_shared.dll -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/face_detection/face_detection_short_range.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/face_detection/face_detection_short_range.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/face_geometry/data/geometry_pipeline_metadata_landmarks.binarypb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/face_geometry/data/geometry_pipeline_metadata_landmarks.binarypb -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/face_landmark/face_landmark.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/face_landmark/face_landmark.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/hand_landmark/hand_landmark.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/hand_landmark/hand_landmark.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/hand_landmark/handedness.txt: -------------------------------------------------------------------------------- 1 | Left 2 | Right 3 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/holistic_landmark/hand_recrop.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/holistic_landmark/hand_recrop.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/iris_landmark/iris_landmark.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/iris_landmark/iris_landmark.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/objectron/object_detection_3d_cup.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/objectron/object_detection_3d_cup.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/objectron/object_detection_oidv4_labelmap.txt: -------------------------------------------------------------------------------- 1 | ??? 2 | Bicycle 3 | Boot 4 | Laptop 5 | Person 6 | Chair 7 | Cattle 8 | Desk 9 | Cat 10 | Computer mouse 11 | Computer monitor 12 | Box 13 | Mug 14 | Coffee cup 15 | Stationary bicycle 16 | Table 17 | Bottle 18 | High heels 19 | Vehicle 20 | Footwear 21 | Dog 22 | Book 23 | Camera 24 | Car 25 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/objectron/object_detection_ssd_mobilenetv2_oidv4_fp16.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/objectron/object_detection_ssd_mobilenetv2_oidv4_fp16.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/palm_detection/palm_detection.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/palm_detection/palm_detection.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/pose_detection/pose_detection.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/pose_detection/pose_detection.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/pose_landmark/pose_landmark_full.tflite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/modules/pose_landmark/pose_landmark_full.tflite -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/face_landmarks_with_iris.pbtxt: -------------------------------------------------------------------------------- 1 | 2 | input_stream: "input_video" 3 | output_stream: "output_video" 4 | 5 | output_stream: "multi_face_landmarks" 6 | output_stream: "multi_face_landmarks_presence" 7 | 8 | output_stream: "left_eye_contour_landmarks" 9 | output_stream: "left_iris_landmarks" 10 | output_stream: "left_eye_rect_from_landmarks" 11 | 12 | output_stream: "right_eye_contour_landmarks" 13 | output_stream: "right_iris_landmarks" 14 | output_stream: "right_eye_rect_from_landmarks" 15 | 16 | node { 17 | calculator: "FlowLimiterCalculator" 18 | input_stream: "input_video" 19 | input_stream: "FINISHED:face_landmarks_with_iris" 20 | input_stream_info: { 21 | tag_index: "FINISHED" 22 | back_edge: true 23 | } 24 | output_stream: "throttled_input_video" 25 | } 26 | 27 | node { 28 | calculator: "ImagePropertiesCalculator" 29 | input_stream: "IMAGE:throttled_input_video" 30 | output_stream: "SIZE:input_image_size" 31 | } 32 | 33 | node { 34 | calculator: "ConstantSidePacketCalculator" 35 | output_side_packet: "PACKET:num_faces" 36 | node_options: { 37 | [type.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions]: { 38 | packet { int_value: 1 } 39 | } 40 | } 41 | } 42 | 43 | node { 44 | calculator: "FaceLandmarkFrontCpu" 45 | input_stream: "IMAGE:throttled_input_video" 46 | input_side_packet: "NUM_FACES:num_faces" 47 | output_stream: "LANDMARKS:multi_face_landmarks" 48 | output_stream: "ROIS_FROM_LANDMARKS:face_rects_from_landmarks" 49 | output_stream: "DETECTIONS:face_detections" 50 | output_stream: "ROIS_FROM_DETECTIONS:face_rects_from_detections" 51 | } 52 | 53 | node { 54 | calculator: "PacketPresenceCalculator" 55 | input_stream: "PACKET:multi_face_landmarks" 56 | output_stream: "PRESENCE:multi_face_landmarks_presence" 57 | } 58 | 59 | node { 60 | calculator: "SplitNormalizedLandmarkListVectorCalculator" 61 | input_stream: "multi_face_landmarks" 62 | output_stream: "face_landmarks" 63 | node_options: { 64 | [type.googleapis.com/mediapipe.SplitVectorCalculatorOptions] { 65 | ranges: { begin: 0 end: 1 } 66 | element_only: true 67 | } 68 | } 69 | } 70 | 71 | node { 72 | calculator: "SplitNormalizedRectVectorCalculator" 73 | input_stream: "face_rects_from_landmarks" 74 | output_stream: "face_rect" 75 | node_options: { 76 | [type.googleapis.com/mediapipe.SplitVectorCalculatorOptions] { 77 | ranges: { begin: 0 end: 1 } 78 | element_only: true 79 | } 80 | } 81 | } 82 | 83 | node { 84 | calculator: "SplitNormalizedLandmarkListCalculator" 85 | input_stream: "face_landmarks" 86 | output_stream: "left_eye_boundary_landmarks" 87 | node_options: { 88 | [type.googleapis.com/mediapipe.SplitVectorCalculatorOptions] { 89 | ranges: { begin: 33 end: 34 } 90 | ranges: { begin: 133 end: 134 } 91 | combine_outputs: true 92 | } 93 | } 94 | } 95 | 96 | node { 97 | calculator: "SplitNormalizedLandmarkListCalculator" 98 | input_stream: "face_landmarks" 99 | output_stream: "right_eye_boundary_landmarks" 100 | node_options: { 101 | [type.googleapis.com/mediapipe.SplitVectorCalculatorOptions] { 102 | ranges: { begin: 362 end: 363 } 103 | ranges: { begin: 263 end: 264 } 104 | combine_outputs: true 105 | } 106 | } 107 | } 108 | 109 | node { 110 | calculator: "IrisLandmarkLeftAndRightCpu" 111 | input_stream: "IMAGE:input_video" 112 | input_stream: "LEFT_EYE_BOUNDARY_LANDMARKS:left_eye_boundary_landmarks" 113 | input_stream: "RIGHT_EYE_BOUNDARY_LANDMARKS:right_eye_boundary_landmarks" 114 | output_stream: "LEFT_EYE_CONTOUR_LANDMARKS:left_eye_contour_landmarks" 115 | output_stream: "LEFT_EYE_IRIS_LANDMARKS:left_iris_landmarks" 116 | output_stream: "LEFT_EYE_ROI:left_eye_rect_from_landmarks" 117 | output_stream: "RIGHT_EYE_CONTOUR_LANDMARKS:right_eye_contour_landmarks" 118 | output_stream: "RIGHT_EYE_IRIS_LANDMARKS:right_iris_landmarks" 119 | output_stream: "RIGHT_EYE_ROI:right_eye_rect_from_landmarks" 120 | } 121 | 122 | node { 123 | calculator: "ConcatenateNormalizedLandmarkListCalculator" 124 | input_stream: "left_eye_contour_landmarks" 125 | input_stream: "right_eye_contour_landmarks" 126 | output_stream: "refined_eye_landmarks" 127 | } 128 | 129 | node { 130 | calculator: "UpdateFaceLandmarksCalculator" 131 | input_stream: "NEW_EYE_LANDMARKS:refined_eye_landmarks" 132 | input_stream: "FACE_LANDMARKS:face_landmarks" 133 | output_stream: "UPDATED_FACE_LANDMARKS:updated_face_landmarks" 134 | } 135 | 136 | node { 137 | calculator: "IrisRendererCpu" 138 | input_stream: "IMAGE:input_video" 139 | input_stream: "FACE_LANDMARKS:updated_face_landmarks" 140 | input_stream: "EYE_LANDMARKS_LEFT:left_eye_contour_landmarks" 141 | input_stream: "EYE_LANDMARKS_RIGHT:right_eye_contour_landmarks" 142 | input_stream: "IRIS_LANDMARKS_LEFT:left_iris_landmarks" 143 | input_stream: "IRIS_LANDMARKS_RIGHT:right_iris_landmarks" 144 | input_stream: "NORM_RECT:face_rect" 145 | input_stream: "LEFT_EYE_RECT:left_eye_rect_from_landmarks" 146 | input_stream: "RIGHT_EYE_RECT:right_eye_rect_from_landmarks" 147 | input_stream: "DETECTIONS:face_detections" 148 | output_stream: "IRIS_LANDMARKS:iris_landmarks" 149 | output_stream: "IMAGE:output_video" 150 | } 151 | 152 | node { 153 | calculator: "ConcatenateNormalizedLandmarkListCalculator" 154 | input_stream: "updated_face_landmarks" 155 | input_stream: "iris_landmarks" 156 | output_stream: "face_landmarks_with_iris" 157 | } 158 | 159 | node { 160 | calculator: "PacketPresenceCalculator" 161 | input_stream: "PACKET:face_landmarks_with_iris" 162 | output_stream: "PRESENCE:face_landmarks_with_iris_presence" 163 | } 164 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/holistic_landmarks.pbtxt: -------------------------------------------------------------------------------- 1 | 2 | input_stream: "input_video" 3 | output_stream: "output_video" 4 | 5 | output_stream: "POSE_LANDMARKS:pose_landmarks" 6 | output_stream: "WORLD_LANDMARKS:pose_world_landmarks" 7 | output_stream: "LEFT_HAND_LANDMARKS:left_hand_landmarks" 8 | output_stream: "RIGHT_HAND_LANDMARKS:right_hand_landmarks" 9 | output_stream: "FACE_LANDMARKS:face_landmarks" 10 | 11 | node { 12 | calculator: "FlowLimiterCalculator" 13 | input_stream: "input_video" 14 | input_stream: "FINISHED:pose_landmarks" 15 | input_stream_info: { 16 | tag_index: "FINISHED" 17 | back_edge: true 18 | } 19 | output_stream: "throttled_input_video" 20 | node_options: { 21 | [type.googleapis.com/mediapipe.FlowLimiterCalculatorOptions] { 22 | max_in_flight: 1 23 | max_in_queue: 1 24 | # Timeout is disabled (set to 0) as first frame processing can take more 25 | # than 1 second. 26 | in_flight_timeout: 0 27 | } 28 | } 29 | } 30 | 31 | node { 32 | calculator: "ImagePropertiesCalculator" 33 | input_stream: "IMAGE:throttled_input_video" 34 | output_stream: "SIZE:image_size" 35 | } 36 | 37 | node { 38 | calculator: "HolisticLandmarkCpu" 39 | input_stream: "IMAGE:throttled_input_video" 40 | output_stream: "POSE_LANDMARKS:pose_landmarks" 41 | output_stream: "WORLD_LANDMARKS:pose_world_landmarks" 42 | output_stream: "POSE_ROI:pose_roi" 43 | output_stream: "POSE_DETECTION:pose_detection" 44 | output_stream: "FACE_LANDMARKS:face_landmarks" 45 | output_stream: "LEFT_HAND_LANDMARKS:left_hand_landmarks" 46 | output_stream: "RIGHT_HAND_LANDMARKS:right_hand_landmarks" 47 | } 48 | 49 | node { 50 | calculator: "PacketPresenceCalculator" 51 | input_stream: "PACKET:pose_landmarks" 52 | output_stream: "PRESENCE:pose_landmarks_presence" 53 | } 54 | 55 | node { 56 | calculator: "PacketPresenceCalculator" 57 | input_stream: "PACKET:face_landmarks" 58 | output_stream: "PRESENCE:face_landmarks_presence" 59 | } 60 | 61 | node { 62 | calculator: "PacketPresenceCalculator" 63 | input_stream: "PACKET:left_hand_landmarks" 64 | output_stream: "PRESENCE:left_hand_landmarks_presence" 65 | } 66 | 67 | node { 68 | calculator: "PacketPresenceCalculator" 69 | input_stream: "PACKET:right_hand_landmarks" 70 | output_stream: "PRESENCE:right_hand_landmarks_presence" 71 | } 72 | 73 | node { 74 | calculator: "HolisticTrackingToRenderData" 75 | input_stream: "IMAGE_SIZE:image_size" 76 | input_stream: "POSE_LANDMARKS:pose_landmarks" 77 | input_stream: "POSE_ROI:pose_roi" 78 | input_stream: "LEFT_HAND_LANDMARKS:left_hand_landmarks" 79 | input_stream: "RIGHT_HAND_LANDMARKS:right_hand_landmarks" 80 | input_stream: "FACE_LANDMARKS:face_landmarks" 81 | output_stream: "RENDER_DATA_VECTOR:render_data_vector" 82 | } 83 | 84 | node { 85 | calculator: "AnnotationOverlayCalculator" 86 | input_stream: "IMAGE:throttled_input_video" 87 | input_stream: "VECTOR:render_data_vector" 88 | output_stream: "IMAGE:output_video" 89 | } 90 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/multi_face_geometry.pbtxt: -------------------------------------------------------------------------------- 1 | 2 | output_stream: "multi_face_geometry" 3 | output_stream: "multi_face_geometry_presence" 4 | 5 | node { 6 | calculator: "FaceGeometryEnvGeneratorCalculator" 7 | output_side_packet: "ENVIRONMENT:environment" 8 | node_options: { 9 | [type.googleapis.com/mediapipe.FaceGeometryEnvGeneratorCalculatorOptions] { 10 | environment: { 11 | origin_point_location: TOP_LEFT_CORNER 12 | perspective_camera: { 13 | vertical_fov_degrees: 63.0 14 | near: 1.0 # 1cm 15 | far: 10000.0 # 100m 16 | } 17 | } 18 | } 19 | } 20 | } 21 | 22 | node { 23 | calculator: "FaceGeometryFromLandmarks" 24 | input_stream: "IMAGE_SIZE:input_image_size" 25 | input_side_packet: "ENVIRONMENT:environment" 26 | input_stream: "MULTI_FACE_LANDMARKS:multi_face_landmarks" 27 | output_stream: "MULTI_FACE_GEOMETRY:multi_face_geometry" 28 | } 29 | 30 | node { 31 | calculator: "PacketPresenceCalculator" 32 | input_stream: "PACKET:multi_face_geometry" 33 | output_stream: "PRESENCE:multi_face_geometry_presence" 34 | } 35 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/multi_face_landmarks.pbtxt: -------------------------------------------------------------------------------- 1 | 2 | input_stream: "input_video" 3 | output_stream: "output_video" 4 | 5 | output_stream: "multi_face_landmarks" 6 | output_stream: "multi_face_landmarks_presence" 7 | 8 | node { 9 | calculator: "FlowLimiterCalculator" 10 | input_stream: "input_video" 11 | input_stream: "FINISHED:multi_face_landmarks" 12 | input_stream_info: { 13 | tag_index: "FINISHED" 14 | back_edge: true 15 | } 16 | output_stream: "throttled_input_video" 17 | } 18 | 19 | node { 20 | calculator: "ImagePropertiesCalculator" 21 | input_stream: "IMAGE:throttled_input_video" 22 | output_stream: "SIZE:input_image_size" 23 | } 24 | 25 | node { 26 | calculator: "ConstantSidePacketCalculator" 27 | output_side_packet: "PACKET:num_faces" 28 | node_options: { 29 | [type.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions]: { 30 | packet { int_value: 1 } 31 | } 32 | } 33 | } 34 | 35 | node { 36 | calculator: "FaceLandmarkFrontCpu" 37 | input_stream: "IMAGE:throttled_input_video" 38 | input_side_packet: "NUM_FACES:num_faces" 39 | output_stream: "LANDMARKS:multi_face_landmarks" 40 | output_stream: "ROIS_FROM_LANDMARKS:face_rects_from_landmarks" 41 | output_stream: "DETECTIONS:face_detections" 42 | output_stream: "ROIS_FROM_DETECTIONS:face_rects_from_detections" 43 | } 44 | 45 | node { 46 | calculator: "PacketPresenceCalculator" 47 | input_stream: "PACKET:multi_face_landmarks" 48 | output_stream: "PRESENCE:multi_face_landmarks_presence" 49 | } 50 | 51 | node { 52 | calculator: "FaceRendererCpu" 53 | input_stream: "IMAGE:throttled_input_video" 54 | input_stream: "LANDMARKS:multi_face_landmarks" 55 | input_stream: "NORM_RECTS:face_rects_from_landmarks" 56 | input_stream: "DETECTIONS:face_detections" 57 | output_stream: "IMAGE:output_video" 58 | } 59 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/multi_hand_landmarks.pbtxt: -------------------------------------------------------------------------------- 1 | 2 | input_stream: "input_video" 3 | output_stream: "output_video" 4 | 5 | output_stream: "multi_hand_landmarks" 6 | output_stream: "multi_hand_landmarks_presence" 7 | output_stream: "multi_handedness" 8 | output_stream: "multi_handedness_presence" 9 | 10 | node { 11 | calculator: "FlowLimiterCalculator" 12 | input_stream: "input_video" 13 | input_stream: "FINISHED:multi_hand_landmarks" 14 | input_stream_info: { 15 | tag_index: "FINISHED" 16 | back_edge: true 17 | } 18 | output_stream: "throttled_input_video" 19 | } 20 | 21 | node { 22 | calculator: "ImagePropertiesCalculator" 23 | input_stream: "IMAGE:throttled_input_video" 24 | output_stream: "SIZE:input_image_size" 25 | } 26 | 27 | node { 28 | calculator: "ConstantSidePacketCalculator" 29 | output_side_packet: "PACKET:num_hands" 30 | node_options: { 31 | [type.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions]: { 32 | packet { int_value: 2 } 33 | } 34 | } 35 | } 36 | 37 | node { 38 | calculator: "HandLandmarkTrackingCpu" 39 | input_stream: "IMAGE:throttled_input_video" 40 | input_side_packet: "NUM_HANDS:num_hands" 41 | output_stream: "LANDMARKS:multi_hand_landmarks" 42 | output_stream: "HANDEDNESS:multi_handedness" 43 | output_stream: "PALM_DETECTIONS:multi_palm_detections" 44 | output_stream: "HAND_ROIS_FROM_LANDMARKS:multi_hand_rects" 45 | output_stream: "HAND_ROIS_FROM_PALM_DETECTIONS:multi_palm_rects" 46 | } 47 | 48 | node { 49 | calculator: "PacketPresenceCalculator" 50 | input_stream: "PACKET:multi_hand_landmarks" 51 | output_stream: "PRESENCE:multi_hand_landmarks_presence" 52 | } 53 | 54 | node { 55 | calculator: "PacketPresenceCalculator" 56 | input_stream: "PACKET:multi_handedness" 57 | output_stream: "PRESENCE:multi_handedness_presence" 58 | } 59 | 60 | node { 61 | calculator: "HandRendererSubgraph" 62 | input_stream: "IMAGE:throttled_input_video" 63 | input_stream: "DETECTIONS:multi_palm_detections" 64 | input_stream: "LANDMARKS:multi_hand_landmarks" 65 | input_stream: "HANDEDNESS:multi_handedness" 66 | input_stream: "NORM_RECTS:0:multi_palm_rects" 67 | input_stream: "NORM_RECTS:1:multi_hand_rects" 68 | output_stream: "IMAGE:output_video" 69 | } 70 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/objectron_landmarks.pbtxt: -------------------------------------------------------------------------------- 1 | input_stream: "input_video" 2 | output_stream: "output_video" 3 | 4 | output_stream: "objectron_landmarks" 5 | output_stream: "objectron_rects" 6 | 7 | ### CONFIG ### 8 | 9 | node { 10 | calculator: "ConstantSidePacketCalculator" 11 | output_side_packet: "PACKET:max_num_objects" 12 | node_options: { 13 | [type.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions]: { 14 | packet { int_value: 5 } 15 | } 16 | } 17 | } 18 | 19 | node { 20 | calculator: "ConstantSidePacketCalculator" 21 | output_side_packet: "PACKET:landmark_model_path" 22 | node_options: { 23 | [type.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions]: { 24 | packet { string_value: "mediapipe/modules/objectron/object_detection_3d_cup.tflite" } 25 | } 26 | } 27 | } 28 | 29 | node { 30 | calculator: "ConstantSidePacketCalculator" 31 | output_side_packet: "PACKET:allowed_labels" 32 | node_options: { 33 | [type.googleapis.com/mediapipe.ConstantSidePacketCalculatorOptions]: { 34 | packet { string_value: "Mug" } 35 | } 36 | } 37 | } 38 | 39 | #### 40 | 41 | node { 42 | calculator: "FlowLimiterCalculator" 43 | input_stream: "input_video" 44 | input_stream: "FINISHED:objectron_landmarks" 45 | input_stream_info: { 46 | tag_index: "FINISHED" 47 | back_edge: true 48 | } 49 | output_stream: "throttled_input_video" 50 | } 51 | 52 | node { 53 | calculator: "ImagePropertiesCalculator" 54 | input_stream: "IMAGE:throttled_input_video" 55 | output_stream: "SIZE:input_image_size" 56 | } 57 | 58 | node { 59 | calculator: "ObjectronCpuSubgraph" 60 | input_stream: "IMAGE:throttled_input_video" 61 | input_side_packet: "MODEL_PATH:landmark_model_path" 62 | input_side_packet: "LABELS_CSV:allowed_labels" 63 | input_side_packet: "MAX_NUM_OBJECTS:max_num_objects" 64 | output_stream: "MULTI_LANDMARKS:objectron_landmarks" 65 | output_stream: "NORM_RECTS:objectron_rects" 66 | } 67 | 68 | node { 69 | calculator: "PacketPresenceCalculator" 70 | input_stream: "PACKET:objectron_landmarks" 71 | output_stream: "PRESENCE:objectron_landmarks_presence" 72 | } 73 | 74 | node { 75 | calculator: "RendererSubgraph" 76 | input_stream: "IMAGE:throttled_input_video" 77 | input_stream: "MULTI_LANDMARKS:objectron_landmarks" 78 | input_stream: "NORM_RECTS:objectron_rects" 79 | output_stream: "IMAGE:output_video" 80 | } 81 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/mediapipe/Data/mediapipe/unreal/pose_landmarks.pbtxt: -------------------------------------------------------------------------------- 1 | 2 | input_stream: "input_video" 3 | output_stream: "output_video" 4 | 5 | output_stream: "pose_landmarks" 6 | output_stream: "pose_world_landmarks" 7 | 8 | node { 9 | calculator: "FlowLimiterCalculator" 10 | input_stream: "input_video" 11 | input_stream: "FINISHED:pose_landmarks" 12 | input_stream_info: { 13 | tag_index: "FINISHED" 14 | back_edge: true 15 | } 16 | output_stream: "throttled_input_video" 17 | } 18 | 19 | node { 20 | calculator: "ImagePropertiesCalculator" 21 | input_stream: "IMAGE:throttled_input_video" 22 | output_stream: "SIZE:input_image_size" 23 | } 24 | 25 | node { 26 | calculator: "PoseLandmarkCpu" 27 | input_stream: "IMAGE:throttled_input_video" 28 | output_stream: "LANDMARKS:pose_landmarks" 29 | output_stream: "DETECTION:pose_detections" 30 | output_stream: "ROI_FROM_LANDMARKS:pose_rects_from_landmarks" 31 | output_stream: "WORLD_LANDMARKS:pose_world_landmarks" 32 | } 33 | 34 | node { 35 | calculator: "PacketPresenceCalculator" 36 | input_stream: "PACKET:pose_landmarks" 37 | output_stream: "PRESENCE:pose_landmarks_presence" 38 | } 39 | 40 | node { 41 | calculator: "PacketPresenceCalculator" 42 | input_stream: "PACKET:pose_world_landmarks" 43 | output_stream: "PRESENCE:pose_world_landmarks_presence" 44 | } 45 | 46 | node { 47 | calculator: "PoseRendererCpu" 48 | input_stream: "IMAGE:throttled_input_video" 49 | input_stream: "LANDMARKS:pose_landmarks" 50 | input_stream: "ROI:pose_rects_from_landmarks" 51 | input_stream: "DETECTION:pose_detections" 52 | output_stream: "IMAGE:output_video" 53 | } 54 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Binaries/Win64/libprotobuf.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/protobuf/Binaries/Win64/libprotobuf.dll -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/cpp/cpp_generator.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // Generates C++ code for a given .proto file. 36 | 37 | #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ 38 | #define GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ 39 | 40 | #include 41 | #include 42 | 43 | #include 44 | 45 | namespace google { 46 | namespace protobuf { 47 | namespace compiler { 48 | namespace cpp { 49 | 50 | // CodeGenerator implementation which generates a C++ source file and 51 | // header. If you create your own protocol compiler binary and you want 52 | // it to support C++ output, you can do so by registering an instance of this 53 | // CodeGenerator with the CommandLineInterface in your main() function. 54 | class PROTOC_EXPORT CppGenerator : public CodeGenerator { 55 | public: 56 | CppGenerator(); 57 | ~CppGenerator(); 58 | 59 | enum class Runtime { 60 | kGoogle3, // Use the internal google3 runtime. 61 | kOpensource, // Use the open-source runtime. 62 | 63 | // Use the open-source runtime with google3 #include paths. We make these 64 | // absolute to avoid ambiguity, so the runtime will be #included like: 65 | // #include "third_party/protobuf/.../google/protobuf/message.h" 66 | kOpensourceGoogle3 67 | }; 68 | 69 | void set_opensource_runtime(bool opensource) { 70 | opensource_runtime_ = opensource; 71 | } 72 | 73 | // If set to a non-empty string, generated code will do: 74 | // #include "/google/protobuf/message.h" 75 | // instead of: 76 | // #include 77 | // This has no effect if opensource_runtime = false. 78 | void set_runtime_include_base(const std::string& base) { 79 | runtime_include_base_ = base; 80 | } 81 | 82 | // implements CodeGenerator ---------------------------------------- 83 | bool Generate(const FileDescriptor* file, const std::string& parameter, 84 | GeneratorContext* generator_context, std::string* error) const; 85 | 86 | private: 87 | bool opensource_runtime_ = true; 88 | std::string runtime_include_base_; 89 | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CppGenerator); 90 | }; 91 | 92 | } // namespace cpp 93 | } // namespace compiler 94 | } // namespace protobuf 95 | } // namespace google 96 | 97 | #include 98 | 99 | #endif // GOOGLE_PROTOBUF_COMPILER_CPP_GENERATOR_H__ 100 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/csharp/csharp_generator.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Generates C# code for a given .proto file. 32 | 33 | #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__ 34 | #define GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__ 35 | 36 | #include 37 | 38 | #include 39 | 40 | #include 41 | 42 | namespace google { 43 | namespace protobuf { 44 | namespace compiler { 45 | namespace csharp { 46 | 47 | // CodeGenerator implementation which generates a C# source file and 48 | // header. If you create your own protocol compiler binary and you want 49 | // it to support C# output, you can do so by registering an instance of this 50 | // CodeGenerator with the CommandLineInterface in your main() function. 51 | class PROTOC_EXPORT Generator : public CodeGenerator { 52 | public: 53 | virtual bool Generate( 54 | const FileDescriptor* file, 55 | const string& parameter, 56 | GeneratorContext* generator_context, 57 | string* error) const; 58 | }; 59 | 60 | } // namespace csharp 61 | } // namespace compiler 62 | } // namespace protobuf 63 | } // namespace google 64 | 65 | #include 66 | 67 | #endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_GENERATOR_H__ 68 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/csharp/csharp_names.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // Provides a mechanism for mapping a descriptor to the 36 | // fully-qualified name of the corresponding C# class. 37 | 38 | #ifndef GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__ 39 | #define GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__ 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | #include 46 | 47 | namespace google { 48 | namespace protobuf { 49 | 50 | class Descriptor; 51 | class EnumDescriptor; 52 | class FileDescriptor; 53 | class ServiceDescriptor; 54 | 55 | namespace compiler { 56 | namespace csharp { 57 | 58 | // Requires: 59 | // descriptor != NULL 60 | // 61 | // Returns: 62 | // The namespace to use for given file descriptor. 63 | string PROTOC_EXPORT GetFileNamespace(const FileDescriptor* descriptor); 64 | 65 | // Requires: 66 | // descriptor != NULL 67 | // 68 | // Returns: 69 | // The fully-qualified C# class name. 70 | string PROTOC_EXPORT GetClassName(const Descriptor* descriptor); 71 | 72 | // Requires: 73 | // descriptor != NULL 74 | // 75 | // Returns: 76 | // The fully-qualified name of the C# class that provides 77 | // access to the file descriptor. Proto compiler generates 78 | // such class for each .proto file processed. 79 | string PROTOC_EXPORT GetReflectionClassName(const FileDescriptor* descriptor); 80 | 81 | // Generates output file name for given file descriptor. If generate_directories 82 | // is true, the output file will be put under directory corresponding to file's 83 | // namespace. base_namespace can be used to strip some of the top level 84 | // directories. E.g. for file with namespace "Bar.Foo" and base_namespace="Bar", 85 | // the resulting file will be put under directory "Foo" (and not "Bar/Foo"). 86 | // 87 | // Requires: 88 | // descriptor != NULL 89 | // error != NULL 90 | // 91 | // Returns: 92 | // The file name to use as output file for given file descriptor. In case 93 | // of failure, this function will return empty string and error parameter 94 | // will contain the error message. 95 | string PROTOC_EXPORT GetOutputFile(const FileDescriptor* descriptor, 96 | const string file_extension, 97 | const bool generate_directories, 98 | const string base_namespace, string* error); 99 | 100 | } // namespace csharp 101 | } // namespace compiler 102 | } // namespace protobuf 103 | } // namespace google 104 | 105 | #include 106 | 107 | #endif // GOOGLE_PROTOBUF_COMPILER_CSHARP_NAMES_H__ 108 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/java/java_generator.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // Generates Java code for a given .proto file. 36 | 37 | #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__ 38 | #define GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__ 39 | 40 | #include 41 | #include 42 | 43 | #include 44 | 45 | namespace google { 46 | namespace protobuf { 47 | namespace compiler { 48 | namespace java { 49 | 50 | // CodeGenerator implementation which generates Java code. If you create your 51 | // own protocol compiler binary and you want it to support Java output, you 52 | // can do so by registering an instance of this CodeGenerator with the 53 | // CommandLineInterface in your main() function. 54 | class PROTOC_EXPORT JavaGenerator : public CodeGenerator { 55 | public: 56 | JavaGenerator(); 57 | ~JavaGenerator(); 58 | 59 | // implements CodeGenerator ---------------------------------------- 60 | bool Generate(const FileDescriptor* file, const std::string& parameter, 61 | GeneratorContext* context, std::string* error) const; 62 | 63 | private: 64 | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(JavaGenerator); 65 | }; 66 | 67 | } // namespace java 68 | } // namespace compiler 69 | } // namespace protobuf 70 | } // namespace google 71 | 72 | #include 73 | 74 | #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_GENERATOR_H__ 75 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/java/java_names.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // Provides a mechanism for mapping a descriptor to the 36 | // fully-qualified name of the corresponding Java class. 37 | 38 | #ifndef GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__ 39 | #define GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__ 40 | 41 | #include 42 | 43 | namespace google { 44 | namespace protobuf { 45 | 46 | class Descriptor; 47 | class EnumDescriptor; 48 | class FileDescriptor; 49 | class FieldDescriptor; 50 | class ServiceDescriptor; 51 | 52 | namespace compiler { 53 | namespace java { 54 | 55 | // Requires: 56 | // descriptor != NULL 57 | // 58 | // Returns: 59 | // The fully-qualified Java class name. 60 | std::string ClassName(const Descriptor* descriptor); 61 | 62 | // Requires: 63 | // descriptor != NULL 64 | // 65 | // Returns: 66 | // The fully-qualified Java class name. 67 | std::string ClassName(const EnumDescriptor* descriptor); 68 | 69 | // Requires: 70 | // descriptor != NULL 71 | // 72 | // Returns: 73 | // The fully-qualified Java class name. 74 | std::string ClassName(const FileDescriptor* descriptor); 75 | 76 | // Requires: 77 | // descriptor != NULL 78 | // 79 | // Returns: 80 | // The fully-qualified Java class name. 81 | std::string ClassName(const ServiceDescriptor* descriptor); 82 | 83 | // Requires: 84 | // descriptor != NULL 85 | // 86 | // Returns: 87 | // Java package name. 88 | std::string FileJavaPackage(const FileDescriptor* descriptor); 89 | 90 | // Requires: 91 | // descriptor != NULL 92 | // Returns: 93 | // Captialized camel case name field name. 94 | std::string CapitalizedFieldName(const FieldDescriptor* descriptor); 95 | 96 | // Requires: 97 | // descriptor != NULL 98 | // Returns: 99 | // Primitive Java type name for the field. 100 | const char* PrimitiveTypeName(const FieldDescriptor* descriptor); 101 | 102 | // Requires: 103 | // descriptor != NULL 104 | // Returns: 105 | // Boes primitive Java type name for the field. 106 | const char* BoxedPrimitiveTypeName(const FieldDescriptor* descriptor); 107 | 108 | } // namespace java 109 | } // namespace compiler 110 | } // namespace protobuf 111 | } // namespace google 112 | #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__ 113 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/js/well_known_types_embed.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__ 32 | #define GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__ 33 | 34 | #include 35 | 36 | struct FileToc { 37 | const char* name; 38 | const char* data; 39 | }; 40 | 41 | extern struct FileToc well_known_types_js[]; 42 | 43 | #endif // GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__ 44 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/objectivec/objectivec_generator.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Generates ObjectiveC code for a given .proto file. 32 | 33 | #ifndef GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__ 34 | #define GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__ 35 | 36 | #include 37 | #include 38 | #include 39 | 40 | #include 41 | 42 | namespace google { 43 | namespace protobuf { 44 | namespace compiler { 45 | namespace objectivec { 46 | 47 | // CodeGenerator implementation which generates a ObjectiveC source file and 48 | // header. If you create your own protocol compiler binary and you want it to 49 | // support ObjectiveC output, you can do so by registering an instance of this 50 | // CodeGenerator with the CommandLineInterface in your main() function. 51 | class PROTOC_EXPORT ObjectiveCGenerator : public CodeGenerator { 52 | public: 53 | ObjectiveCGenerator(); 54 | ~ObjectiveCGenerator(); 55 | 56 | ObjectiveCGenerator(const ObjectiveCGenerator&) = delete; 57 | ObjectiveCGenerator& operator=(const ObjectiveCGenerator&) = delete; 58 | 59 | // implements CodeGenerator ---------------------------------------- 60 | bool HasGenerateAll() const; 61 | bool Generate(const FileDescriptor* file, 62 | const string& parameter, 63 | GeneratorContext* context, 64 | string* error) const; 65 | bool GenerateAll(const std::vector& files, 66 | const string& parameter, 67 | GeneratorContext* context, 68 | string* error) const; 69 | }; 70 | 71 | } // namespace objectivec 72 | } // namespace compiler 73 | } // namespace protobuf 74 | } // namespace google 75 | 76 | #include 77 | 78 | #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_GENERATOR_H__ 79 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/php/php_generator.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_COMPILER_PHP_GENERATOR_H__ 32 | #define GOOGLE_PROTOBUF_COMPILER_PHP_GENERATOR_H__ 33 | 34 | #include 35 | #include 36 | 37 | #include 38 | 39 | #include 40 | 41 | namespace google { 42 | namespace protobuf { 43 | namespace compiler { 44 | namespace php { 45 | 46 | class PROTOC_EXPORT Generator : public CodeGenerator { 47 | public: 48 | virtual bool Generate( 49 | const FileDescriptor* file, 50 | const string& parameter, 51 | GeneratorContext* generator_context, 52 | string* error) const override; 53 | 54 | bool GenerateAll(const std::vector& files, 55 | const std::string& parameter, 56 | GeneratorContext* generator_context, 57 | std::string* error) const override; 58 | private: 59 | bool Generate( 60 | const FileDescriptor* file, 61 | bool is_descriptor, 62 | bool aggregate_metadata, 63 | const std::set& aggregate_metadata_prefixes, 64 | GeneratorContext* generator_context, 65 | string* error) const; 66 | }; 67 | 68 | // To skip reserved keywords in php, some generated classname are prefixed. 69 | // Other code generators may need following API to figure out the actual 70 | // classname. 71 | PROTOC_EXPORT std::string GeneratedClassName(const Descriptor* desc); 72 | PROTOC_EXPORT std::string GeneratedClassName(const EnumDescriptor* desc); 73 | PROTOC_EXPORT std::string GeneratedClassName(const ServiceDescriptor* desc); 74 | 75 | inline bool IsWrapperType(const FieldDescriptor* descriptor) { 76 | return descriptor->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE && 77 | descriptor->message_type()->file()->name() == "google/protobuf/wrappers.proto"; 78 | } 79 | 80 | } // namespace php 81 | } // namespace compiler 82 | } // namespace protobuf 83 | } // namespace google 84 | 85 | #include 86 | 87 | #endif // GOOGLE_PROTOBUF_COMPILER_PHP_GENERATOR_H__ 88 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/plugin.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // 33 | // Front-end for protoc code generator plugins written in C++. 34 | // 35 | // To implement a protoc plugin in C++, simply write an implementation of 36 | // CodeGenerator, then create a main() function like: 37 | // int main(int argc, char* argv[]) { 38 | // MyCodeGenerator generator; 39 | // return google::protobuf::compiler::PluginMain(argc, argv, &generator); 40 | // } 41 | // You must link your plugin against libprotobuf and libprotoc. 42 | // 43 | // The core part of PluginMain is to invoke the given CodeGenerator on a 44 | // CodeGeneratorRequest to generate a CodeGeneratorResponse. This part is 45 | // abstracted out and made into function GenerateCode so that it can be reused, 46 | // for example, to implement a variant of PluginMain that does some 47 | // preprocessing on the input CodeGeneratorRequest before feeding the request 48 | // to the given code generator. 49 | // 50 | // To get protoc to use the plugin, do one of the following: 51 | // * Place the plugin binary somewhere in the PATH and give it the name 52 | // "protoc-gen-NAME" (replacing "NAME" with the name of your plugin). If you 53 | // then invoke protoc with the parameter --NAME_out=OUT_DIR (again, replace 54 | // "NAME" with your plugin's name), protoc will invoke your plugin to generate 55 | // the output, which will be placed in OUT_DIR. 56 | // * Place the plugin binary anywhere, with any name, and pass the --plugin 57 | // parameter to protoc to direct it to your plugin like so: 58 | // protoc --plugin=protoc-gen-NAME=path/to/mybinary --NAME_out=OUT_DIR 59 | // On Windows, make sure to include the .exe suffix: 60 | // protoc --plugin=protoc-gen-NAME=path/to/mybinary.exe --NAME_out=OUT_DIR 61 | 62 | #ifndef GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__ 63 | #define GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__ 64 | 65 | #include 66 | 67 | #include 68 | 69 | namespace google { 70 | namespace protobuf { 71 | namespace compiler { 72 | 73 | class CodeGenerator; // code_generator.h 74 | class CodeGeneratorRequest; 75 | class CodeGeneratorResponse; 76 | 77 | // Implements main() for a protoc plugin exposing the given code generator. 78 | PROTOC_EXPORT int PluginMain(int argc, char* argv[], 79 | const CodeGenerator* generator); 80 | 81 | // Generates code using the given code generator. Returns true if the code 82 | // generation is successful. If the code geneartion fails, error_msg may be 83 | // populated to describe the failure cause. 84 | bool GenerateCode(const CodeGeneratorRequest& request, 85 | const CodeGenerator& generator, 86 | CodeGeneratorResponse* response, std::string* error_msg); 87 | 88 | } // namespace compiler 89 | } // namespace protobuf 90 | } // namespace google 91 | 92 | #include 93 | 94 | #endif // GOOGLE_PROTOBUF_COMPILER_PLUGIN_H__ 95 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/compiler/ruby/ruby_generator.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Generates Ruby code for a given .proto file. 32 | 33 | #ifndef GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__ 34 | #define GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__ 35 | 36 | #include 37 | 38 | #include 39 | 40 | #include 41 | 42 | namespace google { 43 | namespace protobuf { 44 | namespace compiler { 45 | namespace ruby { 46 | 47 | // CodeGenerator implementation for generated Ruby protocol buffer classes. 48 | // If you create your own protocol compiler binary and you want it to support 49 | // Ruby output, you can do so by registering an instance of this 50 | // CodeGenerator with the CommandLineInterface in your main() function. 51 | class PROTOC_EXPORT Generator : public CodeGenerator { 52 | virtual bool Generate( 53 | const FileDescriptor* file, 54 | const string& parameter, 55 | GeneratorContext* generator_context, 56 | string* error) const; 57 | }; 58 | 59 | } // namespace ruby 60 | } // namespace compiler 61 | } // namespace protobuf 62 | } // namespace google 63 | 64 | #include 65 | 66 | #endif // GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__ 67 | 68 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/duration.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/duration"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "DurationProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // A Duration represents a signed, fixed-length span of time represented 44 | // as a count of seconds and fractions of seconds at nanosecond 45 | // resolution. It is independent of any calendar and concepts like "day" 46 | // or "month". It is related to Timestamp in that the difference between 47 | // two Timestamp values is a Duration and it can be added or subtracted 48 | // from a Timestamp. Range is approximately +-10,000 years. 49 | // 50 | // # Examples 51 | // 52 | // Example 1: Compute Duration from two Timestamps in pseudo code. 53 | // 54 | // Timestamp start = ...; 55 | // Timestamp end = ...; 56 | // Duration duration = ...; 57 | // 58 | // duration.seconds = end.seconds - start.seconds; 59 | // duration.nanos = end.nanos - start.nanos; 60 | // 61 | // if (duration.seconds < 0 && duration.nanos > 0) { 62 | // duration.seconds += 1; 63 | // duration.nanos -= 1000000000; 64 | // } else if (duration.seconds > 0 && duration.nanos < 0) { 65 | // duration.seconds -= 1; 66 | // duration.nanos += 1000000000; 67 | // } 68 | // 69 | // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 70 | // 71 | // Timestamp start = ...; 72 | // Duration duration = ...; 73 | // Timestamp end = ...; 74 | // 75 | // end.seconds = start.seconds + duration.seconds; 76 | // end.nanos = start.nanos + duration.nanos; 77 | // 78 | // if (end.nanos < 0) { 79 | // end.seconds -= 1; 80 | // end.nanos += 1000000000; 81 | // } else if (end.nanos >= 1000000000) { 82 | // end.seconds += 1; 83 | // end.nanos -= 1000000000; 84 | // } 85 | // 86 | // Example 3: Compute Duration from datetime.timedelta in Python. 87 | // 88 | // td = datetime.timedelta(days=3, minutes=10) 89 | // duration = Duration() 90 | // duration.FromTimedelta(td) 91 | // 92 | // # JSON Mapping 93 | // 94 | // In JSON format, the Duration type is encoded as a string rather than an 95 | // object, where the string ends in the suffix "s" (indicating seconds) and 96 | // is preceded by the number of seconds, with nanoseconds expressed as 97 | // fractional seconds. For example, 3 seconds with 0 nanoseconds should be 98 | // encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should 99 | // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 100 | // microsecond should be expressed in JSON format as "3.000001s". 101 | // 102 | // 103 | message Duration { 104 | // Signed seconds of the span of time. Must be from -315,576,000,000 105 | // to +315,576,000,000 inclusive. Note: these bounds are computed from: 106 | // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 107 | int64 seconds = 1; 108 | 109 | // Signed fractions of a second at nanosecond resolution of the span 110 | // of time. Durations less than one second are represented with a 0 111 | // `seconds` field and a positive or negative `nanos` field. For durations 112 | // of one second or more, a non-zero value for the `nanos` field must be 113 | // of the same sign as the `seconds` field. Must be from -999,999,999 114 | // to +999,999,999 inclusive. 115 | int32 nanos = 2; 116 | } 117 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "github.com/golang/protobuf/ptypes/empty"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "EmptyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | option cc_enable_arenas = true; 42 | 43 | // A generic empty message that you can re-use to avoid defining duplicated 44 | // empty messages in your APIs. A typical example is to use it as the request 45 | // or the response type of an API method. For instance: 46 | // 47 | // service Foo { 48 | // rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 49 | // } 50 | // 51 | // The JSON representation for `Empty` is empty JSON object `{}`. 52 | message Empty {} 53 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/generated_enum_reflection.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: jasonh@google.com (Jason Hsueh) 32 | // 33 | // This header is logically internal, but is made public because it is used 34 | // from protocol-compiler-generated code, which may reside in other components. 35 | // It provides reflection support for generated enums, and is included in 36 | // generated .pb.h files and should have minimal dependencies. The methods are 37 | // implemented in generated_message_reflection.cc. 38 | 39 | #ifndef GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ 40 | #define GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ 41 | 42 | #include 43 | 44 | #include 45 | #include 46 | 47 | #ifdef SWIG 48 | #error "You cannot SWIG proto headers" 49 | #endif 50 | 51 | #include 52 | 53 | namespace google { 54 | namespace protobuf { 55 | class EnumDescriptor; 56 | } // namespace protobuf 57 | } // namespace google 58 | 59 | namespace google { 60 | namespace protobuf { 61 | 62 | // Returns the EnumDescriptor for enum type E, which must be a 63 | // proto-declared enum type. Code generated by the protocol compiler 64 | // will include specializations of this template for each enum type declared. 65 | template 66 | const EnumDescriptor* GetEnumDescriptor(); 67 | 68 | namespace internal { 69 | 70 | // Helper for EnumType_Parse functions: try to parse the string 'name' as 71 | // an enum name of the given type, returning true and filling in value on 72 | // success, or returning false and leaving value unchanged on failure. 73 | PROTOBUF_EXPORT bool ParseNamedEnum(const EnumDescriptor* descriptor, 74 | const std::string& name, int* value); 75 | 76 | template 77 | bool ParseNamedEnum(const EnumDescriptor* descriptor, const std::string& name, 78 | EnumType* value) { 79 | int tmp; 80 | if (!ParseNamedEnum(descriptor, name, &tmp)) return false; 81 | *value = static_cast(tmp); 82 | return true; 83 | } 84 | 85 | // Just a wrapper around printing the name of a value. The main point of this 86 | // function is not to be inlined, so that you can do this without including 87 | // descriptor.h. 88 | PROTOBUF_EXPORT const std::string& NameOfEnum(const EnumDescriptor* descriptor, 89 | int value); 90 | 91 | } // namespace internal 92 | } // namespace protobuf 93 | } // namespace google 94 | 95 | #include 96 | 97 | #endif // GOOGLE_PROTOBUF_GENERATED_ENUM_REFLECTION_H__ 98 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/generated_enum_util.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__ 32 | #define GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__ 33 | 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | #include 40 | 41 | #ifdef SWIG 42 | #error "You cannot SWIG proto headers" 43 | #endif 44 | 45 | namespace google { 46 | namespace protobuf { 47 | 48 | // This type trait can be used to cause templates to only match proto2 enum 49 | // types. 50 | template 51 | struct is_proto_enum : ::std::false_type {}; 52 | 53 | namespace internal { 54 | 55 | // The table entry format for storing enum name-to-value mapping used with lite 56 | // protos. This struct and the following related functions should only be used 57 | // by protobuf generated code. 58 | struct EnumEntry { 59 | StringPiece name; 60 | int value; 61 | }; 62 | 63 | // Looks up a numeric enum value given the string name. 64 | PROTOBUF_EXPORT bool LookUpEnumValue(const EnumEntry* enums, size_t size, 65 | StringPiece name, int* value); 66 | 67 | // Looks up an enum name given the numeric value. 68 | PROTOBUF_EXPORT int LookUpEnumName(const EnumEntry* enums, 69 | const int* sorted_indices, size_t size, 70 | int value); 71 | 72 | // Initializes the list of enum names in std::string form. 73 | PROTOBUF_EXPORT bool InitializeEnumStrings( 74 | const EnumEntry* enums, const int* sorted_indices, size_t size, 75 | internal::ExplicitlyConstructed* enum_strings); 76 | 77 | } // namespace internal 78 | } // namespace protobuf 79 | } // namespace google 80 | 81 | #include 82 | 83 | #endif // GOOGLE_PROTOBUF_GENERATED_ENUM_UTIL_H__ 84 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/has_bits.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_HAS_BITS_H__ 32 | #define GOOGLE_PROTOBUF_HAS_BITS_H__ 33 | 34 | #include 35 | #include 36 | 37 | #include 38 | 39 | #ifdef SWIG 40 | #error "You cannot SWIG proto headers" 41 | #endif 42 | 43 | namespace google { 44 | namespace protobuf { 45 | namespace internal { 46 | 47 | template 48 | class HasBits { 49 | public: 50 | HasBits() PROTOBUF_ALWAYS_INLINE { Clear(); } 51 | 52 | void Clear() PROTOBUF_ALWAYS_INLINE { 53 | memset(has_bits_, 0, sizeof(has_bits_)); 54 | } 55 | 56 | uint32& operator[](int index) PROTOBUF_ALWAYS_INLINE { 57 | return has_bits_[index]; 58 | } 59 | 60 | const uint32& operator[](int index) const PROTOBUF_ALWAYS_INLINE { 61 | return has_bits_[index]; 62 | } 63 | 64 | bool operator==(const HasBits& rhs) const { 65 | return memcmp(has_bits_, rhs.has_bits_, sizeof(has_bits_)) == 0; 66 | } 67 | 68 | bool operator!=(const HasBits& rhs) const { 69 | return !(*this == rhs); 70 | } 71 | 72 | void Or(const HasBits& rhs) { 73 | for (size_t i = 0; i < doublewords; i++) has_bits_[i] |= rhs[i]; 74 | } 75 | 76 | bool empty() const; 77 | 78 | private: 79 | uint32 has_bits_[doublewords]; 80 | }; 81 | 82 | template <> 83 | inline bool HasBits<1>::empty() const { 84 | return !has_bits_[0]; 85 | } 86 | 87 | template <> 88 | inline bool HasBits<2>::empty() const { 89 | return !(has_bits_[0] | has_bits_[1]); 90 | } 91 | 92 | template <> 93 | inline bool HasBits<3>::empty() const { 94 | return !(has_bits_[0] | has_bits_[1] | has_bits_[2]); 95 | } 96 | 97 | template <> 98 | inline bool HasBits<4>::empty() const { 99 | return !(has_bits_[0] | has_bits_[1] | has_bits_[2] | has_bits_[3]); 100 | } 101 | 102 | template 103 | inline bool HasBits::empty() const { 104 | for (size_t i = 0; i < doublewords; ++i) { 105 | if (has_bits_[i]) return false; 106 | } 107 | return true; 108 | } 109 | 110 | } // namespace internal 111 | } // namespace protobuf 112 | } // namespace google 113 | 114 | #include 115 | 116 | #endif // GOOGLE_PROTOBUF_HAS_BITS_H__ 117 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/io/strtod.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // A locale-independent version of strtod(), used to parse floating 32 | // point default values in .proto files, where the decimal separator 33 | // is always a dot. 34 | 35 | #ifndef GOOGLE_PROTOBUF_IO_STRTOD_H__ 36 | #define GOOGLE_PROTOBUF_IO_STRTOD_H__ 37 | 38 | namespace google { 39 | namespace protobuf { 40 | namespace io { 41 | 42 | // A locale-independent version of the standard strtod(), which always 43 | // uses a dot as the decimal separator. 44 | double NoLocaleStrtod(const char* str, char** endptr); 45 | 46 | // Casts a double value to a float value. If the value is outside of the 47 | // representable range of float, it will be converted to positive or negative 48 | // infinity. 49 | float SafeDoubleToFloat(double value); 50 | 51 | } // namespace io 52 | } // namespace protobuf 53 | } // namespace google 54 | 55 | #endif // GOOGLE_PROTOBUF_IO_STRTOD_H__ 56 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/metadata.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // This header file defines an internal class that encapsulates internal message 32 | // metadata (Unknown-field set, Arena pointer, ...) and allows its 33 | // representation to be made more space-efficient via various optimizations. 34 | // 35 | // Note that this is distinct from google::protobuf::Metadata, which encapsulates 36 | // Descriptor and Reflection pointers. 37 | 38 | #ifndef GOOGLE_PROTOBUF_METADATA_H__ 39 | #define GOOGLE_PROTOBUF_METADATA_H__ 40 | 41 | #include 42 | #include 43 | 44 | #ifdef SWIG 45 | #error "You cannot SWIG proto headers" 46 | #endif 47 | 48 | namespace google { 49 | namespace protobuf { 50 | namespace internal { 51 | 52 | class InternalMetadataWithArena 53 | : public InternalMetadataWithArenaBase { 55 | public: 56 | InternalMetadataWithArena() {} 57 | explicit InternalMetadataWithArena(Arena* arena) 58 | : InternalMetadataWithArenaBase(arena) {} 60 | 61 | void DoSwap(UnknownFieldSet* other) { mutable_unknown_fields()->Swap(other); } 62 | 63 | void DoMergeFrom(const UnknownFieldSet& other) { 64 | mutable_unknown_fields()->MergeFrom(other); 65 | } 66 | 67 | void DoClear() { mutable_unknown_fields()->Clear(); } 68 | 69 | static const UnknownFieldSet& default_instance() { 70 | return *UnknownFieldSet::default_instance(); 71 | } 72 | }; 73 | 74 | } // namespace internal 75 | } // namespace protobuf 76 | } // namespace google 77 | 78 | #endif // GOOGLE_PROTOBUF_METADATA_H__ 79 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/port.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // A common header that is included across all protobuf headers. We do our best 32 | // to avoid #defining any macros here; instead we generally put macros in 33 | // port_def.inc and port_undef.inc so they are not visible from outside of 34 | // protobuf. 35 | 36 | #ifndef GOOGLE_PROTOBUF_PORT_H__ 37 | #define GOOGLE_PROTOBUF_PORT_H__ 38 | 39 | 40 | #include 41 | 42 | 43 | #endif // GOOGLE_PROTOBUF_PORT_H__ 44 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/port_undef.inc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // #undefs all macros defined in port_def.inc. See comments in port_def.inc 32 | // for more info. 33 | 34 | #ifndef PROTOBUF_NAMESPACE 35 | #error "port_undef.inc must be included after port_def.inc" 36 | #endif 37 | #undef PROTOBUF_NAMESPACE 38 | #undef PROTOBUF_NAMESPACE_ID 39 | #undef PROTOBUF_ALWAYS_INLINE 40 | #undef PROTOBUF_COLD 41 | #undef PROTOBUF_NOINLINE 42 | #undef PROTOBUF_SECTION_VARIABLE 43 | #undef PROTOBUF_DEPRECATED 44 | #undef PROTOBUF_DEPRECATED_ENUM 45 | #undef PROTOBUF_DEPRECATED_MSG 46 | #undef PROTOBUF_FUNC_ALIGN 47 | #undef PROTOBUF_RETURNS_NONNULL 48 | #undef PROTOBUF_ATTRIBUTE_REINITIALIZES 49 | #undef PROTOBUF_RTTI 50 | #undef PROTOBUF_VERSION 51 | #undef PROTOBUF_VERSION_SUFFIX 52 | #undef PROTOBUF_FIELD_OFFSET 53 | #undef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 54 | #undef PROTOBUF_MIN_PROTOC_VERSION 55 | #undef PROTOBUF_PREDICT_TRUE 56 | #undef PROTOBUF_PREDICT_FALSE 57 | #undef PROTOBUF_LONGLONG 58 | #undef PROTOBUF_ULONGLONG 59 | #undef PROTOBUF_LL_FORMAT 60 | #undef PROTOBUF_GUARDED_BY 61 | #undef PROTOBUF_FALLTHROUGH_INTENDED 62 | #undef PROTOBUF_EXPORT 63 | #undef PROTOC_EXPORT 64 | #undef PROTOBUF_MUST_USE_RESULT 65 | #undef PROTOBUF_NAMESPACE_OPEN 66 | #undef PROTOBUF_NAMESPACE_CLOSE 67 | #undef PROTOBUF_UNUSED 68 | #undef PROTOBUF_ASSUME 69 | #undef PROTOBUF_EXPORT_TEMPLATE_DECLARE 70 | #undef PROTOBUF_EXPORT_TEMPLATE_DEFINE 71 | 72 | // Restore macro that may have been #undef'd in port_def.inc. 73 | #ifdef _MSC_VER 74 | #pragma pop_macro("GetMessage") 75 | #pragma pop_macro("IGNORE") 76 | #pragma pop_macro("IN") 77 | #pragma pop_macro("OUT") 78 | #pragma pop_macro("OPTIONAL") 79 | #pragma pop_macro("min") 80 | #pragma pop_macro("max") 81 | #endif 82 | 83 | #if defined(__clang__) 84 | #pragma clang diagnostic pop 85 | #endif 86 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/reflection_ops.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // This header is logically internal, but is made public because it is used 36 | // from protocol-compiler-generated code, which may reside in other components. 37 | 38 | #ifndef GOOGLE_PROTOBUF_REFLECTION_OPS_H__ 39 | #define GOOGLE_PROTOBUF_REFLECTION_OPS_H__ 40 | 41 | #include 42 | #include 43 | 44 | #ifdef SWIG 45 | #error "You cannot SWIG proto headers" 46 | #endif 47 | 48 | #include 49 | 50 | namespace google { 51 | namespace protobuf { 52 | namespace internal { 53 | 54 | // Basic operations that can be performed using reflection. 55 | // These can be used as a cheap way to implement the corresponding 56 | // methods of the Message interface, though they are likely to be 57 | // slower than implementations tailored for the specific message type. 58 | // 59 | // This class should stay limited to operations needed to implement 60 | // the Message interface. 61 | // 62 | // This class is really a namespace that contains only static methods. 63 | class PROTOBUF_EXPORT ReflectionOps { 64 | public: 65 | static void Copy(const Message& from, Message* to); 66 | static void Merge(const Message& from, Message* to); 67 | static void Clear(Message* message); 68 | static bool IsInitialized(const Message& message); 69 | static void DiscardUnknownFields(Message* message); 70 | 71 | // Finds all unset required fields in the message and adds their full 72 | // paths (e.g. "foo.bar[5].baz") to *names. "prefix" will be attached to 73 | // the front of each name. 74 | static void FindInitializationErrors(const Message& message, 75 | const std::string& prefix, 76 | std::vector* errors); 77 | 78 | private: 79 | // All methods are static. No need to construct. 80 | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ReflectionOps); 81 | }; 82 | 83 | } // namespace internal 84 | } // namespace protobuf 85 | } // namespace google 86 | 87 | #include 88 | 89 | #endif // GOOGLE_PROTOBUF_REFLECTION_OPS_H__ 90 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/source_context.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "SourceContextProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/genproto/protobuf/source_context;source_context"; 41 | 42 | // `SourceContext` represents information about the source of a 43 | // protobuf element, like the file in which it is defined. 44 | message SourceContext { 45 | // The path-qualified name of the .proto file that contained the associated 46 | // protobuf element. For example: `"google/protobuf/source_context.proto"`. 47 | string file_name = 1; 48 | } 49 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/struct.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "StructProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // `Struct` represents a structured data value, consisting of fields 44 | // which map to dynamically typed values. In some languages, `Struct` 45 | // might be supported by a native representation. For example, in 46 | // scripting languages like JS a struct is represented as an 47 | // object. The details of that representation are described together 48 | // with the proto support for the language. 49 | // 50 | // The JSON representation for `Struct` is JSON object. 51 | message Struct { 52 | // Unordered map of dynamically typed values. 53 | map fields = 1; 54 | } 55 | 56 | // `Value` represents a dynamically typed value which can be either 57 | // null, a number, a string, a boolean, a recursive struct value, or a 58 | // list of values. A producer of value is expected to set one of that 59 | // variants, absence of any variant indicates an error. 60 | // 61 | // The JSON representation for `Value` is JSON value. 62 | message Value { 63 | // The kind of value. 64 | oneof kind { 65 | // Represents a null value. 66 | NullValue null_value = 1; 67 | // Represents a double value. 68 | double number_value = 2; 69 | // Represents a string value. 70 | string string_value = 3; 71 | // Represents a boolean value. 72 | bool bool_value = 4; 73 | // Represents a structured value. 74 | Struct struct_value = 5; 75 | // Represents a repeated `Value`. 76 | ListValue list_value = 6; 77 | } 78 | } 79 | 80 | // `NullValue` is a singleton enumeration to represent the null value for the 81 | // `Value` type union. 82 | // 83 | // The JSON representation for `NullValue` is JSON `null`. 84 | enum NullValue { 85 | // Null value. 86 | NULL_VALUE = 0; 87 | } 88 | 89 | // `ListValue` is a wrapper around a repeated field of values. 90 | // 91 | // The JSON representation for `ListValue` is JSON array. 92 | message ListValue { 93 | // Repeated field of dynamically typed values. 94 | repeated Value values = 1; 95 | } 96 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/hash.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | 33 | #ifndef GOOGLE_PROTOBUF_STUBS_HASH_H__ 34 | #define GOOGLE_PROTOBUF_STUBS_HASH_H__ 35 | 36 | #include 37 | #include 38 | 39 | #include 40 | #include 41 | 42 | # define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START \ 43 | namespace google { \ 44 | namespace protobuf { 45 | # define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END }} 46 | 47 | namespace google { 48 | namespace protobuf { 49 | 50 | template 51 | struct hash : public std::hash {}; 52 | 53 | template 54 | struct hash { 55 | inline size_t operator()(const Key* key) const { 56 | return reinterpret_cast(key); 57 | } 58 | }; 59 | 60 | // Unlike the old SGI version, the TR1 "hash" does not special-case char*. So, 61 | // we go ahead and provide our own implementation. 62 | template <> 63 | struct hash { 64 | inline size_t operator()(const char* str) const { 65 | size_t result = 0; 66 | for (; *str != '\0'; str++) { 67 | result = 5 * result + static_cast(*str); 68 | } 69 | return result; 70 | } 71 | }; 72 | 73 | template<> 74 | struct hash { 75 | size_t operator()(bool x) const { 76 | return static_cast(x); 77 | } 78 | }; 79 | 80 | template <> 81 | struct hash { 82 | inline size_t operator()(const string& key) const { 83 | return hash()(key.c_str()); 84 | } 85 | 86 | static const size_t bucket_size = 4; 87 | static const size_t min_buckets = 8; 88 | inline bool operator()(const string& a, const string& b) const { 89 | return a < b; 90 | } 91 | }; 92 | 93 | template 94 | struct hash > { 95 | inline size_t operator()(const std::pair& key) const { 96 | size_t first_hash = hash()(key.first); 97 | size_t second_hash = hash()(key.second); 98 | 99 | // FIXME(kenton): What is the best way to compute this hash? I have 100 | // no idea! This seems a bit better than an XOR. 101 | return first_hash * ((1 << 16) - 1) + second_hash; 102 | } 103 | 104 | static const size_t bucket_size = 4; 105 | static const size_t min_buckets = 8; 106 | inline bool operator()(const std::pair& a, 107 | const std::pair& b) const { 108 | return a < b; 109 | } 110 | }; 111 | 112 | // Used by GCC/SGI STL only. (Why isn't this provided by the standard 113 | // library? :( ) 114 | struct streq { 115 | inline bool operator()(const char* a, const char* b) const { 116 | return strcmp(a, b) == 0; 117 | } 118 | }; 119 | 120 | } // namespace protobuf 121 | } // namespace google 122 | 123 | #endif // GOOGLE_PROTOBUF_STUBS_HASH_H__ 124 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/macros.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_MACROS_H__ 32 | #define GOOGLE_PROTOBUF_MACROS_H__ 33 | 34 | #include 35 | 36 | namespace google { 37 | namespace protobuf { 38 | 39 | #undef GOOGLE_DISALLOW_EVIL_CONSTRUCTORS 40 | #define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \ 41 | TypeName(const TypeName&); \ 42 | void operator=(const TypeName&) 43 | 44 | #undef GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS 45 | #define GOOGLE_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ 46 | TypeName(); \ 47 | TypeName(const TypeName&); \ 48 | void operator=(const TypeName&) 49 | 50 | // =================================================================== 51 | // from google3/base/basictypes.h 52 | 53 | // The GOOGLE_ARRAYSIZE(arr) macro returns the # of elements in an array arr. 54 | // The expression is a compile-time constant, and therefore can be 55 | // used in defining new arrays, for example. 56 | // 57 | // GOOGLE_ARRAYSIZE catches a few type errors. If you see a compiler error 58 | // 59 | // "warning: division by zero in ..." 60 | // 61 | // when using GOOGLE_ARRAYSIZE, you are (wrongfully) giving it a pointer. 62 | // You should only use GOOGLE_ARRAYSIZE on statically allocated arrays. 63 | // 64 | // The following comments are on the implementation details, and can 65 | // be ignored by the users. 66 | // 67 | // ARRAYSIZE(arr) works by inspecting sizeof(arr) (the # of bytes in 68 | // the array) and sizeof(*(arr)) (the # of bytes in one array 69 | // element). If the former is divisible by the latter, perhaps arr is 70 | // indeed an array, in which case the division result is the # of 71 | // elements in the array. Otherwise, arr cannot possibly be an array, 72 | // and we generate a compiler error to prevent the code from 73 | // compiling. 74 | // 75 | // Since the size of bool is implementation-defined, we need to cast 76 | // !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final 77 | // result has type size_t. 78 | // 79 | // This macro is not perfect as it wrongfully accepts certain 80 | // pointers, namely where the pointer size is divisible by the pointee 81 | // size. Since all our code has to go through a 32-bit compiler, 82 | // where a pointer is 4 bytes, this means all pointers to a type whose 83 | // size is 3 or greater than 4 will be (righteously) rejected. 84 | // 85 | // Kudos to Jorg Brown for this simple and elegant implementation. 86 | 87 | #undef GOOGLE_ARRAYSIZE 88 | #define GOOGLE_ARRAYSIZE(a) \ 89 | ((sizeof(a) / sizeof(*(a))) / \ 90 | static_cast(!(sizeof(a) % sizeof(*(a))))) 91 | 92 | // The COMPILE_ASSERT macro can be used to verify that a compile time 93 | // expression is true. For example, you could use it to verify the 94 | // size of a static array: 95 | // 96 | // COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES, 97 | // content_type_names_incorrect_size); 98 | // 99 | // or to make sure a struct is smaller than a certain size: 100 | // 101 | // COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large); 102 | // 103 | // The second argument to the macro is the name of the variable. If 104 | // the expression is false, most compilers will issue a warning/error 105 | // containing the name of the variable. 106 | 107 | namespace internal { 108 | 109 | template 110 | struct CompileAssert { 111 | }; 112 | 113 | } // namespace internal 114 | 115 | #define GOOGLE_COMPILE_ASSERT(expr, msg) static_assert(expr, #msg) 116 | 117 | } // namespace protobuf 118 | } // namespace google 119 | 120 | #endif // GOOGLE_PROTOBUF_MACROS_H__ 121 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/once.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_STUBS_ONCE_H__ 32 | #define GOOGLE_PROTOBUF_STUBS_ONCE_H__ 33 | 34 | #include 35 | #include 36 | 37 | #include 38 | 39 | namespace google { 40 | namespace protobuf { 41 | namespace internal { 42 | 43 | using once_flag = std::once_flag; 44 | template 45 | void call_once(Args&&... args ) { 46 | std::call_once(std::forward(args)...); 47 | } 48 | 49 | } // namespace internal 50 | } // namespace protobuf 51 | } // namespace google 52 | 53 | #include 54 | 55 | #endif // GOOGLE_PROTOBUF_STUBS_ONCE_H__ 56 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/platform_macros.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2012 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_PLATFORM_MACROS_H_ 32 | #define GOOGLE_PROTOBUF_PLATFORM_MACROS_H_ 33 | 34 | #define GOOGLE_PROTOBUF_PLATFORM_ERROR \ 35 | #error "Host platform was not detected as supported by protobuf" 36 | 37 | // Processor architecture detection. For more info on what's defined, see: 38 | // http://msdn.microsoft.com/en-us/library/b0084kay.aspx 39 | // http://www.agner.org/optimize/calling_conventions.pdf 40 | // or with gcc, run: "echo | gcc -E -dM -" 41 | #if defined(_M_X64) || defined(__x86_64__) 42 | #define GOOGLE_PROTOBUF_ARCH_X64 1 43 | #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 44 | #elif defined(_M_IX86) || defined(__i386__) 45 | #define GOOGLE_PROTOBUF_ARCH_IA32 1 46 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 47 | #elif defined(__QNX__) 48 | #define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1 49 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 50 | #elif defined(_M_ARM) || defined(__ARMEL__) 51 | #define GOOGLE_PROTOBUF_ARCH_ARM 1 52 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 53 | #elif defined(_M_ARM64) 54 | #define GOOGLE_PROTOBUF_ARCH_ARM 1 55 | #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 56 | #elif defined(__aarch64__) 57 | #define GOOGLE_PROTOBUF_ARCH_AARCH64 1 58 | #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 59 | #elif defined(__mips__) 60 | #if defined(__LP64__) 61 | #define GOOGLE_PROTOBUF_ARCH_MIPS64 1 62 | #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 63 | #else 64 | #define GOOGLE_PROTOBUF_ARCH_MIPS 1 65 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 66 | #endif 67 | #elif defined(__pnacl__) 68 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 69 | #elif defined(sparc) 70 | #define GOOGLE_PROTOBUF_ARCH_SPARC 1 71 | #if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__) 72 | #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 73 | #else 74 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 75 | #endif 76 | #elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__) 77 | #define GOOGLE_PROTOBUF_ARCH_POWER 1 78 | #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 79 | #elif defined(__PPC__) 80 | #define GOOGLE_PROTOBUF_ARCH_PPC 1 81 | #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 82 | #elif defined(__GNUC__) 83 | # if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)) 84 | // We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h 85 | # elif defined(__clang__) 86 | # if !__has_extension(c_atomic) 87 | GOOGLE_PROTOBUF_PLATFORM_ERROR 88 | # endif 89 | // We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h 90 | # endif 91 | # if __LP64__ 92 | # define GOOGLE_PROTOBUF_ARCH_64_BIT 1 93 | # else 94 | # define GOOGLE_PROTOBUF_ARCH_32_BIT 1 95 | # endif 96 | #else 97 | GOOGLE_PROTOBUF_PLATFORM_ERROR 98 | #endif 99 | 100 | #if defined(__APPLE__) 101 | #define GOOGLE_PROTOBUF_OS_APPLE 102 | #include 103 | #include 104 | #if TARGET_OS_IPHONE 105 | #define GOOGLE_PROTOBUF_OS_IPHONE 106 | #endif 107 | #elif defined(__EMSCRIPTEN__) 108 | #define GOOGLE_PROTOBUF_OS_EMSCRIPTEN 109 | #elif defined(__native_client__) 110 | #define GOOGLE_PROTOBUF_OS_NACL 111 | #elif defined(sun) 112 | #define GOOGLE_PROTOBUF_OS_SOLARIS 113 | #elif defined(_AIX) 114 | #define GOOGLE_PROTOBUF_OS_AIX 115 | #elif defined(__ANDROID__) 116 | #define GOOGLE_PROTOBUF_OS_ANDROID 117 | #endif 118 | 119 | #undef GOOGLE_PROTOBUF_PLATFORM_ERROR 120 | 121 | #if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__) 122 | // Android ndk does not support the __thread keyword very well yet. Here 123 | // we use pthread_key_create()/pthread_getspecific()/... methods for 124 | // TLS support on android. 125 | // iOS and OpenBSD also do not support the __thread keyword. 126 | #define GOOGLE_PROTOBUF_NO_THREADLOCAL 127 | #endif 128 | 129 | #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 130 | // __thread keyword requires at least 10.7 131 | #define GOOGLE_PROTOBUF_NO_THREADLOCAL 132 | #endif 133 | 134 | #endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_ 135 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/status.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | #ifndef GOOGLE_PROTOBUF_STUBS_STATUS_H_ 31 | #define GOOGLE_PROTOBUF_STUBS_STATUS_H_ 32 | 33 | #include 34 | #include 35 | 36 | #include 37 | #include 38 | 39 | #include 40 | 41 | namespace google { 42 | namespace protobuf { 43 | namespace util { 44 | namespace error { 45 | // These values must match error codes defined in google/rpc/code.proto. 46 | enum Code { 47 | OK = 0, 48 | CANCELLED = 1, 49 | UNKNOWN = 2, 50 | INVALID_ARGUMENT = 3, 51 | DEADLINE_EXCEEDED = 4, 52 | NOT_FOUND = 5, 53 | ALREADY_EXISTS = 6, 54 | PERMISSION_DENIED = 7, 55 | UNAUTHENTICATED = 16, 56 | RESOURCE_EXHAUSTED = 8, 57 | FAILED_PRECONDITION = 9, 58 | ABORTED = 10, 59 | OUT_OF_RANGE = 11, 60 | UNIMPLEMENTED = 12, 61 | INTERNAL = 13, 62 | UNAVAILABLE = 14, 63 | DATA_LOSS = 15, 64 | }; 65 | } // namespace error 66 | 67 | class PROTOBUF_EXPORT Status { 68 | public: 69 | // Creates a "successful" status. 70 | Status(); 71 | 72 | // Create a status in the canonical error space with the specified 73 | // code, and error message. If "code == 0", error_message is 74 | // ignored and a Status object identical to Status::OK is 75 | // constructed. 76 | Status(error::Code error_code, StringPiece error_message); 77 | Status(const Status&); 78 | Status& operator=(const Status& x); 79 | ~Status() {} 80 | 81 | // Some pre-defined Status objects 82 | static const Status OK; // Identical to 0-arg constructor 83 | static const Status CANCELLED; 84 | static const Status UNKNOWN; 85 | 86 | // Accessor 87 | bool ok() const { 88 | return error_code_ == error::OK; 89 | } 90 | int error_code() const { 91 | return error_code_; 92 | } 93 | error::Code code() const { 94 | return error_code_; 95 | } 96 | StringPiece error_message() const { 97 | return error_message_; 98 | } 99 | StringPiece message() const { 100 | return error_message_; 101 | } 102 | 103 | bool operator==(const Status& x) const; 104 | bool operator!=(const Status& x) const { 105 | return !operator==(x); 106 | } 107 | 108 | // Return a combination of the error code name and message. 109 | string ToString() const; 110 | 111 | private: 112 | error::Code error_code_; 113 | string error_message_; 114 | }; 115 | 116 | // Prints a human-readable representation of 'x' to 'os'. 117 | PROTOBUF_EXPORT std::ostream& operator<<(std::ostream& os, const Status& x); 118 | 119 | } // namespace util 120 | } // namespace protobuf 121 | } // namespace google 122 | 123 | #include 124 | 125 | #endif // GOOGLE_PROTOBUF_STUBS_STATUS_H_ 126 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/stl_util.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // from google3/util/gtl/stl_util.h 32 | 33 | #ifndef GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__ 34 | #define GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__ 35 | 36 | #include 37 | 38 | namespace google { 39 | namespace protobuf { 40 | 41 | // Inside Google, this function implements a horrible, disgusting hack in which 42 | // we reach into the string's private implementation and resize it without 43 | // initializing the new bytes. In some cases doing this can significantly 44 | // improve performance. However, since it's totally non-portable it has no 45 | // place in open source code. Feel free to fill this function in with your 46 | // own disgusting hack if you want the perf boost. 47 | inline void STLStringResizeUninitialized(string* s, size_t new_size) { 48 | s->resize(new_size); 49 | } 50 | 51 | // Return a mutable char* pointing to a string's internal buffer, 52 | // which may not be null-terminated. Writing through this pointer will 53 | // modify the string. 54 | // 55 | // string_as_array(&str)[i] is valid for 0 <= i < str.size() until the 56 | // next call to a string method that invalidates iterators. 57 | // 58 | // As of 2006-04, there is no standard-blessed way of getting a 59 | // mutable reference to a string's internal buffer. However, issue 530 60 | // (http://www.open-std.org/JTC1/SC22/WG21/docs/lwg-active.html#530) 61 | // proposes this as the method. According to Matt Austern, this should 62 | // already work on all current implementations. 63 | inline char* string_as_array(string* str) { 64 | // DO NOT USE const_cast(str->data())! See the unittest for why. 65 | return str->empty() ? nullptr : &*str->begin(); 66 | } 67 | 68 | } // namespace protobuf 69 | } // namespace google 70 | 71 | #endif // GOOGLE_PROTOBUF_STUBS_STL_UTIL_H__ 72 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/stubs/template_util.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005 Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // ---- 31 | // Author: lar@google.com (Laramie Leavitt) 32 | // 33 | // Template metaprogramming utility functions. 34 | // 35 | // This code is compiled directly on many platforms, including client 36 | // platforms like Windows, Mac, and embedded systems. Before making 37 | // any changes here, make sure that you're not breaking any platforms. 38 | // 39 | // 40 | // The names chosen here reflect those used in tr1 and the boost::mpl 41 | // library, there are similar operations used in the Loki library as 42 | // well. I prefer the boost names for 2 reasons: 43 | // 1. I think that portions of the Boost libraries are more likely to 44 | // be included in the c++ standard. 45 | // 2. It is not impossible that some of the boost libraries will be 46 | // included in our own build in the future. 47 | // Both of these outcomes means that we may be able to directly replace 48 | // some of these with boost equivalents. 49 | // 50 | #ifndef GOOGLE_PROTOBUF_TEMPLATE_UTIL_H_ 51 | #define GOOGLE_PROTOBUF_TEMPLATE_UTIL_H_ 52 | 53 | namespace google { 54 | namespace protobuf { 55 | namespace internal { 56 | 57 | // Types small_ and big_ are guaranteed such that sizeof(small_) < 58 | // sizeof(big_) 59 | typedef char small_; 60 | 61 | struct big_ { 62 | char dummy[2]; 63 | }; 64 | 65 | // Identity metafunction. 66 | template 67 | struct identity_ { 68 | typedef T type; 69 | }; 70 | 71 | // integral_constant, defined in tr1, is a wrapper for an integer 72 | // value. We don't really need this generality; we could get away 73 | // with hardcoding the integer type to bool. We use the fully 74 | // general integer_constant for compatibility with tr1. 75 | 76 | template 77 | struct integral_constant { 78 | static const T value = v; 79 | typedef T value_type; 80 | typedef integral_constant type; 81 | }; 82 | 83 | template const T integral_constant::value; 84 | 85 | 86 | // Abbreviations: true_type and false_type are structs that represent boolean 87 | // true and false values. Also define the boost::mpl versions of those names, 88 | // true_ and false_. 89 | typedef integral_constant true_type; 90 | typedef integral_constant false_type; 91 | typedef true_type true_; 92 | typedef false_type false_; 93 | 94 | // if_ is a templatized conditional statement. 95 | // if_ is a compile time evaluation of cond. 96 | // if_<>::type contains A if cond is true, B otherwise. 97 | template 98 | struct if_{ 99 | typedef A type; 100 | }; 101 | 102 | template 103 | struct if_ { 104 | typedef B type; 105 | }; 106 | 107 | 108 | // type_equals_ is a template type comparator, similar to Loki IsSameType. 109 | // type_equals_::value is true iff "A" is the same type as "B". 110 | // 111 | // New code should prefer base::is_same, defined in base/type_traits.h. 112 | // It is functionally identical, but is_same is the standard spelling. 113 | template 114 | struct type_equals_ : public false_ { 115 | }; 116 | 117 | template 118 | struct type_equals_ : public true_ { 119 | }; 120 | 121 | // and_ is a template && operator. 122 | // and_::value evaluates "A::value && B::value". 123 | template 124 | struct and_ : public integral_constant { 125 | }; 126 | 127 | // or_ is a template || operator. 128 | // or_::value evaluates "A::value || B::value". 129 | template 130 | struct or_ : public integral_constant { 131 | }; 132 | 133 | 134 | } // namespace internal 135 | } // namespace protobuf 136 | } // namespace google 137 | 138 | #endif // GOOGLE_PROTOBUF_TEMPLATE_UTIL_H_ 139 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/util/type_resolver.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Defines a TypeResolver for the Any message. 32 | 33 | #ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__ 34 | #define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__ 35 | 36 | #include 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | #include 43 | 44 | namespace google { 45 | namespace protobuf { 46 | class DescriptorPool; 47 | namespace util { 48 | 49 | // Abstract interface for a type resovler. 50 | // 51 | // Implementations of this interface must be thread-safe. 52 | class PROTOBUF_EXPORT TypeResolver { 53 | public: 54 | TypeResolver() {} 55 | virtual ~TypeResolver() {} 56 | 57 | // Resolves a type url for a message type. 58 | virtual util::Status ResolveMessageType( 59 | const std::string& type_url, google::protobuf::Type* message_type) = 0; 60 | 61 | // Resolves a type url for an enum type. 62 | virtual util::Status ResolveEnumType(const std::string& type_url, 63 | google::protobuf::Enum* enum_type) = 0; 64 | 65 | private: 66 | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeResolver); 67 | }; 68 | 69 | } // namespace util 70 | } // namespace protobuf 71 | } // namespace google 72 | 73 | #include 74 | 75 | #endif // GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_H__ 76 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/util/type_resolver_util.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Defines utilities for the TypeResolver. 32 | 33 | #ifndef GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__ 34 | #define GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__ 35 | 36 | #include 37 | 38 | namespace google { 39 | namespace protobuf { 40 | class DescriptorPool; 41 | namespace util { 42 | class TypeResolver; 43 | 44 | #include 45 | 46 | // Creates a TypeResolver that serves type information in the given descriptor 47 | // pool. Caller takes ownership of the returned TypeResolver. 48 | PROTOBUF_EXPORT TypeResolver* NewTypeResolverForDescriptorPool( 49 | const std::string& url_prefix, const DescriptorPool* pool); 50 | 51 | } // namespace util 52 | } // namespace protobuf 53 | } // namespace google 54 | 55 | #include 56 | 57 | #endif // GOOGLE_PROTOBUF_UTIL_TYPE_RESOLVER_UTIL_H__ 58 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Include/google/protobuf/wrappers.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Wrappers for primitive (non-message) types. These types are useful 32 | // for embedding primitives in the `google.protobuf.Any` type and for places 33 | // where we need to distinguish between the absence of a primitive 34 | // typed field and its default value. 35 | // 36 | // These wrappers have no meaningful use within repeated fields as they lack 37 | // the ability to detect presence on individual elements. 38 | // These wrappers have no meaningful use within a map or a oneof since 39 | // individual entries of a map or fields of a oneof can already detect presence. 40 | 41 | syntax = "proto3"; 42 | 43 | package google.protobuf; 44 | 45 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 46 | option cc_enable_arenas = true; 47 | option go_package = "github.com/golang/protobuf/ptypes/wrappers"; 48 | option java_package = "com.google.protobuf"; 49 | option java_outer_classname = "WrappersProto"; 50 | option java_multiple_files = true; 51 | option objc_class_prefix = "GPB"; 52 | 53 | // Wrapper message for `double`. 54 | // 55 | // The JSON representation for `DoubleValue` is JSON number. 56 | message DoubleValue { 57 | // The double value. 58 | double value = 1; 59 | } 60 | 61 | // Wrapper message for `float`. 62 | // 63 | // The JSON representation for `FloatValue` is JSON number. 64 | message FloatValue { 65 | // The float value. 66 | float value = 1; 67 | } 68 | 69 | // Wrapper message for `int64`. 70 | // 71 | // The JSON representation for `Int64Value` is JSON string. 72 | message Int64Value { 73 | // The int64 value. 74 | int64 value = 1; 75 | } 76 | 77 | // Wrapper message for `uint64`. 78 | // 79 | // The JSON representation for `UInt64Value` is JSON string. 80 | message UInt64Value { 81 | // The uint64 value. 82 | uint64 value = 1; 83 | } 84 | 85 | // Wrapper message for `int32`. 86 | // 87 | // The JSON representation for `Int32Value` is JSON number. 88 | message Int32Value { 89 | // The int32 value. 90 | int32 value = 1; 91 | } 92 | 93 | // Wrapper message for `uint32`. 94 | // 95 | // The JSON representation for `UInt32Value` is JSON number. 96 | message UInt32Value { 97 | // The uint32 value. 98 | uint32 value = 1; 99 | } 100 | 101 | // Wrapper message for `bool`. 102 | // 103 | // The JSON representation for `BoolValue` is JSON `true` and `false`. 104 | message BoolValue { 105 | // The bool value. 106 | bool value = 1; 107 | } 108 | 109 | // Wrapper message for `string`. 110 | // 111 | // The JSON representation for `StringValue` is JSON string. 112 | message StringValue { 113 | // The string value. 114 | string value = 1; 115 | } 116 | 117 | // Wrapper message for `bytes`. 118 | // 119 | // The JSON representation for `BytesValue` is JSON string. 120 | message BytesValue { 121 | // The bytes value. 122 | bytes value = 1; 123 | } 124 | -------------------------------------------------------------------------------- /Plugins/MediaPipe/ThirdParty/protobuf/Lib/Win64/libprotobuf.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertotrunk/ue5-motion-capture/10dc740436fe873b0e985ed17310ba991e39e5d5/Plugins/MediaPipe/ThirdParty/protobuf/Lib/Win64/libprotobuf.lib -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UE 5.1 Build 2 | 3 | ![image](https://user-images.githubusercontent.com/8300565/221344546-54c6f04b-45a6-45b0-acd0-1b1244b54ebd.png) 4 | 5 | 6 | # UE5 MediaPipe plugin 7 | 8 | WARNING: this project is experimental and recommended for experienced developers only! 9 | 10 | Platforms: UE 5.1 (Windows ONLY, other will not be supported) 11 | 12 | 2D features: Face, Iris, Hands, Pose, Holistic 13 | 14 | 3D features: Face Mesh, World Pose 15 | 16 | Demo video: https://www.youtube.com/watch?v=_gRGjGn6FQE 17 | 18 | ## (Optional) Building the plugin and MediaPipe wrapper library 19 | 20 | ### Clone plugin 21 | 22 | `git clone https://github.com/wongfei/ue4-mediapipe-plugin.git` 23 | 24 | ### Clone wrapper 25 | 26 | `git clone -b unreal https://github.com/albertotrunk/mediapipe.git ue5-motion-capture` 27 | 28 | [Setup workspace](https://google.github.io/mediapipe/getting_started/install.html) 29 | 30 | ### Build wrapper 31 | 32 | `cd ue5-motion-capture` 33 | 34 | `bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:\\Python39\\python.exe" mediapipe/unreal:ump_shared` 35 | 36 | See: `ue5-motion-capture\mediapipe\unreal\scripts\build_shared.cmd` 37 | 38 | Copy ump_shared.dll to `ue4-mediapipe-plugin\Plugins\MediaPipe\ThirdParty\mediapipe\Binaries\Win64\` 39 | 40 | See: `ue5-motion-capture\mediapipe\unreal\scripts\deploy.cmd` 41 | 42 | ### Other deps 43 | 44 | Protobuf 3.11.4 45 | 46 | Copy libprotobuf.lib to `ue4-mediapipe-plugin\Plugins\MediaPipe\ThirdParty\protobuf\Lib\Win64\` 47 | 48 | (Optional) OpenCV 3.4.10 with fixed CAP_MSMF 49 | 50 | `git clone -b msmf_fix_3410 https://github.com/wongfei/opencv.git` 51 | 52 | Copy opencv_world3410.dll to `ue5-motion-capture\Plugins\MediaPipe\ThirdParty\mediapipe\Binaries\Win64\` 53 | -------------------------------------------------------------------------------- /Source/ue5mediapipeC.Target.cs: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class ue5mediapipeCTarget : TargetRules 7 | { 8 | public ue5mediapipeCTarget(TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Game; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | 13 | ExtraModuleNames.AddRange( new string[] { "ue5mediapipeC" } ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Source/ue5mediapipeC/ue5mediapipeC.Build.cs: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class ue5mediapipeC : ModuleRules 6 | { 7 | public ue5mediapipeC(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); 12 | 13 | PrivateDependencyModuleNames.AddRange(new string[] { }); 14 | 15 | // Uncomment if you are using Slate UI 16 | // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); 17 | 18 | // Uncomment if you are using online features 19 | // PrivateDependencyModuleNames.Add("OnlineSubsystem"); 20 | 21 | // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Source/ue5mediapipeC/ue5mediapipeC.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #include "ue5mediapipeC.h" 4 | #include "Modules/ModuleManager.h" 5 | 6 | IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, ue5mediapipeC, "ue5mediapipeC" ); 7 | -------------------------------------------------------------------------------- /Source/ue5mediapipeC/ue5mediapipeC.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | -------------------------------------------------------------------------------- /Source/ue5mediapipeC/ue5mediapipeCGameModeBase.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "ue5mediapipeCGameModeBase.h" 5 | 6 | -------------------------------------------------------------------------------- /Source/ue5mediapipeC/ue5mediapipeCGameModeBase.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/GameModeBase.h" 7 | #include "ue5mediapipeCGameModeBase.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UE5MEDIAPIPEC_API Aue5mediapipeCGameModeBase : public AGameModeBase 14 | { 15 | GENERATED_BODY() 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /Source/ue5mediapipeCEditor.Target.cs: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class ue5mediapipeCEditorTarget : TargetRules 7 | { 8 | public ue5mediapipeCEditorTarget(TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Editor; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | 13 | ExtraModuleNames.AddRange( new string[] { "ue5mediapipeC" } ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /_precompile.cmd: -------------------------------------------------------------------------------- 1 | set "UE_DIR=C:\dev\UE_4.26" 2 | 3 | set "WORK_DIR=%cd%" 4 | set "BATCH_UAT=%UE_DIR%\Engine\Build\BatchFiles\RunUAT.bat" 5 | set "BATCH_BUILD=%UE_DIR%\Engine\Build\BatchFiles\Build.bat" 6 | 7 | rmdir /S /Q "%WORK_DIR%\Build\Plugins\MediaPipe" 8 | 9 | call "%BATCH_UAT%" BuildPlugin -Plugin="%WORK_DIR%\Plugins\MediaPipe\MediaPipe.uplugin" -Package="%WORK_DIR%\Build\Plugins\MediaPipe" -TargetPlatforms=Win64 -Rocket -precompile -VS2019 -StrictIncludes 10 | 11 | xcopy /E /H /Q /Y "%WORK_DIR%\Plugins\MediaPipe\ThirdParty" "%WORK_DIR%\Build\Plugins\MediaPipe\ThirdParty\" 12 | 13 | :: call "%BATCH_BUILD%" MediaPipeDemoEditor Win64 Development "%WORK_DIR%\MediaPipeDemo.uproject" 14 | :: call "%BATCH_BUILD%" MediaPipeDemo Win64 Development "%WORK_DIR%\MediaPipeDemo.uproject" 15 | :: call "%BATCH_BUILD%" MediaPipeDemo Win64 Shipping "%WORK_DIR%\MediaPipeDemo.uproject" 16 | -------------------------------------------------------------------------------- /ue5mediapipeC.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "EngineAssociation": "5.1", 4 | "Category": "", 5 | "Description": "", 6 | "Modules": [ 7 | { 8 | "Name": "ue5mediapipeC", 9 | "Type": "Runtime", 10 | "LoadingPhase": "Default" 11 | } 12 | ], 13 | "Plugins": [ 14 | { 15 | "Name": "ModelingToolsEditorMode", 16 | "Enabled": true, 17 | "TargetAllowList": [ 18 | "Editor" 19 | ] 20 | } 21 | ] 22 | } --------------------------------------------------------------------------------