summaryrefslogtreecommitdiffstats
path: root/doc/protocol-specification.txt
diff options
context:
space:
mode:
authorAnton <anton@picapica.im>2026-11-29 16:53:11 +0400
committerAnton <anton@picapica.im>2026-11-29 16:53:11 +0400
commitd6ce3a2226bda81cce96c61f0a73fb1516adbd0b (patch)
tree51b3c5c44eb0ae653e7b8b3b9f4e62a5ac203a5d /doc/protocol-specification.txt
parent0fc689fc8bcef54a91915f46ab29dc86d293e957 (diff)
downloadpica-pica-master.tar.gz
pica-pica-master.zip
pica-client: update proto, exchange recommended resolutions for a video callHEADmaster
Diffstat (limited to 'doc/protocol-specification.txt')
-rw-r--r--doc/protocol-specification.txt25
1 files changed, 21 insertions, 4 deletions
diff --git a/doc/protocol-specification.txt b/doc/protocol-specification.txt
index ed0380e..f7e500d 100644
--- a/doc/protocol-specification.txt
+++ b/doc/protocol-specification.txt
@@ -468,14 +468,30 @@ datagram sent while the media connection is being established, see below.
====================================================
Call request (ring)
-[0x70 0x70][length, 2 octets][probe token, 8 octets][address list]
+[0x70 0x70][length, 2 octets][probe token, 8 octets][recommended resolution, 4 octets][address list]
-length - covers everything following it: 8 + the size of the address list.
+length - covers everything following it: 12 + the size of the address list.
probe token - random octets from a cryptographically secure generator, chosen
anew for every call. The peer puts it into the media connection probes it sends
to the sender of this message.
+recommended resolution - [width, uint16_t, little-endian][height, uint16_t,
+little-endian]: the largest picture size of the video the sender wants to
+receive, e.g. the resolution of its screen. A value of 0 leaves that dimension
+unlimited, 0x0 meaning no limit at all. A sender whose screen is in portrait
+orientation but can be rotated may announce it with width and height swapped,
+so as not to limit landscape video to the screen's width.
+The peer picks the picture size of the video it sends - the one announced in
+its 0x75 message - as follows. When the size it is configured for fits, that is
+width and height are each not larger than the corresponding nonzero value, it
+is used. Otherwise the peer steps down through the sizes its camera offers that
+are smaller in area (width x height), largest first, to the first one that
+fits. When none of them does, it
+uses the smallest of them, or the configured size if the camera offers nothing
+smaller; video is sent in any case. The recommendation is not enforced on the
+receiving side: video larger than it is still received and shown.
+
address list - the addresses where the sender's media socket for this call may
be reachable, as elements of the 0xA4 format, of types 0xA0 and 0xA1 only:
first the socket's port number with each of the sender's own interface
@@ -494,9 +510,10 @@ addresses of the list.
====================================================
Call answer (pick up)
-[0x71 0x71][length, 2 octets][probe token, 8 octets][address list]
+[0x71 0x71][length, 2 octets][probe token, 8 octets][recommended resolution, 4 octets][address list]
-The same format and meaning as in 0x70, for the callee's media socket.
+The same format and meaning as in 0x70, for the callee's media socket and the
+video the callee wants to receive.
The callee opens its media socket and asks the node for its address when the
0x70 message arrives, while the call is ringing, so that sending 0x71 is not