unreal.CameraCaptureComponent

class unreal.CameraCaptureComponent(outer=None, name='None')

Bases: unreal.ActorComponent

The CameraCaptureComponent provides access to and maintains state for camera capture functionality. The connection to the device’s camera is managed internally. Users of this component are able to asynchronously capture camera images and footage to file. Alternatively, a camera image can be captured directly to texture. The user need only make the relevant asynchronous call and then register the appropriate success/fail event handlers for the operation’s completion.

C++ Source:

  • Plugin: MagicLeap
  • Module: MagicLeap
  • File: CameraCaptureComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the component
  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.
  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation
  • capture_log_message (CameraCaptureLogMessage): [Read-Write] Capture Log Message
  • component_tags (Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class
  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds
  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset
  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated
  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component
  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
capture_image_to_file_async(result_delegate) → bool

Initiates a capture image to file task on a separate thread. The newly created jpeg file will have an automatically generated name which is guaranteed to be unique. Upon completion, a successful operation will provide the file path of the newly created jpeg to the FCameraCaptureImgToFile event handler.:

Parameters:result_delegate (CameraCaptureImgToFile) – The delegate to be notified once the camera image has been saved to a jpeg file.
Returns:
Return type:bool
capture_image_to_texture_async(result_delegate) → bool

Initiates a capture image to memory task on a speparate thread. The user should register event handlers for both the success and fail events. Upon completion, a successful operation will provide a dynamically generated texture containing the captured image to the FCameraCaptureImgToTextureSuccess event handler.: The generated texture will be garbage collected when this app is destroyed.:

Parameters:result_delegate (CameraCaptureImgToTexture) – The delegate to be notified once the camera image has been saved to a texture.
Returns:
Return type:bool
capture_log_message

(CameraCaptureLogMessage) – [Read-Write] Capture Log Message

is_capturing() → bool

Gets the capture state of the component.

Returns:True if the component is currently capturing, false otherwise.
Return type:bool
start_recording_video_async(result_delegate) → bool

Initiates the capturing of video/audio data on a separate thread. The system will continue to record video until StopRecordingVideo is called.:

Parameters:result_delegate (CameraCaptureStartRecording) – The delegate to be notified once the recording has begun or failed to begin.
Returns:
Return type:bool
stop_recording_video_async(result_delegate) → bool

Stops the recording and saves the video/audio data to an mp4 file. The newly created mp4 file will have an automatically generated name which is guaranteed to be unique.:

Parameters:result_delegate (CameraCaptureStopRecording) – The delegate to be notified once the video/audio data has been saved to an mp4 file.
Returns:
Return type:bool