MediaProfile

GetMediaProfile

Overview

It is an API to get the meta information of the content file recorded on the media.

In Specific camera, meta information such as recorded content is called “MediaProfile”.

Definition

CrError GetMediaProfile(CrDeviceHandle deviceHandle, CrMediaProfile slot, CrMediaProfileInfo** mediaProfile, CrInt32u* numOfProfile);

Input parameters

Type

Explanation

CrDeviceHandle

deviceHandle

CrMediaProfile

slot
Specifies the slot from which to get the MediaProfile.

Output parameters

Type

Explanation

CrMediaProfileInfo**

mediaProfile
The CrMediaProfile list pointer. Developers should pass the address of a modifiable CrMediaProfile pointer. The value of this pointer should be initialized to nullptr.
This function creates a meta information list of the specified in-slot content and writes a copy to this pointer.

CrInt32u*

numOfProfile
An integer pointer that indicates the number of CrMediaProfileInfo returned by the mediaProfile pointer.
Developers should pass the address of a modifiable CrInt32u variable.

Return value

Type

Explanation

CrError

CrError_None on Success
CrError_Api_NoApplicableInformation If there is no meta information, etc.
Related API
Special note (details)

After the movie is recorded, OnWarning() notifies CrWarning_MediaProfileChanged_Slotx and notifies the media profile information update in the slot.

The content to be recorded (file format, etc.) differs depending on the camera body, so refer to the help guide for the target camera.

ReleaseMediaProfile

Overview

This function releases the CrMediaProfileInfo allocated by GetMediaProfile().

Definition

CrError ReleaseMediaProfile(CrDeviceHandle deviceHandle, CrMediaProfileInfo * mediaProfile);

Input parameters

Type

Explanation

CrDeviceHandle

deviceHandle

CrMediaProfileInfo*

mediaProfile
CrMediaProfileInfo list pointer to release.
Output parameters

None

Return value

Type

Explanation

CrError

CrError_None If the list is released successfully
CrError_Init if the SDK is uninitialized
CrError_Generic_InvalidHandle If the deviceHandle is an invalid handle
Other than errors above, see Status code & Error
Related API
Special note (details)

None in particular