Repository navigation
Commit fde423a
committed
fix: mark encoded frames as the end of their temporal unit
Since M152 WebRTC expects encoders to set EncodedImage's end-of-temporal-unit
flag, and to report every frame they drop through
EncodedImageCallback::OnFrameDropped, so that it can release what it keeps of
a frame (the captured frame held for corruption detection, for one) as soon
as nothing more of it will come out.
All encoders here produce a single layer, so every frame ends its temporal
unit. EncoderOutputProcessor sets the flag for the hardware encoders, and the
Java encoder wrapper sets it for the frames of Java encoders. The wrapper
also reports the frames it gives up on: frames a Java encoder produced no
output for, the oldest frame when too many are pending, and frames that
cannot be converted for the Java encoder. The Media Foundation and
VideoToolbox encoders report their drops already; NVENC and VA-API drop none.1 parent 43b7420 commit fde423a
4 files changed
Lines changed: 75 additions & 8 deletions
File tree
- webrtc-jni/src/main/cpp
- include/media/video/codec
- src/media/video/codec
- webrtc/src/test/java/dev/onvoid/webrtc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| |||
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| 273 | + | |
| 274 | + | |
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
| 279 | + | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| |||
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
284 | 293 | | |
285 | 294 | | |
286 | 295 | | |
| |||
359 | 368 | | |
360 | 369 | | |
361 | 370 | | |
362 | | - | |
| 371 | + | |
| 372 | + | |
363 | 373 | | |
364 | 374 | | |
365 | 375 | | |
366 | 376 | | |
367 | 377 | | |
368 | 378 | | |
369 | 379 | | |
| 380 | + | |
370 | 381 | | |
371 | 382 | | |
372 | 383 | | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
377 | 387 | | |
| 388 | + | |
378 | 389 | | |
379 | | - | |
380 | | - | |
| 390 | + | |
| 391 | + | |
381 | 392 | | |
382 | 393 | | |
383 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
384 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
385 | 405 | | |
386 | 406 | | |
387 | 407 | | |
| |||
395 | 415 | | |
396 | 416 | | |
397 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
398 | 428 | | |
399 | 429 | | |
400 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
231 | 251 | | |
232 | 252 | | |
233 | 253 | | |
| |||
499 | 519 | | |
500 | 520 | | |
501 | 521 | | |
| 522 | + | |
502 | 523 | | |
503 | 524 | | |
504 | 525 | | |
505 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
506 | 530 | | |
507 | 531 | | |
508 | 532 | | |
| |||
600 | 624 | | |
601 | 625 | | |
602 | 626 | | |
| 627 | + | |
| 628 | + | |
603 | 629 | | |
604 | 630 | | |
605 | 631 | | |
| |||
621 | 647 | | |
622 | 648 | | |
623 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
624 | 656 | | |
625 | 657 | | |
626 | 658 | | |
| |||
0 commit comments