mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
configure.ac: enable shout2 by default
Original commit message from CVS: * configure.ac: enable shout2 by default * ext/shout2/gstshout2.c: (gst_shout2send_protocol_get_type), (gst_shout2send_base_init), (gst_shout2send_init), (gst_shout2send_connect), (gst_shout2send_change_state): * ext/shout2/gstshout2.h: make this work again. Based on a patch by Zaheer Merali (fixes #142262) * ext/theora/theora.c: (plugin_init): don't set rank on encoders
This commit is contained in:
parent
302b25c536
commit
a0de263f13
4 changed files with 34 additions and 37 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2004-05-12 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* configure.ac:
|
||||
enable shout2 by default
|
||||
* ext/shout2/gstshout2.c: (gst_shout2send_protocol_get_type),
|
||||
(gst_shout2send_base_init), (gst_shout2send_init),
|
||||
(gst_shout2send_connect), (gst_shout2send_change_state):
|
||||
* ext/shout2/gstshout2.h:
|
||||
make this work again. Based on a patch by Zaheer Merali (fixes
|
||||
#142262)
|
||||
* ext/theora/theora.c: (plugin_init):
|
||||
don't set rank on encoders
|
||||
|
||||
2004-05-11 Jeremy Simon <jesimon@libertysurf.fr>
|
||||
|
||||
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_audio_caps):
|
||||
|
|
|
@ -120,11 +120,9 @@ GST_CHECK_FEATURE(EXPERIMENTAL, [enable building of experimental plug-ins],,
|
|||
[
|
||||
AC_MSG_WARN(building experimental plug-ins)
|
||||
USE_TARKIN="yes"
|
||||
USE_SHOUT2="yes"
|
||||
],[
|
||||
AC_MSG_NOTICE(not building experimental plug-ins)
|
||||
USE_TARKIN="no"
|
||||
USE_SHOUT2="no"
|
||||
])
|
||||
|
||||
dnl broken plug-ins; stuff that doesn't seem to build at the moment
|
||||
|
|
|
@ -58,33 +58,20 @@ enum
|
|||
ARG_URL, /* Url of stream (I'm guessing) */
|
||||
};
|
||||
|
||||
static GstPadTemplate *
|
||||
sink_template_factory (void)
|
||||
{
|
||||
static GstPadTemplate *template = NULL;
|
||||
|
||||
if (!template) {
|
||||
template = gst_pad_template_new ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
gst_caps_new ("shout2send_sink",
|
||||
"application/ogg",
|
||||
NULL),
|
||||
gst_caps_new ("shout2send_sink",
|
||||
"audio/mpeg",
|
||||
gst_props_new ("mpegversion", GST_PROPS_INT (1),
|
||||
"layer", GST_PROPS_INT_RANGE (1, 3), NULL)), NULL);
|
||||
}
|
||||
|
||||
return template;
|
||||
}
|
||||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("application/x-ogg; "
|
||||
"audio/mpeg, mpegversion = (int) 1, layer = (int) [ 1, 3 ]")
|
||||
);
|
||||
|
||||
static void gst_shout2send_class_init (GstShout2sendClass * klass);
|
||||
static void gst_shout2send_base_init (GstShout2sendClass * klass);
|
||||
static void gst_shout2send_init (GstShout2send * shout2send);
|
||||
|
||||
static void gst_shout2send_chain (GstPad * pad, GstData * _data);
|
||||
static GstPadLinkReturn gst_shout2send_connect (GstPad * pad, GstCaps * caps);
|
||||
static GstPadLinkReturn gst_shout2send_connect (GstPad * pad,
|
||||
const GstCaps * caps);
|
||||
|
||||
static void gst_shout2send_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -103,11 +90,10 @@ gst_shout2send_protocol_get_type (void)
|
|||
{
|
||||
static GType shout2send_protocol_type = 0;
|
||||
static GEnumValue shout2send_protocol[] = {
|
||||
{SHOUT2SEND_PROTOCOL_ICE, "1", "Ice Protocol"},
|
||||
{SHOUT2SEND_PROTOCOL_XAUDIOCAST, "2",
|
||||
{SHOUT2SEND_PROTOCOL_XAUDIOCAST, "1",
|
||||
"Xaudiocast Protocol (icecast 1.3.x)"},
|
||||
{SHOUT2SEND_PROTOCOL_ICY, "3", "Icy Protocol (ShoutCast)"},
|
||||
{SHOUT2SEND_PROTOCOL_HTTP, "4", "Http Protocol (icecast 2.x)"},
|
||||
{SHOUT2SEND_PROTOCOL_ICY, "2", "Icy Protocol (ShoutCast)"},
|
||||
{SHOUT2SEND_PROTOCOL_HTTP, "3", "Http Protocol (icecast 2.x)"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
@ -148,7 +134,8 @@ gst_shout2send_base_init (GstShout2sendClass * klass)
|
|||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_add_pad_template (element_class, sink_template_factory ());
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&sink_template));
|
||||
gst_element_class_set_details (element_class, &shout2send_details);
|
||||
}
|
||||
|
||||
|
@ -198,7 +185,8 @@ static void
|
|||
gst_shout2send_init (GstShout2send * shout2send)
|
||||
{
|
||||
shout2send->sinkpad =
|
||||
gst_pad_new_from_template (sink_template_factory (), "sink");
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (shout2send), shout2send->sinkpad);
|
||||
gst_pad_set_chain_function (shout2send->sinkpad, gst_shout2send_chain);
|
||||
|
||||
|
@ -363,15 +351,17 @@ gst_shout2send_get_property (GObject * object, guint prop_id, GValue * value,
|
|||
}
|
||||
|
||||
static GstPadLinkReturn
|
||||
gst_shout2send_connect (GstPad * pad, GstCaps * caps)
|
||||
gst_shout2send_connect (GstPad * pad, const GstCaps * caps)
|
||||
{
|
||||
const gchar *mimetype;
|
||||
|
||||
if (!strcmp (gst_caps_get_mime (caps), "audio/mpeg")) {
|
||||
mimetype = gst_structure_get_name (gst_caps_get_structure (caps, 0));
|
||||
if (!strcmp (mimetype, "audio/mpeg")) {
|
||||
audio_format = SHOUT_FORMAT_MP3;
|
||||
return GST_PAD_LINK_OK;
|
||||
}
|
||||
|
||||
if (!strcmp (gst_caps_get_mime (caps), "application/ogg")) {
|
||||
if (!strcmp (mimetype, "application/ogg")) {
|
||||
audio_format = SHOUT_FORMAT_VORBIS;
|
||||
return GST_PAD_LINK_OK;
|
||||
} else {
|
||||
|
@ -402,9 +392,6 @@ gst_shout2send_change_state (GstElement * element)
|
|||
shout2send->conn = shout_new ();
|
||||
|
||||
switch (shout2send->protocol) {
|
||||
case SHOUT2SEND_PROTOCOL_ICE:
|
||||
proto = SHOUT_PROTOCOL_ICE;
|
||||
break;
|
||||
case SHOUT2SEND_PROTOCOL_XAUDIOCAST:
|
||||
proto = SHOUT_PROTOCOL_XAUDIOCAST;
|
||||
break;
|
||||
|
|
|
@ -30,8 +30,7 @@ extern "C" {
|
|||
|
||||
/* Protocol type enum */
|
||||
typedef enum {
|
||||
SHOUT2SEND_PROTOCOL_ICE = 1,
|
||||
SHOUT2SEND_PROTOCOL_XAUDIOCAST,
|
||||
SHOUT2SEND_PROTOCOL_XAUDIOCAST = 1,
|
||||
SHOUT2SEND_PROTOCOL_ICY,
|
||||
SHOUT2SEND_PROTOCOL_HTTP
|
||||
} GstShout2SendProtocol;
|
||||
|
|
Loading…
Reference in a new issue