dmuVideo

Inherits from: dmuObj

#include "dmuVideo.h"

Overview

The dmuVideo class acts as a base class for video I/O in libdmu. This class handles functions that are associated with the VL video server and a single VL video path. The path has one source node and one drain node (man vlintro for more information on VL nodes and paths). This object also maintains VL control values such as frame size, zoom factor, packing mode, etc.. Most of these controls can be set and queried using methods outlined below. In the current implementation, these controls values must be set before the video transfer begins. Later versions should allow run-time control over these variables

This object handles the starting and stopping of the video transfer along the path. The start method begins the transfer, and destruction of the object ends the transfer. Later implementations will allow the transfer to be interrupted and restarted while it is running

Video objects should be created and used in the following manner:

  • Construct a video object - dmuVideo should never be instantiated directly. Use a subclass like dmuVideoIn
  • Create the video path using the setup() method
  • Set any non-default control values (using set methods). For example, the video size should be set to crop and/or zoom to a texture-compatible size if the video will be used as a texture map. Note - There are known problems with capturing video into graphics-mode dmbuffers that are non-square in size. The best parameters for texture mapping are: 512x512, with the video origin set to 32.
  • Wire into standard dmu object chain (see Overview for details)
  • Start the video transfer using the start() method.
  • Handle events as discussed in the Overview section.

    The dmuVideo object also maintains an open connection to the video server. This connection is a static method for dmuVideo, and is opened upon the first construction of a dmuVideo object (or any object that inherits from the dmuVideo), and closed when all dmuVideo objects are destroyed. The server is shared by all dmuVideo objects in the same process. Users of any dmuVideo class do not need to worry about opening or closing video server connections.

    See the source code for more info and implementation details.

    Public Methods


    Overview    Object List     Object Hierarchy       Sample Apps