Changeset 286742 in webkit
- Timestamp:
- Dec 8, 2021, 2:57:36 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Modules/mediasource/README.md (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r286738 r286742 1 2021-12-08 Jer Noble <jer.noble@apple.com> 2 3 [MSE] Add a Modules/mediasource/README.md file 4 https://bugs.webkit.org/show_bug.cgi?id=234026 5 <rdar://problem/86227732> 6 7 Reviewed by Eric Carlson. 8 9 Follow-up to address review comments. 10 11 * Modules/mediasource/README.md: 12 1 13 2021-12-08 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Source/WebCore/Modules/mediasource/README.md
r286738 r286742 5 5 ## Basic Concepts 6 6 7 The Media Source Extensions specification defines a set of classes which allows clients to implement their own loading, buffering, and variant switching behavior, as opposed to allowing the UA to handle same.7 The Media Source Extensions specification defines a set of classes which allows clients to implement their own loading, buffering, and variant switching behavior, as opposed to requiring the UA to handle same. 8 8 9 9 Clients `fetch()` media initialization segments and media segments, typically subsets of a single [fragmented MP4 file](https://www.w3.org/TR/mse-byte-stream-format-isobmff/) or [WebM file](https://www.w3.org/TR/mse-byte-stream-format-webm/), and append those segments into a SourceBuffer object, which is associated with a HTMLMediaElement through a [MediaSource](#mediasource) object. … … 53 53 SourceBufferPrivate is a semi-abstract base class which accepts initialization segment and media segment buffers, parse those buffers with platform-specific parsers, and enqueue the resulting samples into platform-specific decoders. SourceBufferPrivate is also responsible for caching parsed samples in a [SampleMap](#samplemap). 54 54 55 ### MediaTime ### 56 57 _([.h](../../WTF/wtf/MediaTime.h), [.cpp](../../WTF/wtf/MediaTime.cpp))_ 58 59 MediaTime is a rational-number time class for manipulating time values commonly found in media files. The unit of MediaTime is seconds. 60 61 Media containers such as mp4 and WebM represent time values as a ratio between a "time base" and a "time value". These values cannot necessarily be accurately represented as floating-point values without incurring cumulative rounding errors. For example, a common frame rate in video formats is 29.97fps, however that value is an approximation of 30000/1001. So a media file containing a video track with a 29.97fps content will declare a "time base" scalar of 30000, and each frame will have a "time value" duration of 1001. 62 63 Media Source Extension algorithms are very sensitive to small gaps between samples, and due to its rational-number behavior, MediaTime guarantees samples are contiguous by avoiding floating-point rounding errors. 64 65 MediaTime offers convenience methods to convert from (`createTimeWithDouble()`) and to (`toDouble()`) floating-point values. 66 55 67 ### MediaSample ### 56 68 57 69 _([.h](../platform/MediaSample.h), [.cpp](../platform/MediaSample.cpp))_ 58 70 59 MediaSample is an abstract base class representing a sample parsed from a media segment. MediaSamples have `presentationTime()`, `decodeTime()`, and `duration()`, which are used to order these samples relative to one another in a [SampleMap](#samplemap). For codecs which support frame reordering, `presentationTime()` and `decodeTime()` for each sample may differ.71 MediaSample is an abstract base class representing a sample parsed from a media segment. MediaSamples have `presentationTime()`, `decodeTime()`, and `duration()`, each of which are [MediaTime](#mediatime) values, which are used to order these samples relative to one another in a [SampleMap](#samplemap). For codecs which support frame reordering, `presentationTime()` and `decodeTime()` for each sample may differ. 60 72 61 73 ### SampleMap ###
Note:
See TracChangeset
for help on using the changeset viewer.