-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] Refactor media_session_client #2599
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 30191 Passed, 1 Skipped, 14m 25.36s Wall Time |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2599 +/- ##
==========================================
+ Coverage 58.17% 58.88% +0.70%
==========================================
Files 1788 1904 +116
Lines 84294 93310 +9016
==========================================
+ Hits 49038 54941 +5903
- Misses 35256 38369 +3113 ☔ View full report in Codecov by Sentry. |
6f95614
to
c88ef38
Compare
c88ef38
to
979923c
Compare
14baea6
to
d7cc04c
Compare
I'm always a bit reluctant to add a mutex if it can be avoided. |
From here, https://source.corp.google.com/h/lbshell-internal/cobalt_src/+/COBALT:cobalt/media_session/media_session.cc;l=99-114?q=p:cobalt%20UpdateMediaSessionState, do we know if UpdateMediaSessionState() can be called on multiple threads? If this is the case, I feel there could be a chance that 1 thread is reading session_state_ fields inside OnMediaSessionStateChanged https://source.corp.google.com/h/lbshell-internal/cobalt_src/+/COBALT:cobalt/media_session/media_session_client.cc;l=300-350, while the other thread can rewrite session_state_ here https://source.corp.google.com/h/lbshell-internal/cobalt_src/+/COBALT:cobalt/media_session/media_session_client.cc;l=275-278. Thoughts? |
It doesn't look like it. |
I see, thank you. One thing to confirm, "If the issue here is that the reference to MediaMetadataInit goes out of scope", do you meant the ext_image object here, https://source.corp.google.com/h/lbshell-internal/cobalt_src/+/COBALT:cobalt/media_session/media_session_client.cc;l=333, is it? |
31b5462
to
1d5687f
Compare
ext_image is released after the for loop, do not create it, write directly to the ext_artwork array. b/329330347
1d5687f
to
7985305
Compare
b/329330347