mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
adaptivedemux2: Log request duration in debug output
When completing, log how long a HTTP request took into the debug output. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3883>
This commit is contained in:
parent
714628f1ec
commit
6f6c0cbbaf
1 changed files with 6 additions and 4 deletions
|
@ -349,10 +349,12 @@ on_read_ready (GObject * source, GAsyncResult * result, gpointer user_data)
|
|||
finish_transfer:
|
||||
if (request->in_use && !g_cancellable_is_cancelled (transfer->cancellable)) {
|
||||
SoupStatus status_code = _soup_message_get_status (transfer->msg);
|
||||
|
||||
GST_LOG ("request complete. Code %d URI %s range %" G_GINT64_FORMAT " %"
|
||||
G_GINT64_FORMAT, status_code, request->uri,
|
||||
request->range_start, request->range_end);
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
guint download_ms = (now - request->download_request_time) / GST_MSECOND;
|
||||
GST_LOG ("request complete in %u ms. Code %d URI %s range %" G_GINT64_FORMAT
|
||||
" %" G_GINT64_FORMAT, download_ms, status_code,
|
||||
request->uri, request->range_start, request->range_end);
|
||||
#endif
|
||||
|
||||
if (request->state != DOWNLOAD_REQUEST_STATE_UNSENT) {
|
||||
if (SOUP_STATUS_IS_SUCCESSFUL (status_code)
|
||||
|
|
Loading…
Reference in a new issue