Skip to content

Instantly share code, notes, and snippets.

@aborilov
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save aborilov/47b8be36f0b9bd9b9dce to your computer and use it in GitHub Desktop.

Select an option

Save aborilov/47b8be36f0b9bd9b9dce to your computer and use it in GitHub Desktop.
simple rtsp-server test
from gi.repository import Gst, GObject, GstRtspServer
Gst.init(None)
rtsp_server = GstRtspServer.RTSPServer()
rtsp_server.attach(None)
factory = GstRtspServer.RTSPMediaFactoryURI()
factory.set_uri('rtsp://good_camera_url')
rtsp_server.get_mount_points().add_factory('/good', factory)
factory = GstRtspServer.RTSPMediaFactoryURI()
factory.set_uri('rtsp://bad_camera_url')
rtsp_server.get_mount_points().add_factory('/bad', factory)
GObject.MainLoop().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment