"long-name": "Icecast network sink",
"pad-templates": {
"sink": {
- "caps": "application/ogg:\naudio/ogg:\nvideo/ogg:\naudio/mpeg:\n mpegversion: 1\n layer: [ 1, 3 ]\n",
+ "caps": "application/ogg:\naudio/ogg:\nvideo/ogg:\naudio/mpeg:\n mpegversion: 1\n layer: [ 1, 3 ]\nvideo/webm:\naudio/webm:\n",
"direction": "sink",
"presence": "always"
}
#else
#define WEBM_CAPS ""
#endif
+
+#define SHOUT2SEND_BASIC_CAPS "application/ogg; audio/ogg; video/ogg; "\
+ "audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ]"
+
+#define SHOUT2SEND_DOC_CAPS SHOUT2SEND_BASIC_CAPS "; video/webm; audio/webm"
+
+#define SHOUT2SEND_CAPS SHOUT2SEND_BASIC_CAPS WEBM_CAPS
+
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("application/ogg; audio/ogg; video/ogg; "
- "audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ]" WEBM_CAPS));
+ GST_STATIC_CAPS (SHOUT2SEND_CAPS));
static void gst_shout2send_finalize (GstShout2send * shout2send);
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseSinkClass *gstbasesink_class;
+ GstPadTemplate *tmpl;
+ GstCaps *doc_caps;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_shout2send_event);
gstbasesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_shout2send_setcaps);
- gst_element_class_add_static_pad_template (gstelement_class, &sink_template);
+ tmpl = gst_static_pad_template_get (&sink_template);
+ gst_element_class_add_pad_template (gstelement_class, tmpl);
+
+ /* our caps depend on the libshout2 version */
+ doc_caps = gst_caps_from_string (SHOUT2SEND_DOC_CAPS);
+ gst_pad_template_set_documentation_caps (tmpl, doc_caps);
+ gst_clear_caps (&doc_caps);
gst_element_class_set_static_metadata (gstelement_class,
"Icecast network sink",