Pull out content stored on media in RemoteTransferMode

When you connect in RemoteTransferMode, you can pull content from the media inserted in the camera slot during camera remote control.

Remote control and file transfer can be performed simultaneously in order to maximise the efficiency of any remote production.

RemoteTransferMode eliminates the need for mode switching (disconnect/reconnect), which was necessary with the previous ContentsTransferMode, and allows the user to execute the shooting process even during contents transfer.

However, content transfer speed may decrease depending on your use case environment due to the ability to transfer content during the shooting process. Please measure the actual performance in your use case and environment before use.

When transferring multiple contents at once or large video contents, we recommend using the conventional ContentTransferMode.

In order to pull the contents from the media, a content id is required to identify the content.

Contents list in media got automatically in SDK.

You can get the contents after receive callback “OnNotifyRemoteTransferContentsListChanged()”.

Content is managed for each slot of media. First, get the CaptureDate list with GetRemoteTransferCapturedDateList(), and then use the capture date to get the content info list with GetRemoteTransferContentsInfoList().

To know the file name and size of the content, get the detailed information at CrContentsFile.

../_images/op_seq_pull_out_content_stored_on_media_in_remote_transfer_mode.png ../_images/op_seq_pull_out_content_stored_on_media_in_remote_transfer_mode2.png

Example:

CrInt32u dNums = 0;
SCRSDK::CrCaptureDate* dList;
CrError err = SCRSDK::GetRemoteTransferCapturedDateList(handle, slotNumber, &dList, &dNums);
if (CR_SUCCEEDED(err)) {
    CrInt32u cNums = 0;
    SCRSDK::CrContentsInfo* cList;
    SCRSDK::CrGetContentsInfoListType type searchType =
                      SCRSDK::CrGetContentsInfoListType_All;
    SCRSDK::CrCaptureDate dummy;
    CrInt32u maxCount = 0;    // set 0 if want to get limit is unlimited.
    err = SCRSDK::GetRemoteTransferContentsInfoList(handle, slotNumber,
                      searchType, dummy, maxCount, &cList, &cNums);
    if (CR_SUCCEEDED(err)) {
        for (int i = 0; I < cNums; i++) {
            m_contentInfoList.push_back(cList[i]);
        }
        SCRSDK::ReleaseRemoteTransferContentsInfoList(handle, cList);
    }
    SCRSDK::ReleaseDateFolderList(handle, dList);
}

Save the content file to the host device using following APIs.

They are asynchronous. You can get the progress rate of transfer content by second argument of OnNotifyRemoteTransferResult().

When the transfer is complete, you will be notified with the OnNotifyRemoteTransferResult() callback with “CrNotify_RemoteTransfer_Result_OK”.

When the user requests to cancel the content transfer or the connection is lost, the OnNotifyRemoteTransferResult() callback will notify you of the reason why it could not be completed.

You can use GetRemoteTransferContentsData() and GetRemoteTransferContentsCompressedData() if you want to get the contents data without write file. Above 2 APIs hands over content at argument of callback.

You can use GetRemoteTransferContentsDataFile() and GetRemoteTransferContentsCompressedDataFile() If you want to get the contents file to host computer. Above 2 APIs notify written file path at argument of callback.

Caution: Other file can’t start transfer when a content transfer proceeding. Please start transfer of next file after receive result by OnNotifyRemoteTransferResult().

You can control transfer by GetRemoteTransferContentsDataFile() at ControlGetRemoteTransferContentsDataFile().

../_images/op_seq_pull_out_content_stored_on_media_in_remote_transfer_mode3.png ../_images/op_seq_pull_out_content_stored_on_media_in_remote_transfer_mode4.png

Note: We cannot guarantee the transfer of content taken with other cameras. And large files may not be handled depending on the OS.

Example:

SCRSDK::CrContentsInfo contentsInfo = m_contentsInfoList[0];
SCRSDK::CrContentsFile contentsFile = contentsInfo.files[0];
CrInt32u divisionSize = 50 * 1024 * 1024; // 50MB
err = SCRSDK::GetRemoteTransferContentsData(handle, slotNumber,
contentsInfo.contentId, contentsFile.fileId, divisionSize);

class MyDeviceCallback : public IDeviceCallback {
  void OnNotifyRemoteTransferResult(CrInt32u notify, CrInt32u per, CrInt8u* data, CrInt64u size) {
if (CrNotify_RemoteTransfer_InProgress == notify) {
  // get the progress rate at per.
else if (CrNotify_RemoteTransfer_Result_OK == notify){
  // get the contents at data.
else
  : // Failure

Example: Receive content at file.

SCRSDK::CrContentsInfo contentsInfo = m_contentsInfoList[0];
SCRSDK::CrContentsFile contentsFile = contentsInfo.files[0];
CrInt32u divisionSize = 50 * 1024 * 1024; // 50MB
err = SCRSDK::GetRemoteTransferContentsData(handle, slotNumber,
contentsInfo.contentId, contentsFile.fileId, divisionSize,
nullptr, nullptr);
// use default value when set the nullptr at path and name.

class MyDeviceCallback : public IDeviceCallback {
  void OnNotifyRemoteTransferResult(CrInt32u notify, CrInt32u per, CrChar* filename) {
    if (CrNotify_RemoteTransfer_InProgress == notify){
      // get the progress rate at per.
    else if (CrNotify_RemoteTransfer_Result_OK == notify) {
      // get the contents file path at filename.
      // filename is include full path..
    else
      : // Failure