Drastic DDR MediaCmd SDK
The Drastic MediaCmd SDK is the mechanism by which all the elements of Drastic's DDRs communicate with one another. The control features provided within the SDK include the following:
VTR Emulation - Receiving commands from 9 pin Serial Controllers via Sony, Odetics or VDCP protocol. Receiving commands from Drastic GUIs, Servers and Controllers
Controller - Controlling VVW or Titan Series DDR Servers, Drastic DDR software locally, and Drastic DDR software licensed to support network option remotely. Controlling 9 pin serial VTRs and Servers via Sony, Odetics or VDCP protocol
HTML/AJAX - Building HTML/AJAX status and control pages

Overview
MediaCmd is a simple structure that supports a small, well defined set of commands for communicating transport, status and setup information between components in Drastic's Net-X-Code software. There are a number of fields in the structure, but the important fields are:
- ctCmd – the primary command of this packet (Play, Pause, Stop, Record, etc.)
- lSpeed – the transport speed for any Play commands (integer where 65520 = normal forward play)
- dwPosition – the frame position for any Play, Pause or Record commands
- dwStart – the starting frame for any Play or Record commands (inclusive)
- dwEnd – the ending frame for any Play or Record commands (exclusive)
- arbID – Clip name, File name or other string/binary data for the command
- cfFlags – denotes which fields above are valid and their meaning
With the standard initialization, you can quickly build commands in this structure by changing a few members and sending it. The primary motion commands are ctPlay, ctPause, ctStop, ctRecStop, ctRecord, ctEject and ctTransfer. To get the current state (position, speed, start and end, current clip), the command ctGetState will return a filled in MediaCmd. For setup and less common status (e.g. video input, audio RMS level, genlock) there is ctGetValue and ctSetValue. This is documented in the Low Level Header Docs.
Hopefully, you will not have to deal with the MediaCmd structure directly. The SDK includes a series of simple commands that should provide 99% of what your application needs. These functions are simply wrappers that create and send MediaCmd structures. The source for all these functions is provided in the SDK under SRC\General\vvwIF.cpp in case you need to modify or create new commands. The commands have slightly different names depending on which interface you use, but have the same root name, such as: Play(), PlayFromTo(), Stop(), Pause(), Seek(), Record() and UpdateStatus(). Commands are also included for getting clip lists (GetNextClip()) and EDL elements from ::VTR_TC time code spaces (EDLResetToStart(), EDLGetEdit()). A selection of the most common settings is also included (SetVideoInput(), SetAudioInput(), SetVideoGenlock(), GetAudioPeakRMS(), etc). This interface is documented in the MediaCmd Documentation (previously called “VVW Interface Specification”).
Installation
To properly work with the MediaCmd SDK, you should have a copy of Net-X-Code Server software installed on your development system. Even if your target application will only use a part of the software, it should all be installed for the development phase. Before proceeding with the SDK you should familiarize yourself with Net-X-Code Server's operation and tool set. The DDR elements available within Net-X-Code Server are the same elements available to your application through the SDK.
Once you have Net-X-Code Server installed, you should install the MediaCmd SDK. This will install the headers, libraries and source needed to control Net-X-Code Server from your application.
Choosing An Access Method
The SDK access method you should use depends on what you would like your application to do, what programming language you are using and how involved you would like to/need to get in the Low Level MediaCmd structures. No matter which method you choose, the MediaCmd structure packets are exactly the same. Here are the main access methods, with their pros and cons:
Direct Link
Type: Direct link to VVW.dll, libvvw.so, vvw.dylib
Pros: Code compatible with Linux and macOS.
Cons: Uses default configuration from Net-X-Code Server, application must be run in Net-X-Code Server directory. Requires a local copy of Net-X-Code Server software.
Setup: Link to vvw.lib, include vvw.h. Copy application into the Net-X-Code Server directory before running
Issues: Needs access to VVW.dll and all its support DLLs/D1Xs. Still needs to be setup by DDRConfig.exe or Net-X-Code Server
HTTP AJAX / SOAP
Type: XML command interchange with the DDR internal HTTP server, optionally wrapped as SOAP
Pros: Standard, multi language, multi platform.
Cons: Not as fast or efficient as direct connection.
Setup: Standard on version 7 Net-X-Code Server
Issues: SOAP is optional, contact Drastic
Command Line App
Type: Network connection, command line sender
Pros: Standard, multi platform (Windows, macOS, Linux).
Cons: Single command or command list, not interactive.
Setup: Downloadable.
Issues: Command line.
Network DLL
Type: Direct line to vvwNet2.dll, libvvwnet2.so, vvwnet2.dylib
Pros: Consistent interface between local/remote and various OSs. Does not require a local copy of Net-X-Code Server software.
Cons: Requires vvwNet2.dll and support DLLs
Setup: Link to vvwNet2.lib, include vvwNet2.h. Copy DLL set from SDK\bin directory with your application
Issues: Use the netOpenLocal function to avoid Net-X-Code Server configuration issues. Requires a few DLLs to be added to your application installations. Does not run the client software automatically, so your application may need to start it, depending on what your application is doing.
Network Direct
Type: Direct compile of network sources in your application or your DLL.
Pros: No extra DLLs. Easy to customize and modify. Lots of commands already written.
Cons: You application needs to handle setup and may need to run Netxcode.exe
Setup: Copy source files from vvwNet2 into your project, modify and compile
Issues: Does not run the client software automatically, so your application may need to start it, depending on what your application is doing.
Manual
Type: Use the structures and defines to write your own communication and control layer.
Pros: This is required if you are using an unsupported development platform like PHP.
Cons: Everything has to be built and tested from the ground up.
Setup: None.
Issues: Unless you absolutely have to, this method is not recommended.
SDK Structure
The location of the SDK directories will depend on the location you choose during the installation, but the directories within them will always be the same:
\BIN – Copies of the minimum DLL set from a Net-X-Code Server installation.
\LIB – Libraries required to link the vvwNet2.dll, examples and your application
\INC – Header files required to compile vvwNet2.dll, examples and your application
\Src\vwwNet2 – The source to our vvwNet2.dll from Net-X-Code Server
\Src\General – Useful source files that do not compile into examples directly. The most important would be vvwIF.cpp that is the code behind the SDK functions described below.
\Sample – Broken down into subdirectories based on access type
\Direct – Examples that link directly to DLLs
\Java – Java based examples
\HTTP – AJAX based examples (must use Net-X-Code HTTP server to run)
Main Documentation
PDF version of the MediaCmd Documentation
Low Level Header Documentation
PDF version of the MediaCmd headers
HTTP XML AJAX SOAP Documentation
Command Line Documentation
Drastic DDR MediaCmd Command Line
Version 3 (Deprecated) API Documentation
PDF version of the MediaCmd 3 Documentation
Pricing for this SDK is offered in the form of a quote, based on the product you are making, its application and market, and projected quantities. All information provided is considered non-binding and would be treated as confidential.
More great products from Drastic
videoQC will take the media coming into your facility and perform a series of automated tests on video, audio and metadata values against a template, then analyze the audio and video. It includes...
Net-X-Code is a group of IP capture, control, convert and output applications designed to run on one or more servers on your LAN, in the cloud, or as a hybrid....
Drastic's Net-X-Code system includes a partial file restore system, that is available as a standalone server system. The partial file restore system inclu...
Trademarks, Registered Trademarks, and CopyrightsTrademarks, Registered Trademarks, and Copyrights
Drastic Technologies, Ltd. – trademarks specified here.
Iteris, Inc. - Odetics is a registered trademark of Iteris, Inc.
Linus Torvalds - Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microsoft Corporation – Microsoft: Windows®, Video For Windows (VFW), DirectShow, Microsoft, Skype, Microsoft Azure, Microsoft Teams, Wave Mapper, Microsoft, Windows NT|2000|XP|XP Professional|Server 2003|Server 2008 |Server 2012, Windows 7, Windows 8, Media Player, Media Encoder, Windows Defender, Microsoft Office, .Net, Internet Explorer, SQL Server 2005|2008|2012|2014, Windows Media Technologies and Internet Explorer are trademarks of Microsoft Corporation.
Oracle Corporation - Oracle®, Java, Front Porch Digital, and MySQL are registered trademarks of Oracle Corporation and/or its affiliates.
Sony Corporation – Sony, Sony DVD Architect, DVD, Catalyst, and Vegas are trademarks of Sony Corporation and/or its affiliates.
All other trademarks are the property of their respective owners.