WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
219227
[Media In GPU Process][MSE] Add the support to forward initialization segment from the GPU Process to Web processes
https://bugs.webkit.org/show_bug.cgi?id=219227
Summary
[Media In GPU Process][MSE] Add the support to forward initialization segment...
Peng Liu
Reported
2020-11-20 14:45:39 PST
[Media In GPU Process][MSE] Add the support to forward initialization segment from the GPU Process to Web processes
Attachments
Patch
(111.51 KB, patch)
2020-11-21 16:31 PST
,
Peng Liu
no flags
Details
Formatted Diff
Diff
Fix build failures on the WPE port
(112.70 KB, patch)
2020-11-21 17:03 PST
,
Peng Liu
no flags
Details
Formatted Diff
Diff
Patch
(112.23 KB, patch)
2020-11-21 22:03 PST
,
Peng Liu
eric.carlson
: review+
Details
Formatted Diff
Diff
Updated patch based on Eric's comments
(112.69 KB, patch)
2020-12-01 13:50 PST
,
Peng Liu
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Peng Liu
Comment 1
2020-11-21 16:31:12 PST
Created
attachment 414772
[details]
Patch
Peng Liu
Comment 2
2020-11-21 17:03:41 PST
Created
attachment 414774
[details]
Fix build failures on the WPE port
Peng Liu
Comment 3
2020-11-21 22:03:40 PST
Created
attachment 414784
[details]
Patch
Radar WebKit Bug Importer
Comment 4
2020-11-27 14:46:17 PST
<
rdar://problem/71768350
>
Eric Carlson
Comment 5
2020-12-01 10:34:28 PST
Comment on
attachment 414784
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=414784&action=review
This would have been better as two patches, one for the remote track cleanup/simplification, and another for the new initialization segment work.
> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:504 > + ASSERT(m_audioTracks.contains(&track)); > + auto audioTrack = m_audioTracks.get(&track); > + m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::RemoveRemoteAudioTrack(audioTrack->identifier()), m_id);
This will now crash in a release build if the track is not in the map.
> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:517 > + ASSERT(m_videoTracks.contains(&track)); > + auto videoTrack = m_videoTracks.get(&track); > + m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::RemoveRemoteVideoTrack(videoTrack->identifier()), m_id);
Ditto
> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:530 > ASSERT(m_textTracks.contains(&track)); > + auto textTrack = m_textTracks.get(&track); > + m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::RemoveRemoteTextTrack(textTrack->identifier()), m_id);
Ditto
> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:74 > + auto description = audioTrackInfo.description; > + segmentInfo.audioTracks.append({ { description->codec(), description->isVideo(), description->isAudio(), description->isText() }, identifier });
This would be clearer/cleaner if you defined a MediaDescriptionInfo constructor that took a MediaDescription&.
> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:80 > + auto description = videoTrackInfo.description; > + segmentInfo.videoTracks.append({ { description->codec(), description->isVideo(), description->isAudio(), description->isText() }, identifier });
Ditto
> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:86 > + auto description = textTrackInfo.description; > + segmentInfo.textTracks.append({ { description->codec(), description->isVideo(), description->isAudio(), description->isText() }, identifier });
Ditto
> Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:170 > + info.description = adoptRef(*new RemoteMediaDescription(audioTrack.description));
`RemoteMediaDescription::create(track.description)` or `RemoteMediaDescription::create(track)` would be more idiomatic
> Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:177 > + info.description = adoptRef(*new RemoteMediaDescription(videoTrack.description));
Ditto
> Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:184 > + info.description = adoptRef(*new RemoteMediaDescription(textTrack.description));
Ditto
Peng Liu
Comment 6
2020-12-01 13:50:03 PST
Created
attachment 415158
[details]
Updated patch based on Eric's comments
Peng Liu
Comment 7
2020-12-01 14:13:51 PST
Comment on
attachment 414784
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=414784&action=review
>> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:504 >> + m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::RemoveRemoteAudioTrack(audioTrack->identifier()), m_id); > > This will now crash in a release build if the track is not in the map.
Good point! Added a protection here.
>> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:517 >> + m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::RemoveRemoteVideoTrack(videoTrack->identifier()), m_id); > > Ditto
Fixed.
>> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:530 >> + m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::RemoveRemoteTextTrack(textTrack->identifier()), m_id); > > Ditto
Fixed.
>> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:74 >> + segmentInfo.audioTracks.append({ { description->codec(), description->isVideo(), description->isAudio(), description->isText() }, identifier }); > > This would be clearer/cleaner if you defined a MediaDescriptionInfo constructor that took a MediaDescription&.
Agree. Fixed.
>> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:80 >> + segmentInfo.videoTracks.append({ { description->codec(), description->isVideo(), description->isAudio(), description->isText() }, identifier }); > > Ditto
Fixed.
>> Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp:86 >> + segmentInfo.textTracks.append({ { description->codec(), description->isVideo(), description->isAudio(), description->isText() }, identifier }); > > Ditto
Fixed.
>> Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:170 >> + info.description = adoptRef(*new RemoteMediaDescription(audioTrack.description)); > > `RemoteMediaDescription::create(track.description)` or `RemoteMediaDescription::create(track)` would be more idiomatic
Fixed by adding a static create() function in RemoteMediaDescription.
>> Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:177 >> + info.description = adoptRef(*new RemoteMediaDescription(videoTrack.description)); > > Ditto
Fixed.
>> Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:184 >> + info.description = adoptRef(*new RemoteMediaDescription(textTrack.description)); > > Ditto
Fixed.
Peng Liu
Comment 8
2020-12-01 14:16:56 PST
(In reply to Eric Carlson from
comment #5
)
> Comment on
attachment 414784
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=414784&action=review
> > This would have been better as two patches, one for the remote track > cleanup/simplification, and another for the new initialization segment work. >
Agree!
EWS
Comment 9
2020-12-01 17:45:09 PST
Committed
r270334
: <
https://trac.webkit.org/changeset/270334
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 415158
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug