Viz Pilot User Guide

Version 8.7 | Published September 25, 2023 ©

Integrating Drag-and-Drop from External Applications

External applications can integrate with the Viz Pilot system to provide resources such as images and videos using drag-and-drop. For example, using a MAM system to locate media and using drag-and-drop to ingest the media to a template in a Viz Pilot workflow. The required data formats and drag-and-drop parameters are described below.

Note: Drag-and-drop integration in Viz Pilot is not designed to accept common image and video files that are handled by typical applications. The purpose of the integration is to let developers support drag-and-drop by API integration. Consequently, this section is fairly technical and is intended for developers who are planning to integrate drag-and-drop.

Formats

The integration uses the standard Microsoft Windows functions for OLE drag-and-drop, see https://msdn.microsoft.com/en-us/library/96826a87.aspx. For general information about the Windows Clipboard, see MSDN Clipboard Formats.

The drop target of a drag-and-drop operation is always an image control (TTWImage) on a template. Not every image control will accept drops. The accepted custom clipboard formats (https://msdn.microsoft.com/en-us/library/838a3whf.aspx) and what each format accepts are listed below:

Clipboard format

Accepting ImageSources

Media Type

CF_VIDEO_ASSET_ENTRY_XML

isVideoMediaSearch

video

CF_IMAGE_ASSET_ENTRY_XML

isImageMediaSearch

image

  • All accepted custom clipboard formats are registered formats (see MSDN Registered Clipboard Formats), which are text formats with the same characteristics as CF_UNICODETEXT.

  • The actual content must be an Asset Entry XML, describing a video, or an image asset, respectively.

  • The Asset Entry media type extends the Atom Entry media type defined by RFC 4287 and RFC 5023, by defining additional markup and additional processing rules. An Asset Entry has the Internet Media Type application/atom+xml with the RECOMMENDED type parameter type=entry.

Note: Pilot Data Server Documentation should be consulted for the Asset Entry media types. Assuming the Pilot Data Server is running on localhost, browse to http://localhost:8177/help and http://localhost:8177/AssetSearchDocumentation/.

API Integration

The only Windows data transfer types accepted as input are enumeration values TYMED_HGLOBAL with DVASPECT_CONTENT. The accepted DROPEFFECTs are DROPEFFECT_COPY and DROPEFFECT_LINK.

Links to MSDN definitions for the required enumeration values and constants are included below. Note that these links could change over time.

  • TYMED_HGLOBAL

  • DVASPECT_CONTENT

  • DROPEFFECT

    Tip: If there is an error while processing dropped content an error message will be logged and the Errors button will appear if it wasn't already visible. If this happens during development, check the error log since a trace of why the dropped resource was rejected will be logged. If the media container does not accept a drop, it will likely be because the resource type is not supported; this will be indicated by the cursor displaying a stop sign.

    Tip: Tools such as ClipSpy can be valuable while developing the integration. To see what datatypes are provided by the drag-and-drop operation, see http://www.codeproject.com/Articles/168/ClipSpy.