
202
roMimeStream
This object passes an MJPEG stream in MIME format to the roVideoPlayer.PlayFile() method. There are some limitations
to what MJPEG streams this object will play correctly. roMimeStream has been optimized to play streaming video from a
local source with the smallest possible delay. The result is a short buffering window that is not appropriate for playing
MJPEG streams from URLs outside of a local network. We are currently optimizing roMimeStream to work with different
IP camera brands: see the IP Camera FAQ for more details.
Object Creation: To play an RTSP stream, first instantiate an roUrlTransfer object. Then wrap it in an roMimeStream
object and pass the PictureStream to PlayFile, as shown in the following example.
u=createobject("roUrlTransfer")
u.seturl("http://mycamera/video.mjpg")
r=createobject("roMimeStream", u)
p=createobject("roVideoPlayer")
p.PlayFile({ PictureStream: r })
Interfaces: ifPictureStream, ifMessagePort
The ifPictureStream interface provides the following:
• GetUrl() As String
The ifMessagePort interface provides the following:
• SetPort(a As Object) Posts event messages to the attached message port. The event messages are of the
type roMimeStreamEvent and will implement the ifInt interface. There are currently two possible event messages:
o PICTURE_STREAM_FIRST_PICTURE_AVAILABLE = 0: The first picture is now available for decoding.
o PICTURE_STREAM_CONNECT_FAILED: The object is unable to connect to the specified URL.
Comentarios a estos manuales