Commit 237125c
committed
[MSE][GStreamer] Avoid extra/circular refs between tracks/streams
https://bugs.webkit.org/show_bug.cgi?id=273488
Reviewed by Alicia Boya Garcia.
1. Avoid adding the same stream to the hash map. Also keeping the active/valid tracks in the player.
2. Avoid a hard reference in the source buffer when ready for more samples.
3. Break the indirect circular reference between the stream and track through the pad.
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::filterOutRepeatingTracks):
(WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
(WebCore::MediaPlayerPrivateGStreamerMSE::startSource):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples):
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
* Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcEmitStreams):
(webKitMediaSrcActivateMode):
(webKitMediaSrcPadLinked):
(webKitMediaSrcLoop):
Canonical link: https://commits.webkit.org/278259@main1 parent 7dfcfef commit 237125c
4 files changed
Lines changed: 44 additions & 12 deletions
File tree
- Source/WebCore/platform/graphics/gstreamer/mse
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
168 | 182 | | |
169 | 183 | | |
170 | 184 | | |
| |||
380 | 394 | | |
381 | 395 | | |
382 | 396 | | |
383 | | - | |
| 397 | + | |
| 398 | + | |
384 | 399 | | |
| 400 | + | |
385 | 401 | | |
386 | 402 | | |
387 | 403 | | |
| |||
443 | 459 | | |
444 | 460 | | |
445 | 461 | | |
446 | | - | |
447 | | - | |
| 462 | + | |
| 463 | + | |
448 | 464 | | |
449 | 465 | | |
450 | 466 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
186 | 187 | | |
187 | | - | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
309 | 314 | | |
310 | 315 | | |
311 | 316 | | |
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
315 | 320 | | |
316 | | - | |
| 321 | + | |
317 | 322 | | |
318 | 323 | | |
319 | 324 | | |
| |||
375 | 380 | | |
376 | 381 | | |
377 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
378 | 387 | | |
379 | | - | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
| |||
397 | 405 | | |
398 | 406 | | |
399 | 407 | | |
400 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
401 | 412 | | |
402 | 413 | | |
403 | 414 | | |
| |||
424 | 435 | | |
425 | 436 | | |
426 | 437 | | |
427 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
428 | 441 | | |
429 | 442 | | |
430 | 443 | | |
| |||
0 commit comments