Lines Matching refs:watch
3748 GstRTSPWatch *watch = (GstRTSPWatch *) source; in gst_rtsp_source_prepare() local
3750 if (watch->conn->initial_buffer != NULL) in gst_rtsp_source_prepare()
3753 *timeout = (watch->conn->timeout * 1000); in gst_rtsp_source_prepare()
3766 GstRTSPWatch * watch) in gst_rtsp_source_dispatch_read_get_channel() argument
3800 if (watch->funcs.closed) in gst_rtsp_source_dispatch_read_get_channel()
3801 watch->funcs.closed (watch, watch->user_data); in gst_rtsp_source_dispatch_read_get_channel()
3804 watch->keep_running = FALSE; in gst_rtsp_source_dispatch_read_get_channel()
3810 if (watch->funcs.error_full) in gst_rtsp_source_dispatch_read_get_channel()
3811 watch->funcs.error_full (watch, GST_RTSP_ESYS, &watch->message, in gst_rtsp_source_dispatch_read_get_channel()
3812 0, watch->user_data); in gst_rtsp_source_dispatch_read_get_channel()
3813 else if (watch->funcs.error) in gst_rtsp_source_dispatch_read_get_channel()
3814 watch->funcs.error (watch, GST_RTSP_ESYS, watch->user_data); in gst_rtsp_source_dispatch_read_get_channel()
3822 GstRTSPWatch * watch) in gst_rtsp_source_dispatch_read() argument
3825 GstRTSPConnection *conn = watch->conn; in gst_rtsp_source_dispatch_read()
3831 res = build_next (&watch->builder, &watch->message, conn, FALSE); in gst_rtsp_source_dispatch_read()
3835 g_mutex_lock (&watch->mutex); in gst_rtsp_source_dispatch_read()
3836 if (watch->readsrc) { in gst_rtsp_source_dispatch_read()
3837 if (!g_source_is_destroyed ((GSource *) watch)) in gst_rtsp_source_dispatch_read()
3838 g_source_remove_child_source ((GSource *) watch, watch->readsrc); in gst_rtsp_source_dispatch_read()
3839 g_source_unref (watch->readsrc); in gst_rtsp_source_dispatch_read()
3840 watch->readsrc = NULL; in gst_rtsp_source_dispatch_read()
3849 g_mutex_unlock (&watch->mutex); in gst_rtsp_source_dispatch_read()
3858 if (watch->funcs.tunnel_lost) in gst_rtsp_source_dispatch_read()
3859 res = watch->funcs.tunnel_lost (watch, watch->user_data); in gst_rtsp_source_dispatch_read()
3861 g_mutex_lock (&watch->mutex); in gst_rtsp_source_dispatch_read()
3862 if (watch->conn->control_stream && !watch->controlsrc) { in gst_rtsp_source_dispatch_read()
3863 watch->controlsrc = in gst_rtsp_source_dispatch_read()
3865 (watch->conn->control_stream), NULL); in gst_rtsp_source_dispatch_read()
3866 g_source_set_callback (watch->controlsrc, in gst_rtsp_source_dispatch_read()
3867 (GSourceFunc) gst_rtsp_source_dispatch_read_get_channel, watch, in gst_rtsp_source_dispatch_read()
3869 g_source_add_child_source ((GSource *) watch, watch->controlsrc); in gst_rtsp_source_dispatch_read()
3871 g_mutex_unlock (&watch->mutex); in gst_rtsp_source_dispatch_read()
3877 watch->message.type == GST_RTSP_MESSAGE_HTTP_REQUEST) { in gst_rtsp_source_dispatch_read()
3879 watch->message.type_data.request.method == GST_RTSP_GET) { in gst_rtsp_source_dispatch_read()
3885 if (watch->funcs.tunnel_start) in gst_rtsp_source_dispatch_read()
3886 code = watch->funcs.tunnel_start (watch, watch->user_data); in gst_rtsp_source_dispatch_read()
3891 response = gen_tunnel_reply (conn, code, &watch->message); in gst_rtsp_source_dispatch_read()
3892 if (watch->funcs.tunnel_http_response) in gst_rtsp_source_dispatch_read()
3893 watch->funcs.tunnel_http_response (watch, &watch->message, response, in gst_rtsp_source_dispatch_read()
3894 watch->user_data); in gst_rtsp_source_dispatch_read()
3895 gst_rtsp_watch_send_message (watch, response, NULL); in gst_rtsp_source_dispatch_read()
3899 watch->message.type_data.request.method == GST_RTSP_POST) { in gst_rtsp_source_dispatch_read()
3904 if (watch->funcs.tunnel_complete) { in gst_rtsp_source_dispatch_read()
3905 watch->funcs.tunnel_complete (watch, watch->user_data); in gst_rtsp_source_dispatch_read()
3917 if (watch->message.type == GST_RTSP_MESSAGE_HTTP_REQUEST) { in gst_rtsp_source_dispatch_read()
3918 watch->message.type = GST_RTSP_MESSAGE_REQUEST; in gst_rtsp_source_dispatch_read()
3919 watch->message.type_data.request.method = GST_RTSP_INVALID; in gst_rtsp_source_dispatch_read()
3920 if (watch->message.type_data.request.version != GST_RTSP_VERSION_1_0) in gst_rtsp_source_dispatch_read()
3921 watch->message.type_data.request.version = GST_RTSP_VERSION_INVALID; in gst_rtsp_source_dispatch_read()
3923 } else if (watch->message.type == GST_RTSP_MESSAGE_HTTP_RESPONSE) { in gst_rtsp_source_dispatch_read()
3924 watch->message.type = GST_RTSP_MESSAGE_RESPONSE; in gst_rtsp_source_dispatch_read()
3925 if (watch->message.type_data.response.version != GST_RTSP_VERSION_1_0) in gst_rtsp_source_dispatch_read()
3926 watch->message.type_data.response.version = GST_RTSP_VERSION_INVALID; in gst_rtsp_source_dispatch_read()
3933 if (watch->funcs.message_received) in gst_rtsp_source_dispatch_read()
3934 watch->funcs.message_received (watch, &watch->message, watch->user_data); in gst_rtsp_source_dispatch_read()
3937 gst_rtsp_message_unset (&watch->message); in gst_rtsp_source_dispatch_read()
3938 build_reset (&watch->builder); in gst_rtsp_source_dispatch_read()
3946 if (watch->funcs.closed) in gst_rtsp_source_dispatch_read()
3947 watch->funcs.closed (watch, watch->user_data); in gst_rtsp_source_dispatch_read()
3950 watch->keep_running = FALSE; in gst_rtsp_source_dispatch_read()
3957 if (watch->funcs.error_full) in gst_rtsp_source_dispatch_read()
3958 watch->funcs.error_full (watch, res, &watch->message, in gst_rtsp_source_dispatch_read()
3959 0, watch->user_data); in gst_rtsp_source_dispatch_read()
3960 else if (watch->funcs.error) in gst_rtsp_source_dispatch_read()
3961 watch->funcs.error (watch, res, watch->user_data); in gst_rtsp_source_dispatch_read()
3971 GstRTSPWatch *watch = (GstRTSPWatch *) source; in gst_rtsp_source_dispatch() local
3972 GstRTSPConnection *conn = watch->conn; in gst_rtsp_source_dispatch()
3976 watch); in gst_rtsp_source_dispatch()
3978 return watch->keep_running; in gst_rtsp_source_dispatch()
3983 GstRTSPWatch * watch) in gst_rtsp_source_dispatch_write() argument
3986 GstRTSPConnection *conn = watch->conn; in gst_rtsp_source_dispatch_write()
3990 !watch->messages) in gst_rtsp_source_dispatch_write()
3993 g_mutex_lock (&watch->mutex); in gst_rtsp_source_dispatch_write()
3995 guint n_messages = gst_queue_array_get_length (watch->messages); in gst_rtsp_source_dispatch_write()
4006 !watch->messages) { in gst_rtsp_source_dispatch_write()
4007 g_mutex_unlock (&watch->mutex); in gst_rtsp_source_dispatch_write()
4012 if (watch->writesrc) { in gst_rtsp_source_dispatch_write()
4013 if (!g_source_is_destroyed ((GSource *) watch)) in gst_rtsp_source_dispatch_write()
4014 g_source_remove_child_source ((GSource *) watch, watch->writesrc); in gst_rtsp_source_dispatch_write()
4015 g_source_unref (watch->writesrc); in gst_rtsp_source_dispatch_write()
4016 watch->writesrc = NULL; in gst_rtsp_source_dispatch_write()
4023 if (watch->conn->control_stream) { in gst_rtsp_source_dispatch_write()
4024 watch->controlsrc = in gst_rtsp_source_dispatch_write()
4026 (watch->conn->control_stream), NULL); in gst_rtsp_source_dispatch_write()
4027 g_source_set_callback (watch->controlsrc, in gst_rtsp_source_dispatch_write()
4028 (GSourceFunc) gst_rtsp_source_dispatch_read_get_channel, watch, in gst_rtsp_source_dispatch_write()
4030 g_source_add_child_source ((GSource *) watch, watch->controlsrc); in gst_rtsp_source_dispatch_write()
4032 watch->controlsrc = NULL; in gst_rtsp_source_dispatch_write()
4039 msg = gst_queue_array_peek_nth_struct (watch->messages, i); in gst_rtsp_source_dispatch_write()
4077 msg = gst_queue_array_peek_nth_struct (watch->messages, i); in gst_rtsp_source_dispatch_write()
4129 writev_bytes (watch->conn->output_stream, vectors, n_vectors, in gst_rtsp_source_dispatch_write()
4130 &bytes_written, FALSE, watch->conn->cancellable); in gst_rtsp_source_dispatch_write()
4143 while ((msg = gst_queue_array_pop_head_struct (watch->messages))) { in gst_rtsp_source_dispatch_write()
4152 g_assert (watch->messages_bytes >= bytes_written); in gst_rtsp_source_dispatch_write()
4153 watch->messages_bytes -= bytes_written; in gst_rtsp_source_dispatch_write()
4157 msg = gst_queue_array_peek_nth_struct (watch->messages, i); in gst_rtsp_source_dispatch_write()
4165 watch->messages_bytes -= (msg->data_size - msg->data_offset); in gst_rtsp_source_dispatch_write()
4179 watch->messages_bytes -= body_size - msg->body_offset; in gst_rtsp_source_dispatch_write()
4191 watch->messages_bytes -= bytes_written; in gst_rtsp_source_dispatch_write()
4197 watch->messages_bytes -= bytes_written; in gst_rtsp_source_dispatch_write()
4203 msg = gst_queue_array_pop_head_struct (watch->messages); in gst_rtsp_source_dispatch_write()
4208 g_assert (watch->messages_bytes >= bytes_written); in gst_rtsp_source_dispatch_write()
4209 watch->messages_bytes -= bytes_written; in gst_rtsp_source_dispatch_write()
4212 if (!IS_BACKLOG_FULL (watch)) in gst_rtsp_source_dispatch_write()
4213 g_cond_signal (&watch->queue_not_full); in gst_rtsp_source_dispatch_write()
4214 g_mutex_unlock (&watch->mutex); in gst_rtsp_source_dispatch_write()
4221 watch->messages_count--; in gst_rtsp_source_dispatch_write()
4223 if (watch->funcs.message_sent) in gst_rtsp_source_dispatch_write()
4224 watch->funcs.message_sent (watch, *ids, watch->user_data); in gst_rtsp_source_dispatch_write()
4234 g_mutex_lock (&watch->mutex); in gst_rtsp_source_dispatch_write()
4236 g_mutex_unlock (&watch->mutex); in gst_rtsp_source_dispatch_write()
4248 if (watch->funcs.error_full) { in gst_rtsp_source_dispatch_write()
4251 n_messages = gst_queue_array_get_length (watch->messages); in gst_rtsp_source_dispatch_write()
4254 gst_queue_array_peek_nth_struct (watch->messages, i); in gst_rtsp_source_dispatch_write()
4256 watch->funcs.error_full (watch, res, NULL, msg->id, watch->user_data); in gst_rtsp_source_dispatch_write()
4258 } else if (watch->funcs.error) { in gst_rtsp_source_dispatch_write()
4259 watch->funcs.error (watch, res, watch->user_data); in gst_rtsp_source_dispatch_write()
4269 GstRTSPWatch *watch = (GstRTSPWatch *) source; in gst_rtsp_source_finalize() local
4272 if (watch->notify) in gst_rtsp_source_finalize()
4273 watch->notify (watch->user_data); in gst_rtsp_source_finalize()
4275 build_reset (&watch->builder); in gst_rtsp_source_finalize()
4276 gst_rtsp_message_unset (&watch->message); in gst_rtsp_source_finalize()
4278 while ((msg = gst_queue_array_pop_head_struct (watch->messages))) { in gst_rtsp_source_finalize()
4281 gst_queue_array_free (watch->messages); in gst_rtsp_source_finalize()
4282 watch->messages = NULL; in gst_rtsp_source_finalize()
4283 watch->messages_bytes = 0; in gst_rtsp_source_finalize()
4284 watch->messages_count = 0; in gst_rtsp_source_finalize()
4286 g_cond_clear (&watch->queue_not_full); in gst_rtsp_source_finalize()
4288 if (watch->readsrc) in gst_rtsp_source_finalize()
4289 g_source_unref (watch->readsrc); in gst_rtsp_source_finalize()
4290 if (watch->writesrc) in gst_rtsp_source_finalize()
4291 g_source_unref (watch->writesrc); in gst_rtsp_source_finalize()
4292 if (watch->controlsrc) in gst_rtsp_source_finalize()
4293 g_source_unref (watch->controlsrc); in gst_rtsp_source_finalize()
4295 g_mutex_clear (&watch->mutex); in gst_rtsp_source_finalize()
4366 gst_rtsp_watch_reset (GstRTSPWatch * watch) in gst_rtsp_watch_reset() argument
4368 g_mutex_lock (&watch->mutex); in gst_rtsp_watch_reset()
4369 if (watch->readsrc) { in gst_rtsp_watch_reset()
4370 g_source_remove_child_source ((GSource *) watch, watch->readsrc); in gst_rtsp_watch_reset()
4371 g_source_unref (watch->readsrc); in gst_rtsp_watch_reset()
4373 if (watch->writesrc) { in gst_rtsp_watch_reset()
4374 g_source_remove_child_source ((GSource *) watch, watch->writesrc); in gst_rtsp_watch_reset()
4375 g_source_unref (watch->writesrc); in gst_rtsp_watch_reset()
4376 watch->writesrc = NULL; in gst_rtsp_watch_reset()
4378 if (watch->controlsrc) { in gst_rtsp_watch_reset()
4379 g_source_remove_child_source ((GSource *) watch, watch->controlsrc); in gst_rtsp_watch_reset()
4380 g_source_unref (watch->controlsrc); in gst_rtsp_watch_reset()
4381 watch->controlsrc = NULL; in gst_rtsp_watch_reset()
4384 if (watch->conn->input_stream) { in gst_rtsp_watch_reset()
4385 watch->readsrc = in gst_rtsp_watch_reset()
4387 (watch->conn->input_stream), NULL); in gst_rtsp_watch_reset()
4388 g_source_set_callback (watch->readsrc, in gst_rtsp_watch_reset()
4389 (GSourceFunc) gst_rtsp_source_dispatch_read, watch, NULL); in gst_rtsp_watch_reset()
4390 g_source_add_child_source ((GSource *) watch, watch->readsrc); in gst_rtsp_watch_reset()
4392 watch->readsrc = NULL; in gst_rtsp_watch_reset()
4401 if (watch->conn->control_stream) { in gst_rtsp_watch_reset()
4402 watch->controlsrc = in gst_rtsp_watch_reset()
4404 (watch->conn->control_stream), NULL); in gst_rtsp_watch_reset()
4405 g_source_set_callback (watch->controlsrc, in gst_rtsp_watch_reset()
4406 (GSourceFunc) gst_rtsp_source_dispatch_read_get_channel, watch, NULL); in gst_rtsp_watch_reset()
4407 g_source_add_child_source ((GSource *) watch, watch->controlsrc); in gst_rtsp_watch_reset()
4409 watch->controlsrc = NULL; in gst_rtsp_watch_reset()
4411 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_reset()
4424 gst_rtsp_watch_attach (GstRTSPWatch * watch, GMainContext * context) in gst_rtsp_watch_attach() argument
4426 g_return_val_if_fail (watch != NULL, 0); in gst_rtsp_watch_attach()
4428 return g_source_attach ((GSource *) watch, context); in gst_rtsp_watch_attach()
4439 gst_rtsp_watch_unref (GstRTSPWatch * watch) in gst_rtsp_watch_unref() argument
4441 g_return_if_fail (watch != NULL); in gst_rtsp_watch_unref()
4443 g_source_unref ((GSource *) watch); in gst_rtsp_watch_unref()
4461 gst_rtsp_watch_set_send_backlog (GstRTSPWatch * watch, in gst_rtsp_watch_set_send_backlog() argument
4464 g_return_if_fail (watch != NULL); in gst_rtsp_watch_set_send_backlog()
4466 g_mutex_lock (&watch->mutex); in gst_rtsp_watch_set_send_backlog()
4467 watch->max_bytes = bytes; in gst_rtsp_watch_set_send_backlog()
4468 watch->max_messages = messages; in gst_rtsp_watch_set_send_backlog()
4469 if (!IS_BACKLOG_FULL (watch)) in gst_rtsp_watch_set_send_backlog()
4470 g_cond_signal (&watch->queue_not_full); in gst_rtsp_watch_set_send_backlog()
4471 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_set_send_backlog()
4489 gst_rtsp_watch_get_send_backlog (GstRTSPWatch * watch, in gst_rtsp_watch_get_send_backlog() argument
4492 g_return_if_fail (watch != NULL); in gst_rtsp_watch_get_send_backlog()
4494 g_mutex_lock (&watch->mutex); in gst_rtsp_watch_get_send_backlog()
4496 *bytes = watch->max_bytes; in gst_rtsp_watch_get_send_backlog()
4498 *messages = watch->max_messages; in gst_rtsp_watch_get_send_backlog()
4499 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_get_send_backlog()
4503 gst_rtsp_watch_write_serialized_messages (GstRTSPWatch * watch, in gst_rtsp_watch_write_serialized_messages() argument
4510 g_return_val_if_fail (watch != NULL, GST_RTSP_EINVAL); in gst_rtsp_watch_write_serialized_messages()
4513 g_mutex_lock (&watch->mutex); in gst_rtsp_watch_write_serialized_messages()
4514 if (watch->flushing) in gst_rtsp_watch_write_serialized_messages()
4518 if (gst_queue_array_get_length (watch->messages) == 0) { in gst_rtsp_watch_write_serialized_messages()
4569 writev_bytes (watch->conn->output_stream, vectors, n_vectors, in gst_rtsp_watch_write_serialized_messages()
4570 &bytes_written, FALSE, watch->conn->cancellable); in gst_rtsp_watch_write_serialized_messages()
4638 if (IS_BACKLOG_FULL (watch)) in gst_rtsp_watch_write_serialized_messages()
4661 local_message.id = ++watch->id; in gst_rtsp_watch_write_serialized_messages()
4671 gst_queue_array_push_tail_struct (watch->messages, &local_message); in gst_rtsp_watch_write_serialized_messages()
4672 watch->messages_bytes += in gst_rtsp_watch_write_serialized_messages()
4675 watch->messages_bytes += in gst_rtsp_watch_write_serialized_messages()
4678 watch->messages_bytes += in gst_rtsp_watch_write_serialized_messages()
4683 watch->messages_count++; in gst_rtsp_watch_write_serialized_messages()
4687 context = ((GSource *) watch)->context; in gst_rtsp_watch_write_serialized_messages()
4688 if (!watch->writesrc) { in gst_rtsp_watch_write_serialized_messages()
4691 if (watch->controlsrc) { in gst_rtsp_watch_write_serialized_messages()
4692 g_source_remove_child_source ((GSource *) watch, watch->controlsrc); in gst_rtsp_watch_write_serialized_messages()
4693 g_source_unref (watch->controlsrc); in gst_rtsp_watch_write_serialized_messages()
4694 watch->controlsrc = NULL; in gst_rtsp_watch_write_serialized_messages()
4697 watch->writesrc = in gst_rtsp_watch_write_serialized_messages()
4699 (watch->conn->output_stream), NULL); in gst_rtsp_watch_write_serialized_messages()
4700 g_source_set_callback (watch->writesrc, in gst_rtsp_watch_write_serialized_messages()
4701 (GSourceFunc) gst_rtsp_source_dispatch_write, watch, NULL); in gst_rtsp_watch_write_serialized_messages()
4702 g_source_add_child_source ((GSource *) watch, watch->writesrc); in gst_rtsp_watch_write_serialized_messages()
4707 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_write_serialized_messages()
4718 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_write_serialized_messages()
4727 G_GSIZE_FORMAT ", max_messages %u, current %u", watch->max_bytes, in gst_rtsp_watch_write_serialized_messages()
4728 watch->messages_bytes, watch->max_messages, watch->messages_count); in gst_rtsp_watch_write_serialized_messages()
4729 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_write_serialized_messages()
4764 gst_rtsp_watch_write_data (GstRTSPWatch * watch, const guint8 * data, in gst_rtsp_watch_write_data() argument
4773 return gst_rtsp_watch_write_serialized_messages (watch, &serialized_message, in gst_rtsp_watch_write_data()
4793 gst_rtsp_watch_send_message (GstRTSPWatch * watch, GstRTSPMessage * message, in gst_rtsp_watch_send_message() argument
4796 g_return_val_if_fail (watch != NULL, GST_RTSP_EINVAL); in gst_rtsp_watch_send_message()
4799 return gst_rtsp_watch_send_messages (watch, message, 1, id); in gst_rtsp_watch_send_message()
4822 gst_rtsp_watch_send_messages (GstRTSPWatch * watch, GstRTSPMessage * messages, in gst_rtsp_watch_send_messages() argument
4828 g_return_val_if_fail (watch != NULL, GST_RTSP_EINVAL); in gst_rtsp_watch_send_messages()
4836 if (!serialize_message (watch->conn, &messages[i], &serialized_messages[i])) in gst_rtsp_watch_send_messages()
4840 return gst_rtsp_watch_write_serialized_messages (watch, serialized_messages, in gst_rtsp_watch_send_messages()
4875 gst_rtsp_watch_wait_backlog_usec (GstRTSPWatch * watch, gint64 timeout) in gst_rtsp_watch_wait_backlog_usec() argument
4879 g_return_val_if_fail (watch != NULL, GST_RTSP_EINVAL); in gst_rtsp_watch_wait_backlog_usec()
4883 g_mutex_lock (&watch->mutex); in gst_rtsp_watch_wait_backlog_usec()
4884 if (watch->flushing) in gst_rtsp_watch_wait_backlog_usec()
4887 while (IS_BACKLOG_FULL (watch)) { in gst_rtsp_watch_wait_backlog_usec()
4890 res = g_cond_wait_until (&watch->queue_not_full, &watch->mutex, end_time); in gst_rtsp_watch_wait_backlog_usec()
4891 if (watch->flushing) in gst_rtsp_watch_wait_backlog_usec()
4897 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_wait_backlog_usec()
4905 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_wait_backlog_usec()
4911 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_wait_backlog_usec()
4928 gst_rtsp_watch_set_flushing (GstRTSPWatch * watch, gboolean flushing) in gst_rtsp_watch_set_flushing() argument
4930 g_return_if_fail (watch != NULL); in gst_rtsp_watch_set_flushing()
4932 g_mutex_lock (&watch->mutex); in gst_rtsp_watch_set_flushing()
4933 watch->flushing = flushing; in gst_rtsp_watch_set_flushing()
4934 g_cond_signal (&watch->queue_not_full); in gst_rtsp_watch_set_flushing()
4938 while ((msg = gst_queue_array_pop_head_struct (watch->messages))) { in gst_rtsp_watch_set_flushing()
4942 g_mutex_unlock (&watch->mutex); in gst_rtsp_watch_set_flushing()
5200 gst_rtsp_watch_wait_backlog (GstRTSPWatch * watch, GTimeVal * timeout) in gst_rtsp_watch_wait_backlog() argument
5202 return gst_rtsp_watch_wait_backlog_usec (watch, TV_TO_USEC (timeout)); in gst_rtsp_watch_wait_backlog()