Index

DKStreamICM

Purpose:

DKStreamICM represents streamable resource objects in Content Manager. A resource object consists of content stored in a resource manager and the metadata describing the content stored in the library server of Content Manager. DKStreamICM is a subclass of dkResource and DKLobICM, therefore inherits the properties of a resource object defined by these classes. This class extends its superclasses with properties and behaviors specific for streamable large objects, including the following:

Important: This class represents a generic streamable object. For video stream objects the video specific subclass, DKVideoStream should be used.

See Also: DKLobICM

Since: Version 8

Class summary:

class DKEXPORT DKStreamICM : public DKStreamICM  
{
  public:
 
   DKStreamICM();
   DKStreamICM(DKDatastoreICM* aDatastore);
   DKStreamICM(DKDatastoreICM* aDatastore, DKByteArray *pByteArray);
   DKStreamICM(const DKStreamICM& aDKStreamICM);
   virtual ~DKStreamICM();
 
    void setStreamAccessMode(DKString mode);
   void setStreamGroup(DKString group);
   void setPlayStart(DKString starttime);
   void setPlayStop(DKString stoptime);
   DKString getStreamAccessMode();
   DKString getPlayStart();
   DKString getPlayStop();
   void setStreamMediaState( int mediastate);
   void setStreamExtObjectName( DKString extobjname);
   void setStreamFormat(DKString streamformat);
   void setStreamCopyRate( int copyrate);
   void setStreamNumUsers( int numusers);
   void setStreamInvalidCommands( int mediainvcmds);
 
   int getStreamDuration();
   int getStreamMediaState();
   DKString getStreamExtObjectName();
   DKString getStreamFormat();
   int getStreamCopyRate();
   int getStreamNumUsers();
   int getStreamInvalidCommands();
   int setStreamBitrate();
   DKString getStreamGroup();
   virtual dkXDO* cloneSkeleton();
   virtual char* retrieveStreamInfo();
};

Members:

Constructors and destructor

DKStreamICM(); Default constructor for streamable resource objects. Parameters: None.

DKStreamICM(DKDatastoreICM* aDatastore); Constructs a streamable resource object associated with the specified datastore. Equivalent to calling the default constructor followed by the setDatastore method. Parameters: aDatastore - the associated datastore as an instance of DKDatastoreICM.

DKStreamICM(DKDatastoreICM* aDatastore, DKByteArray *pByteArray); Constructs a streamable resource object associated with the datastore, then sets the initial content to the contents of string variable. Parameters: aDatastore - The associated datastore as an instance of DKDatastoreICM. pByteArray - The byte array as the initial content of the text resource.

DKStreamICM(const DKStreamICM& aDKStreamICM); The copy constructor for this object. Parameters: aDKStreamICM - instance of DKStreamICM to be used as a template for constructing this streamable resource object.

virtual ~DKStreamICM(); Destructor for this object.

Member Functions

setStreamAccessMode
Sets the access mode value for retrieving this stream. The access mode value can be either SHARED or EXCLUSIVE. Specifying the stream access mode is optional. The default value is SHARED. Parameters: mode - the access mode, the value can be either SHARED or EXCLUSIVE. Returns: None. Memory Management: None.
void setStreamAccessMode(DKString mode);

setStreamGroup
Sets the name of the asset group into which this stream will be stored into in the Video Charger. The group name is alphanumeric and can be upto 120 characters inlength. Specifying this value is optional, and the default is AG. The asset group specified as the input parameter to this method must exist on the Video Charger. Parameters: group - the name of the asset group to store this stream into. Returns: None. Memory Management: None.
void setStreamGroup(DKString group);

setPlayStart
Sets the time at which to start streaming this content object. The value is an offset from the beginning of the stream. The format is hh:mm:ss:ff. If this value is not specified or if set to 00:00:00:00, the content is streamed from the beginning. This method is usually used in conjunction with the setPlayStop method (See setPlayStop(DKString stoptime)). Parameters: starttime - the time at which to start playing the content in the stream. Returns: None. Memory Management: None.
void setPlayStart(DKString starttime);

setPlayStop
Sets the time at which to stop streaming this content object. The value is an offset from the time at which the stream started playing. The format is hh:mm:ss:ff. If the value is not specified or if set to 00:00:00:00, the content is streamed from the beginning. This method is usually used in conjunction with the setPlayStartMethod (See setPlayStart( DKString starttime)). Parameters: stoptime - the time at which to stop playing the content. Returns: None. Memory Management: None.
void setPlayStop(DKString stoptime);

getStreamAccessMode
Retrieves the value for the access mode used retrieving this stream. The access mode value is either SHARED or EXCLUSIVE. Parameters: None. Returns: mode - the access mode. Memory Management: None.
DKString getStreamAccessMode();

getPlayStart
Gets the value of the play start time for this stream. Parameters: None. Returns: The start time in the format hh:mm:ss:ff. Memory Management: None.
DKString getPlayStart();

getPlayStop
Gets the value of the play stop time for this stream. Parameters: None. Returns: The stoptime in the format hh:mm:ss:ff. Memory Management: None.
DKString getPlayStop();

setStreamMediaState
Sets the value of the media state for a stream clip. The media state can be any information regarding the state of the media. Pending, Complete etc.. Specifying this value is optional. Parameters: mediastate - the media state for this stream. Returns: None. Memory Management: None.
void setStreamMediaState(int mediastate);

setStreamExtObjectName
Sets the value of the external object name that representsthis streamable resource . An external object name is a string identifier value assigned for this object. If the external object name is not specified, CM will assign one by default. For Content Manager managed stores, this is always automatically assigned. Parameters: extobjname - the external object name. Returns: None. Memory Management: None.
void setStreamExtObjectName(DKString extobjname);

setStreamFormat
Sets the value of the the streaming type for this object. The type could be either SYSTEM(default) or PROGRAM or TRANSPORT. Specifying this value is optional. Parameters: streamformat - the streaming type for this stream object. Returns: None. Memory Management: None.
void setStreamFormat(DKString streamformat);

setStreamCopyRate
Sets the value for the copy rate in number of bits per second at which this resource is transferred from or to persistent storage.Specifying this value is optional. Parameters: copyrate - the copy rate in bits per second. Returns: None. Memory Management: None.
void setStreamCopyRate(int copyrate);

setStreamNumUsers
Sets the value for the maximum number of concurrent users allowed to stream this object. Specifying this value is optional. Parameters: numusers - the number of concurrent users. Returns: None. Memory Management: None.
void setStreamNumUsers(int numusers);

setStreamInvalidCommands
Sets the value for the media invalid commands as a media player control mask for a stream item. Specifying this value is optional. Parameters: mediainvcmd - the media invalid commands. Returns: None. Memory Management: None.
void setStreamInvalidCommands(int mediainvcmds);

getStreamDuration
Retrieves the duration to play the stream clip, in seconds. Parameters: None. Returns: The duration to play the clip. Memory Management: None.
 int getStreamDurations();

getStreamMediaState
Retrieves the stream media state value. Parameters: None. Returns: The media state of this stream. Memory Management: None.
 int getStreamMediaState();

getStreamExtObjectName
Retrieves the value of the external object name for this stream. Parameters: None. Returns: The external object name for this stream. Memory Management: None.
DKString getStreamExtObjectName();

getStreamFormat
Retrieves the stream format or the streaming type of this stream. The returned value could be one of the following: SYSTEM, PROGRAM, or TRANSPORT. Parameters: None. Returns: The stream format for this stream. Memory Management: None.
DKString getStreamFormat();

getStreamCopyRate
Retrieves the value for the copy rate in number of bits per second at which this resource is stored. Parameters: None. Returns: The copy rate, in bits per second. Memory Management: None.
 int getStreamCopyRate();

getStreamNumUsers
Retrieves the value for the maximum number of concurrent users allowed to stream this object. Parameters: None. Returns: The maximum number of concurrent users. Memory Management: None.
int getStreamNumUsers();

getStreamInvalidCommands
Retrieves the stream invalid commands value for this stream from the pesistent store. Parameters: None. Returns: The invalid commands, an integer. Memory Management: None.
int getStreamInvalidCommands();

getStreamBitRate
Gets the recommended bit rate for the stream as set in the Content Manager library server.

Parameters: None

Returns: The bit rate as an integer.

Memory management: None

int getStreamBitRate();

getStreamBitRate
Gets the asset group name used to store this stream into the VideoCharger.

Parameters: None

Returns: group - The name of the group used to store this stream.

Memory management: None

DKString getStreamGroup();

retrieveStreamInfo
This method is used to obtain meta data for establishing an asynchronous streaming of streamable content between a streaming server and a player. This request, along with the necessary parameters, is passed to the CM Resource Manager, which retrieves this meta data from the streaming server. The meta data can be passed to a player to establish the stream session. If the start and stop time for the content to stream is not specified, the entire content will be streamed. Parameters: None. Returns: A character pointer containing the stream session meta data information. Memory Management: After usage, the user is responsible to free the buffer pointed to by the output character pointer.
char * retrieveStreamInfo();

extractMimeTypeForStreamInfo
Extracts and returns the mime type from the meta data returned by the retrieveStreamInfo and the play methods. Parameters: A String containing the meta data retrieved from a Video Charger server. Returns: The mime type string. Memory Management: None.
char * extractMimeTypeFromStreaminfo( DKString streamInfo);

(c) Copyright International Business Machines Corporation 1996, 2003. IBM Corp. All rights reserved.