This class is a handle to a particular node on the Wiretap server to which the Wiretap client is currently connected. More...
Public Types | |
enum | ReadAheadHint { NO_READ_AHEAD = 0, READING_FORWARD = 1, READING_BACKWARD = -1 } |
Public Member Functions | |
bool | activateReadAhead () |
bool | canCreateNode (const char *extendedType, bool &canCreate) const |
Gets if an ASCII metadata stream is associated with the current node. More... | |
bool | createClipNode (const char *displayName, const WireTapClipFormat &clipFormat, const char *extendedType, WireTapNodeHandle &nodeHandle) |
Creates a clip node using an extended type defined by a Wiretap server. More... | |
WIRETAP_DEPRECATED bool | createClipNode (const char *displayName, const WireTapClipFormat &clipFormat, int extendedType, WireTapNodeHandle &nodeHandle) |
Creates a clip node using an integer type defined by the IFFFS Wiretap server. More... | |
bool | createNode (const char *displayName, const char *extendedType, WireTapNodeHandle &nodeHandle) |
Creates a node using an extended type defined by a Wiretap server. More... | |
WIRETAP_DEPRECATED bool | createNode (const char *displayName, int extendedType, WireTapNodeHandle &nodeHandle) |
Creates a node using an integer type defined by the IFFFS Wiretap server. More... | |
bool | destroyNode () |
Destroys the node associated with the current node handle. More... | |
bool | duplicateNode (const WireTapNodeHandle &dupeNode, const char *displayName, WireTapNodeHandle &newNode) |
Creates a duplicate of the supplied node and adds it to this node. More... | |
bool | getAvailableMetaDataStream (int index, WireTapStr &format) const |
Gets the format of an ASCII metadata stream that is associated with the current node. More... | |
bool | getChild (int index, WireTapNodeHandle &child) const |
Gets a child node of the current node by specifying the child's index. More... | |
bool | getClipFormat (WireTapClipFormat &format) const |
Gets the clip format associated with the current clip node. More... | |
bool | getDisplayName (WireTapStr &name) const |
Gets the display name of the current node. More... | |
bool | getFrameId (int frameIndex, WireTapStr &frameId) const |
Gets the identifier of a frame associated with the current clip node. More... | |
bool | getFrameIdPath (int frameIndex, WireTapStr &path) const |
Gets the file path of a frame in the current clip node. More... | |
bool | getIsClipNode (bool &isClipNode) const |
Determines whether the current node is a clip node. More... | |
bool | getIsMetaDataStreamAvailable (const char *streamFormat, bool &isAvailable) const |
Gets if an ASCII metadata stream is associated with the current node. More... | |
bool | getMetaData (const char *streamFormat, const char *filter, const int depth, WireTapStr &metaData) const |
Gets ASCII metadata in a specified format for the current node. More... | |
bool | getNbReadAheads (int &nbReadAheads) const |
WireTapNodeId & | getNodeId () const |
Gets the persistent identifier of the current node. More... | |
WIRETAP_DEPRECATED bool | getNodeType (int &type) const |
Gets the type of the current node expressed as an integer. More... | |
bool | getNodeTypeStr (WireTapStr &type) const |
Gets a string that describes the type of the current node. More... | |
bool | getNumAvailableMetaDataStreams (int &numStreams) const |
Gets the number of ASCII metadata streams that are associated with the current node. More... | |
bool | getNumChildren (unsigned &numChildren) const |
Gets the number of child nodes found under the current node. More... | |
WIRETAP_DEPRECATED bool | getNumChildren (int &numChildren) const |
bool | getNumFrames (unsigned &numberOfFrames) const |
Gets the number of frames of raw data associated with the current node, if it is a clip node. More... | |
WIRETAP_DEPRECATED bool | getNumFrames (int &numberOfFrames) const |
bool | getParentNode (WireTapNodeHandle &parent) const |
Returns the parent node of the current node. More... | |
const WireTapServerHandle & | getServer () const |
Gets a reference to the WireTapServerHandle for the current node. More... | |
bool | getStreamId (WireTapStr &streamId) const |
Gets a string that is the identifier for a raw data stream associated with the node. More... | |
const char * | lastError () const |
Gets the error string for the last operation that failed. More... | |
bool | linkToFrames (const WireTapStr *paths, int numberOfPaths) |
Links to specified file paths in order to soft-import frames to the current clip node. More... | |
WireTapNodeHandle & | operator= (const WireTapNodeHandle &nodeHandle) |
Assignment operator. More... | |
bool | readFrame (int frameIndex, const void *params, unsigned paramsSize, void *buffer, unsigned bufferSize, ReadAheadHint readAheadHint=READING_FORWARD) |
Reads the contents of a frame at a specified index in the current clip node and writes it to a buffer. More... | |
WIRETAP_DEPRECATED bool | readFrame (int frameIndex, void *buffer, int bufferSize, bool noReadAhead=false) |
bool | renameNode (const char *displayName) |
Renames the node associated with the current node handle. More... | |
bool | setMetaData (const char *streamFormat, const char *metaData) const |
Sets ASCII metadata for the current node in a specified format. More... | |
void | setNodeId (const WireTapNodeId &nodeId) |
Sets the persistent identifier of the current node. More... | |
bool | setNumFrames (unsigned numberOfFrames) |
Preallocates the number of frames in the current clip node. More... | |
void | setServer (const WireTapServerHandle &server) |
Sets the WireTapServerHandle for the current node. More... | |
WireTapNodeHandle () | |
Constructs a new WireTapNodeHandle object with no member variables set. More... | |
WireTapNodeHandle (const WireTapNodeHandle &nodeHandle) | |
Copy constructor. More... | |
WireTapNodeHandle (const WireTapServerHandle &server, const WireTapNodeId &nodeId) | |
Constructs a new WireTapNodeHandle object using references to instances of WireTapServerHandle and WireTapNodeId. More... | |
WireTapNodeHandle (const WireTapServerHandle &server, const char *nodeIdStr) | |
Constructs a new WireTapNodeHandle object using a reference to a WireTapServerHandle object and a string that contains a node ID. More... | |
bool | writeFrame (int frameIndex, const void *buffer, int bufferSize) |
Reads the contents of a buffer and writes it to a frame at a specified index in the current clip node. More... | |
virtual | ~WireTapNodeHandle () |
Destructor. More... | |
This class is a handle to a particular node on the Wiretap server to which the Wiretap client is currently connected.
A node represents a directory or file in the file system that is exposed by the Wiretap server.
WireTapNodeHandle uses a node ID and a server handle to uniquely refer to the node. It provides a set of functions to interface with the node via the Wiretap protocol. Node information is read and cached within the node object. The Wiretap Client API is not a distributed object model. The information obtained using a node handles is not updated dynamically. To update the information, the relevant get method(s) must be called.
Nodes come in two flavors: nodes and clip nodes. A clip node is simply a specialization of node.
The Wiretap Client API deliberately dissociates itself from the extensive and dynamic list of node types provided by most proprietary database implementations (for example, project, library, reel, and so on). Wiretap base functionality is confined to generic node manipulation, and to basic clip and frame I/O services.
The interpretation of extended types as well as metadata is the responsibility of the Wiretap client. For example, all nodes have an extended type defined by the implementation of the underlying database on the Wiretap server. A Wiretap client that is aware of the proprietary implementation of the Wiretap server(s) with which it will communicate, can interpret these extended types to provide specific functionality. The vendor, product name, and version of a Wiretap server's database implementation can be obtained from the instance of WireTapServerHandle that represents the connection to the server. In this way, specific products can coordinate private interoperability efforts among themselves, or define public interoperability standards.
WireTapNodeHandle::WireTapNodeHandle | ( | ) |
Constructs a new WireTapNodeHandle object with no member variables set.
WireTapNodeHandle::WireTapNodeHandle | ( | const WireTapNodeHandle & | nodeHandle | ) |
Copy constructor.
Constructs a new WireTapNodeHandle object that duplicates the content of the original.
nodeHandle | An input parameter. The WiretapNodeHandle object that is to be copied. |
WireTapNodeHandle::WireTapNodeHandle | ( | const WireTapServerHandle & | server, |
const WireTapNodeId & | nodeId | ||
) |
Constructs a new WireTapNodeHandle object using references to instances of WireTapServerHandle and WireTapNodeId.
Wiretap clients may need to use this constructor if the storage device on which the node is located has been switched from one Wiretap server to another. In this situation, a Wiretap client that has retained the storage ID along with the node ID, can do the following:
server | An input parameter. A handle to the server on which the node is located. |
nodeId | An input parameter. A WireTapNodeId object that contains the ID of the node for which a handle is to be constructed. |
WireTapNodeHandle::WireTapNodeHandle | ( | const WireTapServerHandle & | server, |
const char * | nodeIdStr | ||
) |
Constructs a new WireTapNodeHandle object using a reference to a WireTapServerHandle object and a string that contains a node ID.
Wiretap clients may need to use this constructor if the storage device on which the node is located has been switched from one Wiretap server to another. In this situation, a Wiretap client that has retained the storage ID and has a string containing a node ID, can do the following:
server | An input parameter. A handle to the server on which the node is located. |
nodeIdStr | An input parameter. A string that contains the ID of the node for which a handle is to be constructed. |
|
virtual |
Destructor.
bool WireTapNodeHandle::activateReadAhead | ( | ) |
bool WireTapNodeHandle::canCreateNode | ( | const char * | extendedType, |
bool & | canCreate | ||
) | const |
Gets if an ASCII metadata stream is associated with the current node.
A Wiretap client can determine if a given metadata stream is available with this method.
extendedType | An input parameter. A string that is one of the extended types defined by the Wiretap server on which the node is to be created. |
canCreate | An output parameter. The method fills this parameter to true if the extended type is a valid type of child for the current node. |
bool WireTapNodeHandle::createClipNode | ( | const char * | displayName, |
const WireTapClipFormat & | clipFormat, | ||
const char * | extendedType, | ||
WireTapNodeHandle & | nodeHandle | ||
) |
Creates a clip node using an extended type defined by a Wiretap server.
This is the preferred method for instanting a clip node. The other method for creating clip nodes (using an integer for the extended type) is deprecated.
To create a node that is not a clip node, see WireTapNodeHandle.createNode
displayName | An input parameter. The name to use as a label on the node in a user interface. Display names do not have to be unique. |
clipFormat | An input/output parameter. On input, a Wiretap client should supply an instance of WireTapClipFormat whose properties are set to appropriate values. On output, the Wiretap server will have set certain properties such as buffer size. |
extendedType | An input parameter. A string that is one of the extended types defined by the Wiretap server on which the node is to be created. |
nodeHandle | An output parameter. The method fills this parameter with an instance of WireTapNodeHandle with the specified display name, clip format, and extended type. |
WIRETAP_DEPRECATED bool WireTapNodeHandle::createClipNode | ( | const char * | displayName, |
const WireTapClipFormat & | clipFormat, | ||
int | extendedType, | ||
WireTapNodeHandle & | nodeHandle | ||
) |
Creates a clip node using an integer type defined by the IFFFS Wiretap server.
bool WireTapNodeHandle::createNode | ( | const char * | displayName, |
const char * | extendedType, | ||
WireTapNodeHandle & | nodeHandle | ||
) |
Creates a node using an extended type defined by a Wiretap server.
This is the preferred method for instantiating any node that is not a clip. The other method for creating non-clip nodes (using an integer for the extended type) is deprecated.
To create a clip node, use WireTapNodeHandle.createClipNode( const char *displayName, const &WireTapClipFormat &f, const char *extendedType, &WireTapNodeHandle &node_return ).
displayName | An input parameter. The name to use as a label on the node in a user interface. Display names do not have to be unique. |
extendedType | An input parameter. A string that is one of the extended types defined by the Wiretap server on which the node is to be created. |
nodeHandle | An output parameter. The method fills this parameter with an instance of WireTapNodeHandle with the specified display name and extended type. |
WIRETAP_DEPRECATED bool WireTapNodeHandle::createNode | ( | const char * | displayName, |
int | extendedType, | ||
WireTapNodeHandle & | nodeHandle | ||
) |
Creates a node using an integer type defined by the IFFFS Wiretap server.
bool WireTapNodeHandle::destroyNode | ( | ) |
Destroys the node associated with the current node handle.
bool WireTapNodeHandle::duplicateNode | ( | const WireTapNodeHandle & | dupeNode, |
const char * | displayName, | ||
WireTapNodeHandle & | newNode | ||
) |
Creates a duplicate of the supplied node and adds it to this node.
dupeNode | The node to be duplicated |
displayName | The display name to apply to the duplicated node |
newNode | A reference to the new, duplicated node |
bool WireTapNodeHandle::getAvailableMetaDataStream | ( | int | index, |
WireTapStr & | format | ||
) | const |
Gets the format of an ASCII metadata stream that is associated with the current node.
After determining how many metadata streams are available using the WireTapNodeHandle.getNumAvailableMetaDataStreams method, a Wiretap client can iterate on the stream indexes to get the formats of the metadata streams (using this method) or to get the actual metadata (using WireTapNodeHandle.getMetaData).
If the format of the metadata stream is already known, the actual stream can be obtained directly with the WireTapNodeHandle.getMetaData method.
index | An input parameter. The index of the metadata stream to be queried. |
format | An output parameter. The method fills this parameter with a WireTapStr object that is the format of the metadata (for example, XML). |
bool WireTapNodeHandle::getChild | ( | int | index, |
WireTapNodeHandle & | child | ||
) | const |
Gets a child node of the current node by specifying the child's index.
The total number of child nodes for the current node is obtained by calling WireTapNodeHandle.getNumChildren.
index | An input parameter. Node indexes start at 0. An index less than zero or equal to the total number of children (obtained by calling WireTapNodeHandle.getNumChildren) will cause an error. |
child | An output parameter. The method fills this parameter with an instance of WireTapNodeHandle for the node at the specified index. |
bool WireTapNodeHandle::getClipFormat | ( | WireTapClipFormat & | format | ) | const |
Gets the clip format associated with the current clip node.
This method fails if the current node is not a clip node.
format | An output parameter. The method fills this parameter with a WireTapClipFormat object of the type set when the node was created. |
bool WireTapNodeHandle::getDisplayName | ( | WireTapStr & | name | ) | const |
Gets the display name of the current node.
name | An output parameter. The method fills this parameter with a WireTapStr object containing the display name for the node. Display names need not be unique. |
bool WireTapNodeHandle::getFrameId | ( | int | frameIndex, |
WireTapStr & | frameId | ||
) | const |
Gets the identifier of a frame associated with the current clip node.
This method fails if the current node is not a clip node.
The total number of frames in the clip can be obtained with the method WireTapNodeHandle.getNumFrames.
The frame ID (obtained with this method) and the frame file path (obtained with WireTapNodeHandle.getFrameIdPath) allow Wiretap clients to access the raw frame directly rather than through the Wiretap server TCP connection. Depending on the bandwidth of the direct connection to the storage device, a significant gain in performance can be achieved.
frameIndex | An input parameter. The index of the frame whose ID is being sought. The total number of frames in the clip is obtained with the method WireTapNodeHandle.getNumFrames. |
frameId | An output parameter. The method fills this method with a WireTapStr object that contains the frame identifier. |
bool WireTapNodeHandle::getFrameIdPath | ( | int | frameIndex, |
WireTapStr & | path | ||
) | const |
Gets the file path of a frame in the current clip node.
This method fails if the current node is not a clip node.
The total number of frames in the clip can be obtained with the method WireTapNodeHandle.getNumFrames.
The frame ID (obtained with WireTapNodeHandle.getFrameId) and the file path (obtained with this method) allow clients to access the raw frame directly rather than through the Wiretap server TCP connection. Depending on the bandwidth of the direct connection to the storage device, a significant gain in performance can be achieved.
frameIndex | An input parameter. The index of the frame whose frame path is sought. |
path | An output parameter. The method fills this method with a WireTapStr object that contains the file path of the frame. If the file path is not available, the path will be set to the empty string. |
bool WireTapNodeHandle::getIsClipNode | ( | bool & | isClipNode | ) | const |
Determines whether the current node is a clip node.
isClipNode | An output parameter. The method sets this parameter to true if the node is a clip node, or sets it to false if the node is not a clip node. |
bool WireTapNodeHandle::getIsMetaDataStreamAvailable | ( | const char * | streamFormat, |
bool & | isAvailable | ||
) | const |
Gets if an ASCII metadata stream is associated with the current node.
A Wiretap client can determine if a given metadata stream is available with this method.
streamFormat | An input parameter. A string that describes the the format of the stream. For example, to set XML format metadata for a project or user node on an IFFFS Wiretap server, this parameter should be set to "XML". |
isAvailable | An output parameter. The method fills this parameter to true if the stream is available for the current node. |
bool WireTapNodeHandle::getMetaData | ( | const char * | streamFormat, |
const char * | filter, | ||
const int | depth, | ||
WireTapStr & | metaData | ||
) | const |
Gets ASCII metadata in a specified format for the current node.
Wiretap clients can use this method directly if the desired type of metadata is known (for example, "XML"). If the desired type of metadata stream is not known or if there are multiple metadata streams, the available metadata stream(s) for the current node can be iterated through and obtained with a combination of methods:
Not all nodes have ASCII metadata associated with them. See the Wiretap Developer's Guide for more information about the types of nodes that support metadata and which metadata formats they support.
streamFormat | An input parameter. A string that describes the format of the stream. For example, to get XML format metadata for a project or user node on an IFFFS Wiretap server, this parameter should be set to "XML". |
filter | An input parameter. A string that is the name of an element in the metadata stream. For some node types, it is possible to select individual elements in the metadata stream. See the Wiretap Developer's Guide for more information. To get the entire metadata stream, set this parameter to an empty string (""). |
depth | An input parameter. An integer that specifies how many levels to recurse within the metadata structure. Not all nodes or metadata streams support this parameter. See the Wiretap Developer's Guide for more information. |
metaData | An output parameter. The method fills this parameter with a WireTapStr object that contains the metadata for the node as an ASCII string. |
bool WireTapNodeHandle::getNbReadAheads | ( | int & | nbReadAheads | ) | const |
WireTapNodeId& WireTapNodeHandle::getNodeId | ( | ) | const |
Gets the persistent identifier of the current node.
WIRETAP_DEPRECATED bool WireTapNodeHandle::getNodeType | ( | int & | type | ) | const |
Gets the type of the current node expressed as an integer.
type | An output parameter. The method sets this parameter to the integer value for the extended node type. Each Wiretap server defines its own extended node types. The default value (for a node with no extended type) is 0. |
bool WireTapNodeHandle::getNodeTypeStr | ( | WireTapStr & | type | ) | const |
Gets a string that describes the type of the current node.
type | An output parameter. The method fills this parameter with a WireTapStr object that gives access to the node type as a string. This could be the value entered when the node was created or on of the extended node types defined by the Wiretap server. Each Wiretap server defines its own extended node types. |
bool WireTapNodeHandle::getNumAvailableMetaDataStreams | ( | int & | numStreams | ) | const |
Gets the number of ASCII metadata streams that are associated with the current node.
A Wiretap client can determine the number of metadata streams that are available with this method, and then it can iterate and obtain the stream types (using the WireTapNodeHandle.getAvailableMetaDataStream method) and the actual metadata (using the WireTapNodeHandle.getMetaData method).
numStreams | An output parameter. The method fills this parameter with the number of metadata streams that are available for the current node. |
bool WireTapNodeHandle::getNumChildren | ( | unsigned & | numChildren | ) | const |
Gets the number of child nodes found under the current node.
numChildren | An output parameter. The method fills this parameter with the number of child nodes of the current node. |
WIRETAP_DEPRECATED bool WireTapNodeHandle::getNumChildren | ( | int & | numChildren | ) | const |
bool WireTapNodeHandle::getNumFrames | ( | unsigned & | numberOfFrames | ) | const |
Gets the number of frames of raw data associated with the current node, if it is a clip node.
numberOfFrames | An output parameter. The number of frames that are in the clip. |
WIRETAP_DEPRECATED bool WireTapNodeHandle::getNumFrames | ( | int & | numberOfFrames | ) | const |
bool WireTapNodeHandle::getParentNode | ( | WireTapNodeHandle & | parent | ) | const |
Returns the parent node of the current node.
parent | An output parameter. The method fills this parameter with an instance of WireTapNodeHandle for the parent node. |
const WireTapServerHandle& WireTapNodeHandle::getServer | ( | ) | const |
Gets a reference to the WireTapServerHandle for the current node.
A node handle and a node ID are only valid in the context of the server under which they were created. A node's server is normally set when the node handle is created (by methods such as WireTapNodeHandle.createNode, WireTapNodeHandle.createClipNode, WireTapServerHandle.getRootNode).
bool WireTapNodeHandle::getStreamId | ( | WireTapStr & | streamId | ) | const |
Gets a string that is the identifier for a raw data stream associated with the node.
streamId | An output parameter. A string that is the identifier for the raw data stream associated with the node. If the node does not have a raw data stream associated with it, or if the Wiretap server does not support raw data streams, an empty string ("") is returned. |
const char* WireTapNodeHandle::lastError | ( | ) | const |
Gets the error string for the last operation that failed.
Wiretap clients can obtain this error message for any member function that returns a boolean. The strings can be localized if required. See the Wiretap Developer's Guide.
bool WireTapNodeHandle::linkToFrames | ( | const WireTapStr * | paths, |
int | numberOfPaths | ||
) |
Links to specified file paths in order to soft-import frames to the current clip node.
This method fails if the current node is not a clip node.
The clip node must be empty when this method is called. The frame formats of the individual frame files must match the clip format of the clip node or an error will be generated. The frame paths are automatically translated to use the native mount point of the server, using the Wiretap path translation services.
paths | An input parameter. A WireTapStr object that points to an array of paths for the frame files to be linked to. |
numberOfPaths | An input parameter. The number of frame paths that are in the paths parameter. |
WireTapNodeHandle& WireTapNodeHandle::operator= | ( | const WireTapNodeHandle & | nodeHandle | ) |
Assignment operator.
Initializes a WireTapNodeHandle object that duplicates the content of the original.
nodeHandle | An input parameter. The WiretapNodeHandle object that is to be copied. |
bool WireTapNodeHandle::readFrame | ( | int | frameIndex, |
const void * | params, | ||
unsigned | paramsSize, | ||
void * | buffer, | ||
unsigned | bufferSize, | ||
ReadAheadHint | readAheadHint = READING_FORWARD |
||
) |
Reads the contents of a frame at a specified index in the current clip node and writes it to a buffer.
This method fails if the current node is not a clip node.
Wiretap clients can call WireTapNodeHandle.getNumFrames to determine the number of frames to be read from the node. Then they would iterate through the frames and call this method to read the frames from the buffer. The sample program readFrames.cpp (which is included in the SDK) shows how to use this method.
frameIndex | An input parameter. The index of the frame to be read. Frame indexes start at 0. An index less than zero or equal to the number of available frames (obtained by calling WireTapNodeHandle.getNumFrames) will generate an error. |
params | An input parameter. Contains black data on the parameter to use to decode and read the frame. Might be 0 if none needed. |
paramsSize | An input parameter. The number of bytes in the the buffer to be used as the read parameters. |
buffer | An input parameter. The buffer to which the frame will be written. This value cannot be NULL. |
bufferSize | An input parameter. The number of bytes in the the buffer to be used for the frame. The buffer size must be equal to or greater than the value obtained from the WireTapClipFormat object for the node. The sample program readFrames.cpp (included in the SDK) shows how to find the minimum buffer size. |
readAheadHint | By default, the next frames in the clip sequence will be sent to the server as a hint to prepare (i.e. read ahead) and decode the next frame. Setting this parameter to NO_READ_AHEAD will disable this functionality. This option would normally be used when generating a thumbnail. Setting this parameter to READING_BACKWARD will resverse the direction of the 'next frame'. |
WIRETAP_DEPRECATED bool WireTapNodeHandle::readFrame | ( | int | frameIndex, |
void * | buffer, | ||
int | bufferSize, | ||
bool | noReadAhead = false |
||
) |
bool WireTapNodeHandle::renameNode | ( | const char * | displayName | ) |
Renames the node associated with the current node handle.
This method can be used to change the display name of a node.
displayName | An input parameter. The name to use as a label on the node in a user interface. |
bool WireTapNodeHandle::setMetaData | ( | const char * | streamFormat, |
const char * | metaData | ||
) | const |
Sets ASCII metadata for the current node in a specified format.
Not all nodes can have ASCII metadata associated with them. See the Wiretap Developer's Guide for more information about the types of nodes that support metadata and which metadata formats they support.
streamFormat | An input parameter. A string that describes the the format of the stream. For example, to set XML format metadata for a project or user node on an IFFFS Wiretap server, this parameter should be set to "XML". |
metaData | An input parameter. A WireTapStr object containing an ASCII string that defines the metadata to associate with the node. |
void WireTapNodeHandle::setNodeId | ( | const WireTapNodeId & | nodeId | ) |
Sets the persistent identifier of the current node.
nodeId | A WireTapNodeId object that contains the persistent identifier of the node. |
bool WireTapNodeHandle::setNumFrames | ( | unsigned | numberOfFrames | ) |
Preallocates the number of frames in the current clip node.
This method fails if the current node is not a clip node.
numberOfFrames | An input parameter. The number of frames to allocate for the clip. |
void WireTapNodeHandle::setServer | ( | const WireTapServerHandle & | server | ) |
Sets the WireTapServerHandle for the current node.
A node handle and a node ID are only valid in the context of the server under which they were created. A node's server is normally set when the node handle is created (by any number of methods such as WireTapNodeHandle.createNode, WireTapNodeHandle.createClipNode, WireTapServerHandle.getRootNode, WireTapServerList.getNode). Wiretap clients should not need to call this method in normal circumstances.
server | An input parameter. A reference to the WireTapServerHandle for the current node. |
bool WireTapNodeHandle::writeFrame | ( | int | frameIndex, |
const void * | buffer, | ||
int | bufferSize | ||
) |
Reads the contents of a buffer and writes it to a frame at a specified index in the current clip node.
This method fails if the current node is not a clip node.
Wiretap clients can call WireTapNodeHandle.getNumFrames to obtain the number of frames in the clip node. Then they would this method to write the frames to the buffer. The sample program createClip.cpp (which is included in the SDK) shows how to use this method.
frameIndex | An input parameter. The index of the frame to be written. |
buffer | An output parameter. The buffer from which the frame will be read. This value cannot be NULL. |
bufferSize | An input parameter. The number of bytes in the the buffer to be used for the frame. The buffer size must be equal to or greater than the value obtained from the WireTapClipFormat object for the node. The sample program createClip.cpp (included in the SDK) shows how to find the minimum buffer size. |