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 })
ifPictureStream
GetUrl() As String
ifUserData
SetUserData(user_data As Object)
Sets the user data that will be returned when events are raised.
GetUserData() As Object
Returns the user data that has previously been set via SetUserData()
. It will return Invalid
if no data has been set.
ifMessagePort
SetPort(port As roMessagePort)
Posts event messages to the attached message port. The event messages are of the type roMimeStreamEvent. There are currently two possible event messages:
PICTURE_STREAM_FIRST_PICTURE_AVAILABLE = 0: The first picture is now available for decoding.
PICTURE_STREAM_CONNECT_FAILED: The object is unable to connect to the specified URL.
ON THIS PAGE