-
-/**
- * gst_rtsp_watch_queue_data:
- * @watch: a #GstRTSPWatch
- * @data: the data to queue
- * @size: the size of @data
- *
- * Queue @data for transmission in @watch. It will be transmitted when the
- * connection of the @watch becomes writable.
- *
- * This function will take ownership of @data and g_free() it after use.
- *
- * The return value of this function will be used as the id argument in the
- * message_sent callback.
- *
- * Deprecated: Use gst_rtsp_watch_write_data()
- *
- * Returns: an id.
- *
- * Since: 0.10.24
- */
-#ifndef GST_REMOVE_DEPRECATED
-guint
-gst_rtsp_watch_queue_data (GstRTSPWatch * watch, const guint8 * data,
- guint size)
-{
- GstRTSPRec *rec;
-
- g_return_val_if_fail (watch != NULL, GST_RTSP_EINVAL);
- g_return_val_if_fail (data != NULL, GST_RTSP_EINVAL);
- g_return_val_if_fail (size != 0, GST_RTSP_EINVAL);
-
- g_mutex_lock (watch->mutex);
-
- /* make a record with the data and id */
- rec = g_slice_new (GstRTSPRec);
- rec->data = (guint8 *) data;
- rec->size = size;
- do {
- /* make sure rec->id is never 0 */
- rec->id = ++watch->id;
- } while (G_UNLIKELY (rec->id == 0));
-
- /* add the record to a queue. FIXME we would like to have an upper limit here */
- g_queue_push_head (watch->messages, rec);
-
- /* make sure the main context will now also check for writability on the
- * socket */
- if (!watch->write_added) {
- g_source_add_poll ((GSource *) watch, &watch->writefd);
- watch->write_added = TRUE;
- }
-
- g_mutex_unlock (watch->mutex);
- return rec->id;
-}
-#endif /* GST_REMOVE_DEPRECATED */
-
-/**
- * gst_rtsp_watch_queue_message:
- * @watch: a #GstRTSPWatch
- * @message: a #GstRTSPMessage
- *
- * Queue a @message for transmission in @watch. The contents of this
- * message will be serialized and transmitted when the connection of the
- * @watch becomes writable.
- *
- * The return value of this function will be used as the id argument in the
- * message_sent callback.
- *
- * Deprecated: Use gst_rtsp_watch_send_message()
- *
- * Returns: an id.
- *
- * Since: 0.10.23
- */
-#ifndef GST_REMOVE_DEPRECATED
-guint
-gst_rtsp_watch_queue_message (GstRTSPWatch * watch, GstRTSPMessage * message)
-{
- GString *str;
- guint size;
-
- g_return_val_if_fail (watch != NULL, GST_RTSP_EINVAL);
- g_return_val_if_fail (message != NULL, GST_RTSP_EINVAL);
-
- /* make a record with the message as a string and id */
- str = message_to_string (watch->conn, message);
- size = str->len;
- return gst_rtsp_watch_queue_data (watch,
- (guint8 *) g_string_free (str, FALSE), size);
-}
-#endif /* GST_REMOVE_DEPRECATED */