mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
9eda151348
This embeds the muxer inside the sink and accepts elementary streams while the old HLS sink required the muxer outside. Apart from that the interface is the same as before. Currently only mpegtsmux is supported, but support for other muxers is just a matter of adding a property. The advantage of the new sink is that it reduces complexity a lot and properly handles pre-encoded streams with appropriately spaced keyframes. https://bugzilla.gnome.org/show_bug.cgi?id=781496
36 lines
768 B
C
36 lines
768 B
C
#ifdef HAVE_CONFIG_H
|
|
# include <config.h>
|
|
#endif
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include "gsthls.h"
|
|
#include "gsthlsdemux.h"
|
|
#include "gsthlssink.h"
|
|
#include "gsthlssink2.h"
|
|
|
|
GST_DEBUG_CATEGORY (hls_debug);
|
|
|
|
static gboolean
|
|
hls_init (GstPlugin * plugin)
|
|
{
|
|
GST_DEBUG_CATEGORY_INIT (hls_debug, "hls", 0, "HTTP Live Streaming (HLS)");
|
|
|
|
if (!gst_element_register (plugin, "hlsdemux", GST_RANK_PRIMARY,
|
|
GST_TYPE_HLS_DEMUX) || FALSE)
|
|
return FALSE;
|
|
|
|
if (!gst_hls_sink_plugin_init (plugin))
|
|
return FALSE;
|
|
|
|
if (!gst_hls_sink2_plugin_init (plugin))
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
GST_VERSION_MINOR,
|
|
hls,
|
|
"HTTP Live Streaming (HLS)",
|
|
hls_init, VERSION, GST_LICENSE, PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|