mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 15:36:42 +00:00
gst/tcp/gstmultifdsink.c (gst_multifdsink_handle_client_write): Be threadsafe.
Original commit message from CVS: 2005-11-24 Andy Wingo <wingo@pobox.com> * gst/tcp/gstmultifdsink.c (gst_multifdsink_handle_client_write): Be threadsafe.
This commit is contained in:
parent
3831f3774e
commit
55d3769623
3 changed files with 24 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-24 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* gst/tcp/gstmultifdsink.c (gst_multifdsink_handle_client_write):
|
||||||
|
Be threadsafe.
|
||||||
|
|
||||||
2005-11-23 Thomas Vander Stichele <thomas at apestaart dot org>
|
2005-11-23 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* configure.ac: back to HEAD
|
* configure.ac: back to HEAD
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit ea1409191cc1e71273b2dbdd94e7ab5fc5a60a51
|
Subproject commit 1b24580b06e738f920b33ea68dffd83d953f0bba
|
|
@ -165,8 +165,8 @@ gst_sync_method_get_type (void)
|
||||||
{GST_SYNC_METHOD_NEXT_KEYFRAME,
|
{GST_SYNC_METHOD_NEXT_KEYFRAME,
|
||||||
"Serve starting from the next keyframe", "next-keyframe"},
|
"Serve starting from the next keyframe", "next-keyframe"},
|
||||||
{GST_SYNC_METHOD_LATEST_KEYFRAME,
|
{GST_SYNC_METHOD_LATEST_KEYFRAME,
|
||||||
"Serve everything since the latest keyframe (burst)",
|
"Serve everything since the latest keyframe (burst)",
|
||||||
"latest-keyframe"},
|
"latest-keyframe"},
|
||||||
{0, NULL, NULL},
|
{0, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -797,6 +797,8 @@ gst_multifdsink_client_queue_caps (GstMultiFdSink * sink, GstTCPClient * client,
|
||||||
guint length;
|
guint length;
|
||||||
gchar *string;
|
gchar *string;
|
||||||
|
|
||||||
|
g_return_val_if_fail (caps != NULL, FALSE);
|
||||||
|
|
||||||
string = gst_caps_to_string (caps);
|
string = gst_caps_to_string (caps);
|
||||||
GST_DEBUG_OBJECT (sink, "[fd %5d] Queueing caps %s through GDP",
|
GST_DEBUG_OBJECT (sink, "[fd %5d] Queueing caps %s through GDP",
|
||||||
client->fd.fd, string);
|
client->fd.fd, string);
|
||||||
|
@ -974,11 +976,23 @@ gst_multifdsink_handle_client_write (GstMultiFdSink * sink,
|
||||||
/* when using GDP, first check if we have queued caps yet */
|
/* when using GDP, first check if we have queued caps yet */
|
||||||
if (sink->protocol == GST_TCP_PROTOCOL_GDP) {
|
if (sink->protocol == GST_TCP_PROTOCOL_GDP) {
|
||||||
if (!client->caps_sent) {
|
if (!client->caps_sent) {
|
||||||
const GstCaps *caps =
|
GstPad *peer;
|
||||||
GST_PAD_CAPS (GST_PAD_PEER (GST_BASE_SINK_PAD (sink)));
|
GstCaps *caps;
|
||||||
|
|
||||||
|
peer = gst_pad_get_peer (GST_BASE_SINK_PAD (sink));
|
||||||
|
if (!peer) {
|
||||||
|
GST_WARNING_OBJECT (sink, "pad has no peer");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
caps = gst_pad_get_negotiated_caps (peer);
|
||||||
|
gst_object_unref (peer);
|
||||||
|
|
||||||
/* queue caps for sending */
|
/* queue caps for sending */
|
||||||
res = gst_multifdsink_client_queue_caps (sink, client, caps);
|
res = gst_multifdsink_client_queue_caps (sink, client, caps);
|
||||||
|
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
GST_DEBUG_OBJECT (sink, "Failed queueing caps, removing client");
|
GST_DEBUG_OBJECT (sink, "Failed queueing caps, removing client");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue