AVBlocks for C++
2.1
Audio and Video Software Development Kit
|
An input or output point of the Transcoder. More...
Public Member Functions | |
virtual MediaSocket * | clone () const =0 |
Creates a deep copy of this object. More... | |
virtual const char_t * | file () const =0 |
Returns the file associated with the media socket and previously set via setFile(). More... | |
virtual bool_t | immutable () const =0 |
Returns whether the object is immutable. More... | |
virtual primo::codecs::Metadata * | metadata () const =0 |
Returns the socket metadata. More... | |
virtual ParameterList * | params () const =0 |
Returns a collection of socket parameters. More... | |
virtual MediaPinList * | pins () const =0 |
Returns a modifiable collection with all the pins (elementary streams) that are defined for this socket. More... | |
virtual bool_t | setFile (const char_t *filename)=0 |
Sets the file associated with the media socket. More... | |
virtual bool_t | setMetadata (primo::codecs::Metadata *metadata)=0 |
Sets the socket metadata. More... | |
virtual bool_t | setParams (ParameterList *params)=0 |
Sets the socket parameters. More... | |
virtual bool_t | setStream (primo::Stream *stream)=0 |
Sets the user stream associated with the media socket. More... | |
virtual bool_t | setStreamSubType (primo::codecs::StreamSubType::Enum streamSubType)=0 |
Sets explicitly the stream subtype of the associated file or user stream. More... | |
virtual bool_t | setStreamType (primo::codecs::StreamType::Enum streamType)=0 |
Sets explicitly the format of the associated file or stream. More... | |
virtual bool_t | setTimePosition (double time)=0 |
Sets the socket time position. More... | |
virtual primo::Stream * | stream () const =0 |
Returns the associated user stream previously set via setStream(). More... | |
virtual primo::codecs::StreamSubType::Enum | streamSubType () const =0 |
Returns the stream subtype of the associated file or user stream. More... | |
virtual primo::codecs::StreamType::Enum | streamType () const =0 |
Returns the stream type of the associated file or user stream. More... | |
virtual double | timePosition () const =0 |
Returns the socket time position. More... | |
Public Member Functions inherited from Reference | |
virtual int32_t | release () const =0 |
Releases the instance. More... | |
virtual int32_t | retain () const =0 |
Retains the instance. More... | |
virtual int32_t | retainCount () const =0 |
Returns the current reference count. More... | |
Protected Member Functions | |
~MediaSocket () | |
This object can be destroyed only by the AVBlocks library. | |
An input or output point of the Transcoder.
A MediaSocket object describes either a container (WAV, AVI, MP4, etc.) with one or more streams or simply an elementary stream (MP3, M2V, etc.).
When MediaSocket describes a container the child collection of media pins can contain one or more items (for each contained stream). The socket stream type designates the container type.
When MediaSocket describes an elementary stream the child collection of media pins contains a single item which is the elementary stream itself. The socket stream type is the same as the pin stream type.
|
pure virtual |
Creates a deep copy of this object.
|
pure virtual |
Returns the file associated with the media socket and previously set via setFile().
|
pure virtual |
Returns whether the object is immutable.
An immmutable object cannot be modified and all modifying methods return FALSE.
|
pure virtual |
Returns the socket metadata.
|
pure virtual |
Returns a collection of socket parameters.
These parameters are used when splitting the input or multiplexing the output defined by this media socket.
The caller is not required to release the returned object.
|
pure virtual |
Returns a modifiable collection with all the pins (elementary streams) that are defined for this socket.
The returned collection exists only in the context of MediaSocket. The caller cannot influence the lifetime of the returned object.
|
pure virtual |
Sets the file associated with the media socket.
filename | [in] a filename as a Unicode zero terminated string. If NULL the filename is cleared. When not NULL the filename is copied internally and is not required after the method returns. |
|
pure virtual |
Sets the socket metadata.
When an output socket has metadata the transcoder tries to generate it regardless of the input metadata. When an output socket has no metadata (NULL) but an input socket has metadata (not NULL) the transcoder uses the input metadata as if it is set for the output.
metadata | [in] A pointer to a Metadata object. Can be NULL in which case the metadata is cleared from the socket. |
|
pure virtual |
Sets the socket parameters.
params | [in] A pointer to a ParameterList object. If NULL the stored collection is reset to NULL. Internally the ParameterList object is retained by MediaSocket, so it is safe to release it after this method returns. |
|
pure virtual |
Sets the user stream associated with the media socket.
This is an alternative to setFile().
stream | [in] A pointer to a Stream object. If NULL the stream object is cleared. Internally the Stream object is retained by MediaSocket, so it is safe to release it after this method returns. |
When both a file and a user stream are associated with a socket the transcoder prefers the stream.
|
pure virtual |
Sets explicitly the stream subtype of the associated file or user stream.
|
pure virtual |
Sets explicitly the format of the associated file or stream.
streamType | [in] stream type such as AVI, WAV, MP4, etc. |
The Transcoder uses this format and the associated file or stream according to following rules:
File | Stream | Type | How MediaSocket is treated by Transcoder |
Y | N | N | OK - the socket defines a file whose type is implicitly determined by the file extension. |
Y | N | Y | OK - the socket defines a file whose type is explicitly specified by the stream type. |
Y,N | Y | Y | OK - the socket defines a user stream whose type is explicitly specified. |
Y,N | Y | N | Error - the socket defines a user stream but its type is unknown. |
N | N | Y | OK - the socket does not have a physical storage. it only describes the input/output data. This is the required definition for input sockets when the push() method is used and also the required definition for output sockets when the pull() method is used. |
N | N | N | Error - undefined socket. |
|
pure virtual |
Sets the socket time position.
This property can be used on an input socket to start reading / decoding from a specific point in time. The transcoder tries to seek in the input socket to the time position before the transcoding operation starts.
Seeking is not possible while transcoder is open. Transcoder need to be closed before setting new time possition.
time | [in] Time position in seconds. |
|
pure virtual |
Returns the associated user stream previously set via setStream().
|
pure virtual |
Returns the stream subtype of the associated file or user stream.
|
pure virtual |
Returns the stream type of the associated file or user stream.
|
pure virtual |
Returns the socket time position.
This property can be used on an input socket to start reading / decoding from a specific point in time. The transcoder tries to seek in the input socket to the time position before the transcoding operation starts.