(x, y, width, height, sock, display, depth)
| 285 | } |
| 286 | |
| 287 | decodeRect(x, y, width, height, sock, display, depth) { |
| 288 | const resetContextFlag = 1; |
| 289 | const resetAllContextsFlag = 2; |
| 290 | |
| 291 | if (sock.rQwait("h264 header", 8)) { |
| 292 | return false; |
| 293 | } |
| 294 | |
| 295 | const length = sock.rQshift32(); |
| 296 | const flags = sock.rQshift32(); |
| 297 | |
| 298 | if (sock.rQwait("h264 payload", length, 8)) { |
| 299 | return false; |
| 300 | } |
| 301 | |
| 302 | if (flags & resetAllContextsFlag) { |
| 303 | this._resetAllContexts(); |
| 304 | } else if (flags & resetContextFlag) { |
| 305 | this._resetContext(x, y, width, height); |
| 306 | } |
| 307 | |
| 308 | let context = this._getContext(x, y, width, height); |
| 309 | context.lastUsed = this._tick++; |
| 310 | |
| 311 | if (length !== 0) { |
| 312 | let payload = sock.rQshiftBytes(length, false); |
| 313 | let frame = context.decode(payload); |
| 314 | if (frame !== null) { |
| 315 | display.videoFrame(x, y, width, height, frame); |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | return true; |
| 320 | } |
| 321 | } |
nothing calls this directly
no test coverage detected