Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-base
Commits
c41a4d0d
Commit
c41a4d0d
authored
Oct 13, 2010
by
Andoni Morales Alastruey
Committed by
Wim Taymans
Dec 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multifdsink: add first and last buffer's timestamp to the stats
parent
542256fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
gst/tcp/gstmultifdsink.c
gst/tcp/gstmultifdsink.c
+19
-1
gst/tcp/gstmultifdsink.h
gst/tcp/gstmultifdsink.h
+2
-0
No files found.
gst/tcp/gstmultifdsink.c
View file @
c41a4d0d
...
...
@@ -846,6 +846,8 @@ gst_multi_fd_sink_add_full (GstMultiFdSink * sink, int fd,
client
->
bytes_sent
=
0
;
client
->
dropped_buffers
=
0
;
client
->
avg_queue_size
=
0
;
client
->
first_buffer_ts
=
GST_CLOCK_TIME_NONE
;
client
->
last_buffer_ts
=
GST_CLOCK_TIME_NONE
;
client
->
new_connection
=
TRUE
;
client
->
burst_min_unit
=
min_unit
;
client
->
burst_min_value
=
min_value
;
...
...
@@ -1036,6 +1038,8 @@ restart:
* guint64 : time the client is/was connected (in nanoseconds)
* guint64 : last activity time (in nanoseconds, since Epoch)
* guint64 : buffers dropped due to recovery
* guint64 : timestamp of the first buffer sent (in nanoseconds)
* guint64 : timestamp of the last buffer sent (in nanoseconds)
*/
GValueArray
*
gst_multi_fd_sink_get_stats
(
GstMultiFdSink
*
sink
,
int
fd
)
...
...
@@ -1054,7 +1058,7 @@ gst_multi_fd_sink_get_stats (GstMultiFdSink * sink, int fd)
GValue
value
=
{
0
};
guint64
interval
;
result
=
g_value_array_new
(
5
);
result
=
g_value_array_new
(
7
);
g_value_init
(
&
value
,
G_TYPE_UINT64
);
g_value_set_uint64
(
&
value
,
client
->
bytes_sent
);
...
...
@@ -1088,6 +1092,14 @@ gst_multi_fd_sink_get_stats (GstMultiFdSink * sink, int fd)
g_value_init
(
&
value
,
G_TYPE_UINT64
);
g_value_set_uint64
(
&
value
,
client
->
dropped_buffers
);
result
=
g_value_array_append
(
result
,
&
value
);
g_value_unset
(
&
value
);
g_value_init
(
&
value
,
G_TYPE_UINT64
);
g_value_set_uint64
(
&
value
,
client
->
first_buffer_ts
);
result
=
g_value_array_append
(
result
,
&
value
);
g_value_unset
(
&
value
);
g_value_init
(
&
value
,
G_TYPE_UINT64
);
g_value_set_uint64
(
&
value
,
client
->
last_buffer_ts
);
result
=
g_value_array_append
(
result
,
&
value
);
}
noclient:
...
...
@@ -2065,6 +2077,12 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink,
buf
=
g_array_index
(
sink
->
bufqueue
,
GstBuffer
*
,
client
->
bufpos
);
client
->
bufpos
--
;
/* update stats */
if
(
client
->
first_buffer_ts
==
GST_CLOCK_TIME_NONE
)
client
->
first_buffer_ts
=
GST_BUFFER_TIMESTAMP
(
buf
);
client
->
last_buffer_ts
=
GST_BUFFER_TIMESTAMP
(
buf
);
/* decrease flushcount */
if
(
client
->
flushcount
!=
-
1
)
client
->
flushcount
--
;
...
...
gst/tcp/gstmultifdsink.h
View file @
c41a4d0d
...
...
@@ -176,6 +176,8 @@ typedef struct {
guint64
last_activity_time
;
guint64
dropped_buffers
;
guint64
avg_queue_size
;
guint64
first_buffer_ts
;
guint64
last_buffer_ts
;
}
GstTCPClient
;
#define CLIENTS_LOCK_INIT(fdsink) (g_static_rec_mutex_init(&fdsink->clientslock))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment