Statistics
| Branch: | Revision:

janus-gateway / plugins / janus_streaming.c @ febef1ea

 1 /*! \file janus_streaming.c   * \author Lorenzo Miniero   * \copyright GNU General Public License v3   * \brief Janus Streaming plugin   * \details This is a streaming plugin for Janus, allowing WebRTC peers   * to watch/listen to pre-recorded files or media generated by another tool.   * Specifically, the plugin currently supports three different type of streams:   *   * -# on-demand streaming of pre-recorded media files (different   * streaming context for each peer);   * -# live streaming of pre-recorded media files (shared streaming   * context for all peers attached to the stream);   * -# live streaming of media generated by another tool (shared   * streaming context for all peers attached to the stream).   *   * For what concerns types 1. and 2., considering the proof of concept   * nature of the implementation the only pre-recorded media files   * that the plugins supports right now are raw mu-Law and a-Law files:   * support is of course planned for other additional widespread formats   * as well.   *   * For what concerns type 3., instead, the plugin is configured   * to listen on a couple of ports for RTP: this means that the plugin   * is implemented to receive RTP on those ports and relay them to all   * peers attached to that stream. Any tool that can generate audio/video   * RTP streams and specify a destination is good for the purpose: the   * examples section contains samples that make use of GStreamer (http://gstreamer.freedesktop.org/)   * but other tools like FFmpeg (http://www.ffmpeg.org/), LibAV (http://libav.org/)   * or others are fine as well. This makes it really easy to capture and   * encode whatever you want using your favourite tool, and then have it   * transparently broadcasted via WebRTC using Janus.   *   * Streams to make available are listed in the plugin configuration file.   * A pre-filled configuration file is provided in \c conf/janus.plugin.streaming.cfg   * and includes a stream of every type.   *   * To add more streams or modify the existing ones, you can use the following   * syntax:   *   * \verbatim  [stream-name]  type = rtp|live|ondemand   rtp = stream originated by an external tool (e.g., gstreamer or   ffmpeg) and sent to the plugin via RTP   live = local file streamed live to multiple listeners   (multiple listeners = same streaming context)   ondemand = local file streamed on-demand to a single listener   (multiple listeners = different streaming contexts)  id =  description = This is my awesome stream  is_private = yes|no (private streams don't appear when you do a 'list' request)  filename = path to the local file to stream (only for live/ondemand)  secret =  audio = yes|no (do/don't stream audio)  video = yes|no (do/don't stream video)   The following options are only valid for the 'rtp' type:  audioport = local port for receiving audio frames  `audiopt =