mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst-plugins-good.spec.in: spec file fixes
Original commit message from CVS: * gst-plugins-good.spec.in: spec file fixes * gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init), (gst_multiudpsink_render), (gst_multiudpsink_add), (gst_multiudpsink_clear): it actually helps to actually stream if we hook up the add signal to an actual implementation * gst/udp/gstudpsrc.c: (gst_udpsrc_start): some debugging
This commit is contained in:
parent
fb26ca3f32
commit
df82aa5a01
4 changed files with 37 additions and 21 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2005-09-09 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* gst-plugins-good.spec.in:
|
||||||
|
spec file fixes
|
||||||
|
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_class_init),
|
||||||
|
(gst_multiudpsink_render), (gst_multiudpsink_add),
|
||||||
|
(gst_multiudpsink_clear):
|
||||||
|
it actually helps to actually stream if we hook up the
|
||||||
|
"add" signal to an actual implementation
|
||||||
|
* gst/udp/gstudpsrc.c: (gst_udpsrc_start):
|
||||||
|
some debugging
|
||||||
|
|
||||||
2005-09-08 Flavio Oliveira <flavio.oliveira@indt.org.br>
|
2005-09-08 Flavio Oliveira <flavio.oliveira@indt.org.br>
|
||||||
|
|
||||||
* ext/jpeg/Makefile.am:
|
* ext/jpeg/Makefile.am:
|
||||||
|
|
|
@ -24,32 +24,26 @@ Requires(postun): %{gstregister}
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
|
||||||
@USE_ESD_TRUE@Requires: esound >= 0.2.8
|
|
||||||
@USE_ESD_TRUE@BuildRequires: esound-devel >= 0.2.8
|
@USE_ESD_TRUE@BuildRequires: esound-devel >= 0.2.8
|
||||||
@USE_ESD_TRUE@Obsoletes: gstreamer-esd
|
@USE_ESD_TRUE@Obsoletes: gstreamer-esd
|
||||||
@USE_ESD_TRUE@
|
@USE_ESD_TRUE@
|
||||||
@USE_ESD_TRUE@Provides: gstreamer-audiosrc
|
@USE_ESD_TRUE@Provides: gstreamer-audiosrc
|
||||||
@USE_ESD_TRUE@Provides: gstreamer-audiosink
|
@USE_ESD_TRUE@Provides: gstreamer-audiosink
|
||||||
@USE_FLAC_TRUE@Requires: flac >= 1.0.3
|
|
||||||
@USE_FLAC_TRUE@BuildRequires: flac-devel >= 1.0.3
|
@USE_FLAC_TRUE@BuildRequires: flac-devel >= 1.0.3
|
||||||
@USE_GCONF_TRUE@Requires: GConf2
|
|
||||||
@USE_GCONF_TRUE@BuildRequires: GConf2-devel
|
@USE_GCONF_TRUE@BuildRequires: GConf2-devel
|
||||||
@USE_JPEG_TRUE@Requires: libjpeg
|
|
||||||
@USE_JPEG_TRUE@BuildRequires: libjpeg-devel
|
@USE_JPEG_TRUE@BuildRequires: libjpeg-devel
|
||||||
@USE_LIBPNG_TRUE@Requires: libpng >= 1.2.0
|
@USE_LIBCACA_TRUE@BuildRequires: libcaca-devel
|
||||||
|
@USE_LIBDV_TRUE@BuildRequires: libdv-devel
|
||||||
@USE_LIBPNG_TRUE@BuildRequires: libpng-devel >= 1.2.0
|
@USE_LIBPNG_TRUE@BuildRequires: libpng-devel >= 1.2.0
|
||||||
# @USE_MIKMOD_TRUE@Requires: mikmod
|
@USE_MIKMOD_TRUE@BuildRequires: mikmod
|
||||||
# @USE_MIKMOD_TRUE@BuildRequires: mikmod
|
|
||||||
@USE_OSS_TRUE@BuildRequires: glibc-devel
|
@USE_OSS_TRUE@BuildRequires: glibc-devel
|
||||||
# @USE_PANGO_TRUE@Requires: pango
|
@USE_PANGO_TRUE@BuildRequires: pango-devel
|
||||||
# @USE_PANGO_TRUE@BuildRequires: pango-devel
|
@USE_RAW1394_TRUE@BuildRequires: libraw1394-devel
|
||||||
# @USE_RAW1394_TRUE@Requires: libraw1394
|
@USE_RAW1394_TRUE@BuildRequires: libavc1394-devel
|
||||||
# @USE_RAW1394_TRUE@BuildRequires: libraw1394-devel
|
|
||||||
@USE_SPEEX_TRUE@Requires: speex
|
|
||||||
@USE_SPEEX_TRUE@BuildRequires: speex-devel
|
@USE_SPEEX_TRUE@BuildRequires: speex-devel
|
||||||
|
|
||||||
@USE_SHOUT2_TRUE@BuildRequires: libshout-devel >= 2.0
|
@USE_SHOUT2_TRUE@BuildRequires: libshout-devel >= 2.0
|
||||||
# @USE_LADSPA_TRUE@BuildRequires: ladspa-devel
|
@USE_LADSPA_TRUE@BuildRequires: ladspa-devel
|
||||||
@USE_AALIB_TRUE@BuildRequires: aalib-devel >= 1.3
|
@USE_AALIB_TRUE@BuildRequires: aalib-devel >= 1.3
|
||||||
@USE_AALIB_TRUE@Provides: gstreamer-aasink = %{version}-%{release}
|
@USE_AALIB_TRUE@Provides: gstreamer-aasink = %{version}-%{release}
|
||||||
|
|
||||||
|
@ -106,7 +100,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstrtp.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstrtp.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstrtsp.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstrtsp.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstsmpte.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstsmpte.so
|
||||||
# %{_libdir}/gstreamer-%{majorminor}/libgsttcp.so
|
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstudp.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstudp.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstvideobox.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstvideobox.so
|
||||||
%{_libdir}/gstreamer-%{majorminor}/libgstvideoflip.so
|
%{_libdir}/gstreamer-%{majorminor}/libgstvideoflip.so
|
||||||
|
|
|
@ -62,7 +62,7 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gst_multiudpsink_base_init (gpointer g_class);
|
static void gst_multiudpsink_base_init (gpointer g_class);
|
||||||
static void gst_multiudpsink_class_init (GstMultiUDPSink * klass);
|
static void gst_multiudpsink_class_init (GstMultiUDPSinkClass * klass);
|
||||||
static void gst_multiudpsink_init (GstMultiUDPSink * udpsink);
|
static void gst_multiudpsink_init (GstMultiUDPSink * udpsink);
|
||||||
static void gst_multiudpsink_finalize (GObject * object);
|
static void gst_multiudpsink_finalize (GObject * object);
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ gst_multiudpsink_base_init (gpointer g_class)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_multiudpsink_class_init (GstMultiUDPSink * klass)
|
gst_multiudpsink_class_init (GstMultiUDPSinkClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
GstElementClass *gstelement_class;
|
GstElementClass *gstelement_class;
|
||||||
|
@ -168,6 +168,10 @@ gst_multiudpsink_class_init (GstMultiUDPSink * klass)
|
||||||
gstelement_class->change_state = gst_multiudpsink_change_state;
|
gstelement_class->change_state = gst_multiudpsink_change_state;
|
||||||
|
|
||||||
gstbasesink_class->render = gst_multiudpsink_render;
|
gstbasesink_class->render = gst_multiudpsink_render;
|
||||||
|
klass->add = gst_multiudpsink_add;
|
||||||
|
klass->remove = gst_multiudpsink_remove;
|
||||||
|
klass->clear = gst_multiudpsink_clear;
|
||||||
|
klass->get_stats = gst_multiudpsink_get_stats;
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (multiudpsink_debug, "multiudpsink", 0, "UDP sink");
|
GST_DEBUG_CATEGORY_INIT (multiudpsink_debug, "multiudpsink", 0, "UDP sink");
|
||||||
}
|
}
|
||||||
|
@ -195,7 +199,7 @@ static GstFlowReturn
|
||||||
gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstMultiUDPSink *sink;
|
GstMultiUDPSink *sink;
|
||||||
gint ret, size;
|
gint ret, size, num = 0;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
GList *clients;
|
GList *clients;
|
||||||
|
|
||||||
|
@ -204,14 +208,15 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
size = GST_BUFFER_SIZE (buffer);
|
size = GST_BUFFER_SIZE (buffer);
|
||||||
data = GST_BUFFER_DATA (buffer);
|
data = GST_BUFFER_DATA (buffer);
|
||||||
|
|
||||||
GST_DEBUG ("about to send %d bytes", size);
|
|
||||||
|
|
||||||
g_mutex_lock (sink->client_lock);
|
g_mutex_lock (sink->client_lock);
|
||||||
|
GST_LOG_OBJECT (bsink, "about to send %d bytes", size);
|
||||||
|
|
||||||
for (clients = sink->clients; clients; clients = g_list_next (clients)) {
|
for (clients = sink->clients; clients; clients = g_list_next (clients)) {
|
||||||
GstUDPClient *client;
|
GstUDPClient *client;
|
||||||
|
|
||||||
client = (GstUDPClient *) clients->data;
|
client = (GstUDPClient *) clients->data;
|
||||||
GST_DEBUG ("sending %d bytes to client %p", size, client);
|
++num;
|
||||||
|
GST_LOG_OBJECT (sink, "sending %d bytes to client %p", size, client);
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
ret = sendto (*client->sock, data, size, 0,
|
ret = sendto (*client->sock, data, size, 0,
|
||||||
|
@ -227,7 +232,7 @@ gst_multiudpsink_render (GstBaseSink * bsink, GstBuffer * buffer)
|
||||||
}
|
}
|
||||||
g_mutex_unlock (sink->client_lock);
|
g_mutex_unlock (sink->client_lock);
|
||||||
|
|
||||||
GST_DEBUG ("sent %d bytes", size);
|
GST_LOG_OBJECT (sink, "sent %d bytes to %d clients", size, num);
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
|
@ -316,6 +321,7 @@ gst_multiudpsink_add (GstMultiUDPSink * sink, const gchar * host, gint port)
|
||||||
struct ip_mreq multi_addr;
|
struct ip_mreq multi_addr;
|
||||||
GstUDPClient *client;
|
GstUDPClient *client;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (sink, "adding client on host %s, port %d", host, port);
|
||||||
client = g_new0 (GstUDPClient, 1);
|
client = g_new0 (GstUDPClient, 1);
|
||||||
client->host = g_strdup (host);
|
client->host = g_strdup (host);
|
||||||
client->port = port;
|
client->port = port;
|
||||||
|
@ -414,6 +420,7 @@ gst_multiudpsink_remove (GstMultiUDPSink * sink, const gchar * host, gint port)
|
||||||
void
|
void
|
||||||
gst_multiudpsink_clear (GstMultiUDPSink * sink)
|
gst_multiudpsink_clear (GstMultiUDPSink * sink)
|
||||||
{
|
{
|
||||||
|
GST_DEBUG_OBJECT (sink, "clearing");
|
||||||
g_mutex_lock (sink->client_lock);
|
g_mutex_lock (sink->client_lock);
|
||||||
g_list_foreach (sink->clients, (GFunc) free_client, sink);
|
g_list_foreach (sink->clients, (GFunc) free_client, sink);
|
||||||
g_list_free (sink->clients);
|
g_list_free (sink->clients);
|
||||||
|
|
|
@ -456,6 +456,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
|
||||||
|
|
||||||
src = GST_UDPSRC (bsrc);
|
src = GST_UDPSRC (bsrc);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (src, "creating socket pair");
|
||||||
if ((ret = socketpair (PF_UNIX, SOCK_STREAM, 0, CONTROL_SOCKETS (src))) < 0)
|
if ((ret = socketpair (PF_UNIX, SOCK_STREAM, 0, CONTROL_SOCKETS (src))) < 0)
|
||||||
goto no_socket_pair;
|
goto no_socket_pair;
|
||||||
|
|
||||||
|
@ -478,6 +479,7 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
|
||||||
src->myaddr.sin_port = htons (src->port); /* short, network byte order */
|
src->myaddr.sin_port = htons (src->port); /* short, network byte order */
|
||||||
src->myaddr.sin_addr.s_addr = INADDR_ANY;
|
src->myaddr.sin_addr.s_addr = INADDR_ANY;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (src, "binding on port %d", src->port);
|
||||||
if ((ret =
|
if ((ret =
|
||||||
bind (src->sock, (struct sockaddr *) &src->myaddr,
|
bind (src->sock, (struct sockaddr *) &src->myaddr,
|
||||||
sizeof (src->myaddr))) < 0)
|
sizeof (src->myaddr))) < 0)
|
||||||
|
@ -498,8 +500,10 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
|
||||||
goto getsockname_error;
|
goto getsockname_error;
|
||||||
|
|
||||||
port = ntohs (my_addr.sin_port);
|
port = ntohs (my_addr.sin_port);
|
||||||
|
GST_DEBUG_OBJECT (src, "bound, on port %d", port);
|
||||||
if (port != src->port) {
|
if (port != src->port) {
|
||||||
src->port = port;
|
src->port = port;
|
||||||
|
GST_DEBUG_OBJECT (src, "notifying %d", port);
|
||||||
g_object_notify (G_OBJECT (src), "port");
|
g_object_notify (G_OBJECT (src), "port");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue