Contents
Navigation
Home User Reference Other Resources


QuickTime 4 introduced support for receiving real–time streamed data. That is to say, QuickTime–savvy applications can receive video, audio, and other kinds of data streamed across the Internet. Real–time streaming, unlike the progressive downloading of movie files that has been available since QuickTime 3, can handle live data and does not require downloading potentially huge files onto the user’s computer; this permits QuickTime playback applications to support uses such as video–on–demand and rebroadcast streaming.

The real–time streaming provided by QuickTime 4 was a client–side technology only; it did not provide any means to serve up, or transmit, the data streams. QuickTime 5 provides a set of broadcasting functions that allow us to create transmitter applications. For example, we can take the audiovisual data captured by a camcorder attached to one computer and broadcast that data to other computers on a network. Together, the transmitter technologies provided by QuickTime 5 and the receiver technologies provided by QuickTime 4 give us the complete set of tools we need to send audiovisual streams from one computer and view them on another. The good news here is that we need to know virtually nothing about the applicable IETF specifications to do all this; the really good news is that the amount of code we need to write to create a broadcasting application is surprisingly small. Indeed, we'll be able to write this application using fewer than a dozen of these new broadcasting functions.

The Real–Time Streaming Framework featured by the QTPlugin is a set of classes that allow developers to gain access to both the transmitter and receiver technologies provided by the QuickTime APIs within the Realbasic environment.

The QTPlgStreamPresentation abstract class is part of the Real–Time Streaming Framework and defines the basic properties,methods and events common to any class that deals with the transmission or reception of streamed data.

Using this class requires QuickTime 4.0 or later.







The class has not constructor at all (you can always use the Realbasic common constructor syntax, of course, but you will obtain an usless object). Its destructor, will be implicitly invoked every time one of its derived classes will be destroyed.

Anyway, once a new instance of a class derived from QTPlgStreamPresentation is returned, it is good practice to check the class property to be sure that the new object can be used. An instance of this class is valid if the value of the property is not 0. This happens only after receiving an event (following a call to the method) and before receiving a event.

returns the pointer to the QTSPresentation structure in use. Useful for toolbox programmers; the client must not dispose of this pointer
specifies if the presentation in use is sending or receiving streamed data
specifies if we want QuickTime to create a streaming status handler for the presentation; if we request a status handler, it displays connection and status information in the monitor window (that is, in the with the presentation itself). The kind of informations the status handler will display varies in relation to presentation’s type (that is if the presentation is sending or receiving data). If you set this property to false, you can get status informations either by inspecting the property or by the notified events. Anyway, keep in mind that not every connection or status information is registered by the class
determines the amount of informations returned by the class property. If you want as many as possible informations about the transmission of data in progress, let this property set to false, otherwise set it to true
enables or disables the automatic idling of data streamed across the network. If this property is set to true, then you do not need anymore to use a Timer control to call repeatedly the method while playing data. The internal timer interval is set up to the value of the class property. This property can be modified only if there is no asynchronous data transfer in progress (that is the property is false)
return the status of the currently running presentation (if any). This property returns one of the defined by the class
specifies the number of multimedia streams are currently in use. Note that, in case of a , the number of streams could not be established until the transmission of data has begun (that is you have invoked the method and a event has been issued)
specifies the time interval (in seconds) that must elapse before the statistics about streaming are updated. If you are not interested in this kind of information set this property to 0
if applicable, indicates how far the streaming of data has progressed. Its value ranges between 0.0 and 1.0. If the value of the property is set to kDuration_Infinite (see the section below), then ths property returns always 0.0
specifies the interval (in milliseconds) at which the currently running transmission of data
if applicable, returns temporal informations about the presentation in use. The property is set to the current presentation time, while the reports the duration of the presentation in use
specifies the video and audio characteristics of the presentation and the source of data required for initiating a network connection and transfer of multimedia streams between a server and its clients. You have to set this property with valid parameters before trying to a presentation session. If the presentation in use is , you can use this property to modify the video and audio characteristics of the presentation even while the presentation is running; otherwise, changes done to this property after the initialization of the presentation will be ignored
returns a list of objects that illustrate the course of streaming process; the number of informations returned is determined by the value of the property. Inspecting this property makes sense only after receiving a event; in any other case the returned list will be empty

()
a real–time streaming presentation has been successfully initalized. You should launch a timer process to ensure processing time to the running process here. After receiving this event you can make a call to the method to initiate to receive or send streamed data
()
a request for initiating to receive or send streamed data has been done (using the class method) and the presentation has successfully completed the necessary operations
(percentDone as double)
displays the percent amount of transferred data. The value returned here is the same you can obtain by inspecting the property
()
the statistics about the streaming process in progress have been updated. This event is issued only if the property is set to a value greater than 0
(err as integer)
an error has occurred during the streaming of data. If the occurred error is marked as fatal, the process failed and a event will be issued
()
the presentation in use has been paused
()
the method has been called and the current presentation session has been disposed

()
use this method to initialize a stream presentation in order to begin real–time streaming. You need to specify the required audiovisual characteristics and the sdp data (using the property) before calling this method. Once the presentation has been initialized with success an event is issued and the property is set to
returns nothing. Check the class property for errors
()
once we've created a presentation we need to grant QuickTime some time to process the presentation and detect requests that the streamed data that is to be handle be previewed or displayed in the monitor window. You do this by calling this method periodically. If the property is true, you do not need to call this method
returns nothing. Check the class property for errors
()
use this method to start broadcasting or receiving audiovisual streams. First the presentation prepares the media and performs any necessary handshaking between the transmitter and the receiver; its current is set to . Once this phase completes, the presentation enters into state and an event is issued. Finally, if the transmission of data is really began, you will start to receiving events
returns nothing. Check the class property for errors
()
you can use this method to pause the broadcasting, previewing or displaying performed by the current presentation. If successful, this method causes an event to be issued and the to be set to the state. You can later resume streaming by calling the method once again
returns nothing. Check the class property for errors
()
causes the real–time streaming to be stopped, the curent presentation session to be disposed and a event to be issued. You need to reinitialize the presentation by calling the method if you want to restart data streaming
returns nothing. Check the class property for errors


the duration of the presentation is not defined (i.e. the presentation is broadcasting )

an error has occurred during the streaming of data
the session has not yet initialized (that is to say that the method has not been invoked yet)
the session has been successfully initialized
the session is in preview mode. Note that this state is obtainable only by those classes that
the session has been paused
a request for streaming of data has been issued by the class method; the presentation needs to ready the media for subsequent broadcasting and perform any necessary handshaking between the transmitter (that is, the broadcasting computer) and the client computer or computers. (As you've probably guessed, prerolling a presentation is analogous to prerolling a movie)
the prerolling of media has been completed and the presentation can then begin broadcasting or receiving data
the streaming of data is in progress
the transmission or reception of data has finished