gstreamer/gst/rtsp-sink/plugin.c
Jan Schmidt f54dd50203 rtspsink: Add rtspclientsink element
Add an rtspclientsink element that accepts streams for which
there is a registered payloader and sends them to
an RTSP server using RECORD.

Sending is synchronised to the pipeline clock. Payload-types
are automatically selected. The 'new-payloader' signal is fired
for custom configuration of payloaders when they are created.

Can now stream a movie like this:

receiver:
  ./test-record "( decodebin name=depay0 ! videoconvert ! autovideosink \
       decodebin name=depay1 ! audioconvert ! autoaudiosink )"
sender:
  gst-launch-1.0 filesrc location=file-with-aac-and-h264.mp4 ! qtdemux name=d ! \
       queue ! aacparse ! rtspclientsink location=rtsp://127.0.0.1:8554/test name=s \

https://bugzilla.gnome.org/show_bug.cgi?id=758180
2016-01-29 01:44:26 +11:00

26 lines
611 B
C

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstrtspclientsink.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
if (!gst_element_register (plugin, "rtspclientsink", GST_RANK_NONE,
GST_TYPE_RTSP_CLIENT_SINK))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
rtspclientsink,
"RTSP client sink element",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)