Merlin 2003 DV and MPEG-2 Recorder and Dual Stream Decoder
Page 47
Appendix C
Writing your own Applications
There are 2 Methods of interfacing to the Merlin2003 hardware. The first is though a high level interface that
handles all file I/O and buffer management. The second method is through a lower level interface. The higher level
interface is good for simple play and capture applications that only need to create files in elementary formats. The
Merlin application was written using this interface. The lower level interface does not handle file I/O or buffer
management but allows for much more control of the data going to and from the Merlin2003 hardware. This is
good for applications that require handling the data as it becomes available from the hardware. The Batch recorder
was written using this interface because it required more control of the data that is stored to files. Another example
of an application that may require the lower level interface are network applications that may not want the data
stored to a file. Example source code using both interfaces will be demonstrated. Source code examples using the
high level interface are in the SDK directory on the install CD under a directory called Windows\ExampleIF1.
Source code examples using the low level interface as well as the source code to the BRec application are under a
directory called Windows\ExampleIF2.
C.0 Example Source Code using Method 1
The first example is a simple MFC 6.0 dialog application with minimal code added. The application has only four
push buttons that selects a video filename, play a file, record to a file, and stop playing or recording a file. There is