Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 541443c761723f29fbcbada185237bffa95f5d0a
      
https://github.com/WebKit/WebKit/commit/541443c761723f29fbcbada185237bffa95f5d0a
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2025-09-24 (Wed, 24 Sep 2025)

  Changed paths:
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp
    M Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h
    A Source/WebCore/platform/MediaSamplesBlock.cpp
    M Source/WebCore/platform/MediaSamplesBlock.h
    M Source/WebCore/platform/TrackInfo.h
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.h
    M Source/WebCore/platform/graphics/cocoa/CMUtilities.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Add MediaSample to MediaSamplesBlock and back conversion
https://bugs.webkit.org/show_bug.cgi?id=299289
rdar://161095211

Reviewed by Youenn Fablet.

We add the ability to convert a video CMFormatDescription into a VideoTrack.
When converting a MediaSamplesBlock video to a CMSampleBuffer, add handling
of non-displaying sample.
Add {from/to}MediaSample in MediaSamplesBlock to convert respectively from
and to a MediaSampleAVFObjC in order to prepare for serialising the object
over IPC. This allows for C++-only conversion without having to interact
with CMUtilities.

No functional change yet. Tests will be added in a follow-up change which
makes use of those new features.

* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h:
* Source/WebCore/platform/MediaSamplesBlock.cpp: Added.
(WebCore::MediaSamplesBlock::toMediaSample const):
(WebCore::MediaSamplesBlock::fromMediaSample):
* Source/WebCore/platform/MediaSamplesBlock.h:
* Source/WebCore/platform/TrackInfo.h: Add BlockType. When converting from a 
MediaSample
we record the Box types contained in specific Sample Entries. This guarantees
that even if we encounter a codec not explictly handled (vp8/vp9/avc/hevc)
we will be able to serialise and decode it later without error.
(WebCore::VideoInfo::create):
(WebCore::VideoInfo::VideoInfo):
* Source/WebCore/platform/graphics/cocoa/CMUtilities.h:
* Source/WebCore/platform/graphics/cocoa/CMUtilities.mm:
(WebCore::createFormatDescriptionFromTrackInfo):
(WebCore::createVideoInfoFromFormatDescription):
(WebCore::toCMSampleBuffer):
(WebCore::samplesBlockFromCMSampleBuffer):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

Canonical link: https://commits.webkit.org/300498@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to