Commit Graph

17 Commits

Author SHA1 Message Date
Francois Gouget
110c31439b server: Use PRI macros in printf for 32/64 bit compatibility
Some integer type definitions are different between 32 and 64 bit
systems which causes problems in printf. The PRI macros automatically
provide the printf format appropriate for the system.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-12-15 17:47:50 +00:00
Francois Gouget
5c9fb9a0f3 server: Add time constants to go with spice_get_monotonic_time_ns()
They clarify the time unit being used, reduce the need for casts and
simplify calculations.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2015-12-14 11:24:34 +00:00
Francois Gouget
65b60250d0 server: Rename red_get_monotonic_time() to spice_get_monotonic_time_ns()
This is a generic function not tied to the red_xxx functionality and the
new name clarifies that it returns the time in nanoseconds (unlike
g_get_monotonic_time()).

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-12-11 12:43:26 +00:00
Francois Gouget
0ad7f71e24 server: Provide a framerate estimate based on the initial frames
This way the video encoder can actually count on a real estimate when
it is initializing.
Note that the server only creates a video stream if at least 20 bitmap
'blits' of the same size and type arrive, each within a maximum time
interval from the previous one. So it was only keeping track of the
frame to frame interval. Thus to get an average frame rate over all the
20 frames it's necessary to also keep track of the first_frame_time.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-12-11 12:43:44 +01:00
Marc-André Lureau
5161132ec7 display: rename detach_streams_behind
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-12-02 12:44:46 +00:00
Marc-André Lureau
4ca383b261 worker: move current_remove*
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-26 15:27:24 +00:00
Marc-André Lureau
d9b17bbebb worker: move more stream functions
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-26 15:19:03 +00:00
Marc-André Lureau
acba59bb9b worker: move attach_stream
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-24 08:57:01 +00:00
Marc-André Lureau
1f27043b82 stream: remove red_stream_ prefix from mjpeg callbacks
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-21 13:41:35 +00:00
Marc-André Lureau
f5c109573f stream: rename {red_stream_, }get_initial_bit_rate
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-21 13:41:32 +00:00
Marc-André Lureau
d78b44ec26 stream: remove dcc parameter from stream_agent_stop()
Author:    Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-21 13:41:12 +00:00
Marc-André Lureau
ff070be68f worker: move stream_clip_item_unref()
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-20 10:22:00 +00:00
Jonathon Jongsma
b12b248cae Move stream creation and maintenance functions to stream.[ch]
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-18 14:21:45 +00:00
Marc-André Lureau
8c750746f3 worker: move stream_agent_stop and friends
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-18 14:10:45 +00:00
Jonathon Jongsma
ac2a854fbf worker: Move stream functions to stream.c
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-18 08:37:21 +00:00
Marc-André Lureau
4987df8e67 worker: move stream to display channel
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:39 +00:00
Marc-André Lureau
885557f117 worker: move stream functions to a new stream.c file
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 16:09:28 +00:00