Commit Graph

20 Commits

Author SHA1 Message Date
Vivek Kasireddy
58e9e9837c dcc: Create a stream associated with gl_draw for non-gl clients
For non-gl/remote clients, if there is no stream associated with
the DisplayChannel, then we create a new stream. Otherwise, we
just update the current stream's timestamp.

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2025-03-16 04:05:43 +00:00
Frediano Ziglio
7e56fc9fd9 Send real time to client
Do not offset the time attempting to fix client latency.
Client should handle it by itself.

This remove entirely the delay introduced by the server.
This avoids surely possible time drifts in the client.
The server just sends it's concept of time without trying to force any
delay. Only one end should handle this delay in an attempt to
synchronize audio and video instead that doing it in both ends.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2024-06-04 20:32:25 +01:00
Frediano Ziglio
d17e7878cb Remove useless typedefs
Just use forward declaration if needed.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2021-08-26 20:59:41 +01:00
Frediano Ziglio
10749220dd Encapsulate more pipe item initialisation in constructors
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-13 19:48:27 +01:00
Frediano Ziglio
20408491fa video-stream: Move some structure definition to use more RedPipeItemNum
Users of structures needs enumeration definitions too.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-13 19:48:25 +01:00
Frediano Ziglio
dd9b78fd78 Use smart pointers for RedPipeItem
Reduces usage of manual reference counting.
Avoids usage of new and use instead red::make_shared to both
create and own pipe items.
Use move semantic to reduce useless copies.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-13 19:48:08 +01:00
Frediano Ziglio
93405ae3c6 Automatically release some pipe item resources
Now that items are managed by constructors/destructors avoid some
manual releases.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-13 19:47:59 +01:00
Frediano Ziglio
a30df693cf red-pipe-item: Use inheritance on RedPipeItem
This allows to:
- reuse reference counting;
- avoid having to manually call g_free to release item memory;
- assure item is initialized;
- avoids some manual casts.

It will also allows to use smart pointers.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Julien Ropé <jrope@gmail.com>
2020-07-13 19:47:53 +01:00
Frediano Ziglio
d5a0e9d0ef video-stream: Remove only assigned "fps" field
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <ulublin@redhat.com>
2020-07-02 21:11:47 +01:00
Frediano Ziglio
e0b395fb68 Declare exported functions as C
Allows to be used by both C and C++ code.
So to leave part of the code in C and part move to C++.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:08 +01:00
Frediano Ziglio
0bb564fdca video-stream: Make video_stream*_unref static
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Snir Sheriber <ssheribe@redhat.com>
2020-03-02 07:30:23 +00:00
Kevin Pouget
9ccf7bee7a stream-channel: Add preferred video codec capability
This patch enables the SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE
capability for the stream-channel.

video_stream_parse_preferred_codecs: new function for parsing the
SPICE protocol message. This code used to in inside
dcc_handle_preferred_video_codec_type.

struct StreamChannelClient::client_preferred_video_codecs: new field.

Signed-off-by: Kevin Pouget <kpouget@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-09-02 09:53:27 +01:00
Frediano Ziglio
83fd1bb4ff Use "base" as pipe item base field name
Most of pipe items use this name for the base field.
This also allows to use SPICE_UPCAST macros instead of a long
SPICE_CONTAINEROF.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-06-18 13:40:51 +01:00
Frediano Ziglio
50e43f1161 video-stream: Improve RedUpgradeItem documentation
Artifacts are due to lossy compression of streaming

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2018-03-19 16:35:33 +00:00
Frediano Ziglio
129ac09694 video-stream: Document the usage of RedUpgradeItem structure
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2018-03-13 16:32:07 +00:00
Frediano Ziglio
07396a4c80 Move RedUpgradeItem declaration in video-stream.h
This structure is used to send a message related to streams.
There are already other items defined in video-stream.h so
move the declaration.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-12-12 17:25:55 +00:00
Frediano Ziglio
b2ade6e996 Simplify sending stream report activation message
Store information directly in the RedStreamActivateReportItem
making easier to marshall the message.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2017-12-12 17:25:50 +00:00
Jonathon Jongsma
0975b92ba7 Rename RedStreamClipItem to VideoStreamClipItem
Avoid confusion with RedStream which is a totally unrelated object.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-11-30 13:51:51 -06:00
Jonathon Jongsma
5ea0f68263 Rename StreamAgent to VideoStreamAgent
Just to avoid confusion between different uses of the word Stream (e.g.
RedStream) clarify that it's related to video streams

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-11-30 11:51:09 -06:00
Jonathon Jongsma
2e08354ce1 Rename Stream to VideoStream
To prevent confusion between Stream (a video stream) and RedStream (a
generic data stream between client and server), change the name to
VideoStream to be more explicit about what it is.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-11-30 11:51:09 -06:00