haikuwebkit/Source/WebCore/html/track/InbandDataTextTrack.h

69 lines
2.7 KiB
C
Raw Permalink Normal View History

[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
/*
* Copyright (C) 2014 Cable Television Labs Inc. All rights reserved.
Allow text tracks to purge cues outside of the buffered range https://bugs.webkit.org/show_bug.cgi?id=224489 Reviewed by Jer Noble. TextTrackCues associated in-band tracks live "forever" - until the video element is deleted or reloaded. This is fine for relatively short files, but not so good for long lived files (eg. a very long live stream), or for timed metadata where the "cue" size can be much larger than a text sample. Allow text tracks to opt in to purging cues who's time range does not intersect with the `buffered` range, where audio and video data is also not available. Only AVFoundation backed in-band tracks opt in at this time, because AVFoundation will redeliver cues if a time range is played again. Tested manually as the only way to test this currently would be with an HLS stream that would have to play too long for a layout test, or with an MSE text track but we won't support text tracks in MSE yet. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged): Allow tracks that support purging cues to do so. * html/HTMLMediaElement.h: * html/track/InbandDataTextTrack.h: Return true for shouldPurgeCuesFromUnbufferedRanges(); * html/track/InbandGenericTextTrack.h: Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::removeCuesNotInTimeRanges): Remove all cues who's time range does not intersect with the buffered range. * html/track/TextTrack.h: (WebCore::TextTrack::shouldPurgeCuesFromUnbufferedRanges const): Canonical link: https://commits.webkit.org/236509@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-14 16:53:26 +00:00
* Copyright (C) 2014-2021 Apple Inc. All rights reserved.
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Move HTML canvas and tracks from ExceptionCode to Exception https://bugs.webkit.org/show_bug.cgi?id=163853 Reviewed by Chris Dumez. Source/WebCore: * WebCore.xcodeproj/project.pbxproj: Added CanvasPath.idl. * bindings/js/JSWebGL2RenderingContextCustom.cpp: Tweaked a bit. * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: (WebCore::JSWebGLRenderingContextBase::getExtension): Tweaked a bit. (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter): Removed unneeded exception handling. (WebCore::JSWebGLRenderingContextBase::getParameter): Ditto. (WebCore::JSWebGLRenderingContextBase::getProgramParameter): Ditto. (WebCore::JSWebGLRenderingContextBase::getShaderParameter): Ditto. (WebCore::JSWebGLRenderingContextBase::getSupportedExtensions): Use a modern for loop. (WebCore::JSWebGLRenderingContextBase::getUniform): Removed unneeded exception handling. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): Pass a reference. (WebCore::HTMLCanvasElement::reset): Use is<CanvasRenderingContext2D>. (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing): Ditto. (WebCore::HTMLCanvasElement::setTracksDisplayListReplay) Ditto.: (WebCore::HTMLCanvasElement::displayListAsText): Ditto. (WebCore::HTMLCanvasElement::replayDisplayListAsText): Ditto. (WebCore::HTMLCanvasElement::clearImageBuffer): Ditto. * html/canvas/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): Streamlined. (WebCore::CanvasGradient::addColorStop): Use ExceptionOr. * html/canvas/CanvasGradient.h: Updated for above changes. * html/canvas/CanvasGradient.idl: Use non-legacy exception. * html/canvas/CanvasPath.cpp: (WebCore::CanvasPath::arcTo): Use ExceptionOr. (WebCore::CanvasPath::arc): Ditto. (WebCore::CanvasPath::ellipse): Ditto. * html/canvas/CanvasPath.h: Updated for above changes. * html/canvas/CanvasPath.idl: Use non-legacy exceptions. * html/canvas/CanvasPattern.cpp: (WebCore::CanvasPattern::create): Use Ref&&. (WebCore::CanvasPattern::CanvasPattern): Ditto. (WebCore::CanvasPattern::parseRepetitionType): Return a boolean instead of using an ExceptionCode. * html/canvas/CanvasPattern.h: Updated for above changes. * html/canvas/CanvasRenderingContext.cpp: (CanvasRenderingContext::wouldTaintOrigin): Reordered function so that it's safe to call it on an image element without a cached image, or a cached image without an underlying image. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Take a reference. (WebCore::CanvasRenderingContext2D::drawImage): Use ExceptionOr. (WebCore::CanvasRenderingContext2D::drawImageFromRect): Ditto. (WebCore::CanvasRenderingContext2D::createLinearGradient): Ditto. (WebCore::CanvasRenderingContext2D::createRadialGradient): Ditto. (WebCore::CanvasRenderingContext2D::createPattern): Ditto. (WebCore::CanvasRenderingContext2D::createImageData): Ditto. (WebCore::CanvasRenderingContext2D::getImageData): Ditto. (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Ditto. (WebCore::CanvasRenderingContext2D::putImageData): Removed unneeded ExceptionCode because this does not throw exceptions; the only one was for non-finite numeric values but this is now handled by bindings. (WebCore::CanvasRenderingContext2D::webkitPutImageDataHD): Ditto. * html/canvas/CanvasRenderingContext2D.h: Updated for above. * html/canvas/CanvasRenderingContext2D.idl: Use non-legacy exceptions and removed exceptions entirely in other cases. * html/canvas/OESVertexArrayObject.cpp: (WebCore::OESVertexArrayObject::OESVertexArrayObject): Take a reference. (WebCore::OESVertexArrayObject::~OESVertexArrayObject): Deleted. (WebCore::OESVertexArrayObject::isVertexArrayOES): Use && instead of multiple return statements. (WebCore::OESVertexArrayObject::bindVertexArrayOES): Removed unneeded ExceptionCode since this does not throw an exception. * html/canvas/OESVertexArrayObject.h: Updated for above. * html/canvas/OESVertexArrayObject.idl: Removed unneeded exception. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Removed unneeded ExceptionCode since this does not throw an exception. (WebCore::WebGL2RenderingContext::texSubImage2DBase): Ditto. (WebCore::WebGL2RenderingContext::texSubImage2DImpl): Ditto. (WebCore::WebGL2RenderingContext::texSubImage2D): Removed unneeded ExceptionCode for some overloads, for the others, use ExceptionOr for the security exception. Moved security exception code here from the validate functions. (WebCore::WebGL2RenderingContext::validateTexFuncParameters): Removed unneeded ExceptionCode. (WebCore::WebGL2RenderingContext::getParameter): Ditto. * html/canvas/WebGL2RenderingContext.h: Updated for above. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): Pass a reference. (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Remvoed unneeded ExceptionCode since this does not throw an exception. (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto. (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto. (WebCore::WebGLRenderingContext::texSubImage2D): Removed unneeded ExceptionCode for some overloads, for the others, use ExceptionOr for the security exception. Moved security exception code here from the validate functions. (WebCore::WebGLRenderingContext::getParameter): Removed unneeded ExceptionCode. * html/canvas/WebGLRenderingContext.h: Updated for above changes. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::texImage2DBase): Remvoed unneeded ExceptionCode since this does not throw an exception. (WebCore::WebGLRenderingContextBase::texImage2DImpl): Ditto. (WebCore::WebGLRenderingContextBase::texImage2D): Removed unneeded ExceptionCode for some overloads, for the others, use ExceptionOr for the security exception. Moved security exception code here from the validate functions. (WebCore::WebGLRenderingContextBase::validateHTMLImageElement): Moved the security exception out of here to the call sites. (WebCore::WebGLRenderingContextBase::validateHTMLCanvasElement): Ditto. (WebCore::WebGLRenderingContextBase::validateHTMLVideoElement): Ditto. * html/canvas/WebGLRenderingContextBase.h: Updated for above changes. * html/canvas/WebGLRenderingContextBase.idl: Use non-legacy exceptions in some cases and no exceptions at all in many others. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Use a reference instead of a pointer. * html/track/DataCue.h: Use pragma once. * html/track/DataCue.idl: Use non-legacy exception for constructor attribute, even though it is custom and so it has no effect. * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::create): Use RefPtr&&. (WebCore::InbandDataTextTrack::InbandDataTextTrack): Ditto. (WebCore::InbandDataTextTrack::addDataCue): Stop using ASSERT_NO_EXCEPTION. (WebCore::InbandDataTextTrack::removeDataCue): Stop using IGNORE_EXCEPTION. (WebCore::InbandDataTextTrack::removeCue): Use ExceptionOr. Also use remove instead of find/remove. * html/track/InbandDataTextTrack.h: Updated for above changes. * html/track/InbandGenericTextTrack.cpp: (WebCore::GenericTextTrackCueMap::GenericTextTrackCueMap): Deleted. (WebCore::GenericTextTrackCueMap::~GenericTextTrackCueMap): Deleted. (WebCore::GenericTextTrackCueMap::add): Take references intead of pointers. (WebCore::GenericTextTrackCueMap::find): Ditto. Also use get instead of find. (WebCore::GenericTextTrackCueMap::remove): Ditto. Also use take instead of double hashing to both find and remove. (WebCore::InbandGenericTextTrack::updateCueFromCueData): Stop using IGNORE_EXCEPTION. Also got rid of code that is converting a double to a long and then back to a double by using lround. Instead just use std::round, which keeps it a double. But also, why does this need to round?! (WebCore::InbandGenericTextTrack::addGenericCue): Updated to use reference to work with m_cueMap. (WebCore::InbandGenericTextTrack::updateGenericCue): Ditto. (WebCore::InbandGenericTextTrack::removeGenericCue): Ditto. (WebCore::InbandGenericTextTrack::removeCue): Use ExceptionOr. (WebCore::InbandGenericTextTrack::newCuesParsed): Removed ASSERT_NO_EXCEPTION. * html/track/InbandGenericTextTrack.h: Updated for above changes. * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): Removed ASSERT_NO_EXCEPTION. * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): Use ExcepctionOr. (WebCore::TextTrack::removeCue): Ditto. (WebCore::TextTrack::addRegion): Ditto. (WebCore::TextTrack::removeRegion): Ditto. * html/track/TextTrack.h: Updated for above changes. * html/track/TextTrack.idl: Ditto. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::cueShadowPseudoId): Moved this here since it does not need to be inlined in the header. (WebCore::TextTrackCue::~TextTrackCue): Deleted. (WebCore::TextTrackCue::setStartTime): Removed ExceptionCode& since the exceptions were for non-finite values, but this is now handled by the bindings. (WebCore::TextTrackCue::setEndTime): Ditto. * html/track/TextTrackCue.h: Updated for the above. * html/track/TextTrackCue.idl: Removed SetterMayThrowLegacyException and made startTime and endTime be double rather than unrestricted double. * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Use a reference instead of a pointer. (WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Initialize m_defaultPosition in the class definition instead of here. (WebCore::TextTrackCueGeneric::createDisplayTree): Return a Ref. (WebCore::TextTrackCueGeneric::setLine): Use ExceptionOr. (WebCore::TextTrackCueGeneric::setPosition): Ditto. (WebCore::TextTrackCueGeneric::setFontSize): Updated since displayTreeInternal() now returns a reference. * html/track/TextTrackCueGeneric.h: Updated for above changes. Also fixed some arguument types and made some more things private. * html/track/VTTCue.cpp: (WebCore::VTTCue::createDisplayTree): Return a Ref. (WebCore::VTTCue::displayTreeInternal): Return a reference. (WebCore::VTTCue::setVertical): Use ExceptionOr. (WebCore::VTTCue::setLine): Ditto. (WebCore::VTTCue::setPosition): Ditto. (WebCore::VTTCue::setSize): Ditto. (WebCore::VTTCue::setAlign): Ditto. (WebCore::VTTCue::getDisplayTree): Return a reference. (WebCore::VTTCue::removeDisplayTree): Updated since displayTreeInternal returns a reference. (WebCore::VTTCue::setFontSize): Ditto. * html/track/VTTCue.h: Updated for the above. * html/track/VTTCue.idl: Use non-legacy exceptions and also restricted doubles. * html/track/VTTRegion.cpp: (WebCore::VTTRegion::VTTRegion): Moved default values all into the class definition. (WebCore::VTTRegion::setWidth): Removed the check for non-finite since the bindings now handle that. Use ExcpetionOr. (WebCore::VTTRegion::setHeight): Ditto. (WebCore::VTTRegion::setRegionAnchorX): Ditto. (WebCore::VTTRegion::setRegionAnchorY): Ditto. (WebCore::VTTRegion::setViewportAnchorX): Ditto. (WebCore::VTTRegion::setViewportAnchorY): Ditto. (WebCore::upKeyword): Added. Shared by the code below. (WebCore::VTTRegion::scroll): Rewrote to be simpler. (WebCore::VTTRegion::setScroll): Rewrote to be simpler. (WebCore::VTTRegion::updateParametersFromRegion): Read and write data members directly to avoid awkward code that is otherwise required just to copy from one object to the other. Also take a const& instead of a pointer for the thing to update from. (WebCore::VTTRegion::parseSettingValue): Use upKeyword. (WebCore::VTTRegion::appendTextTrackCueBox): Take a Ref&&. (WebCore::VTTRegion::getDisplayTree): Do the downcast to Document here instead of using the helper function. (WebCore::VTTRegion::prepareRegionDisplayTree): Ditto. * html/track/VTTRegion.h: Updated for the above. * html/track/VTTRegion.idl: Use non-legacy exceptions and also use restricted dobules, not unrestricted. LayoutTests: * media/track/regions-webvtt/vtt-region-constructor-expected.txt: Change expectations to expect the more specific TypeError message that the bindings generate as opposed to the generic ones that the WebVTT DOM code was generating before. Canonical link: https://commits.webkit.org/181598@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-10-23 01:05:07 +00:00
#pragma once
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
Remove ENABLE_VIDEO_TRACK ifdef guards https://bugs.webkit.org/show_bug.cgi?id=212568 Reviewed by Youenn Fablet. .: VIDEO_TRACK has been enabled by default on all ports for a long time. As the spec is stable, the feature can unconditionally be enabled and is now guarded under ENABLE(VIDEO). * Source/cmake/OptionsFTW.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsWin.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/tools/vsprops/FeatureDefines.props: * Source/cmake/tools/vsprops/FeatureDefinesCairo.props: Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Remove ENABLE_VIDEO_TRACK, which is now enabled by default under the ENABLE_VIDEO guard. Source/WebCore: * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * Modules/mediacontrols/MediaControlsHost.cpp: * Modules/mediasource/AudioTrackMediaSource.h: * Modules/mediasource/AudioTrackMediaSource.idl: * Modules/mediasource/SourceBuffer.h: * Modules/mediasource/SourceBuffer.idl: * Modules/mediasource/TextTrackMediaSource.h: * Modules/mediasource/TextTrackMediaSource.idl: * Modules/mediasource/VideoTrackMediaSource.h: * Modules/mediasource/VideoTrackMediaSource.idl: * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp: (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture): * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSAudioTrackCustom.cpp: * bindings/js/JSAudioTrackListCustom.cpp: * bindings/js/JSTextTrackCueCustom.cpp: * bindings/js/JSTextTrackCustom.cpp: * bindings/js/JSTextTrackListCustom.cpp: * bindings/js/JSTrackCustom.cpp: * bindings/js/JSTrackCustom.h: * bindings/js/JSVideoTrackCustom.cpp: * bindings/js/JSVideoTrackListCustom.cpp: * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::CSSSelector::selectorText const): * css/CSSSelector.h: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkOne const): * css/SelectorCheckerTestFunctions.h: (WebCore::matchesLangPseudoClass): * css/SelectorPseudoClassAndCompatibilityElementMap.in: * css/SelectorPseudoElementTypeMap.in: * css/parser/CSSParserSelector.h: (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching const): (WebCore::CSSParserSelector::isPseudoElementCueFunction const): * css/parser/CSSSelectorParser.cpp: (WebCore::CSSSelectorParser::consumePseudo): * cssjit/SelectorCompiler.cpp: (WebCore::SelectorCompiler::addPseudoClassType): * dom/Document.cpp: * dom/Document.h: * dom/EventNames.in: * dom/EventTargetFactory.in: * dom/Node.h: * history/BackForwardCache.cpp: * history/BackForwardCache.h: * history/CachedPage.cpp: (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): * history/CachedPage.h: * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::as const): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::~HTMLMediaElement): (WebCore::HTMLMediaElement::registerWithDocument): (WebCore::HTMLMediaElement::unregisterWithDocument): (WebCore::HTMLMediaElement::finishParsingChildren): (WebCore::HTMLMediaElement::prepareForLoad): (WebCore::HTMLMediaElement::selectMediaResource): (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay const): (WebCore::HTMLMediaElement::setReadyState): (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): (WebCore::HTMLMediaElement::playInternal): (WebCore::HTMLMediaElement::setVolume): (WebCore::HTMLMediaElement::playbackProgressTimerFired): (WebCore::HTMLMediaElement::configureTextTracks): (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): (WebCore::HTMLMediaElement::userCancelledLoad): (WebCore::HTMLMediaElement::clearMediaPlayer): (WebCore::HTMLMediaElement::syncTextTrackBounds): (WebCore::HTMLMediaElement::setVideoFullscreenStandby): (WebCore::HTMLMediaElement::setVideoFullscreenLayer): (WebCore::HTMLMediaElement::hasClosedCaptions const): (WebCore::HTMLMediaElement::setClosedCaptionsVisible): (WebCore::HTMLMediaElement::createMediaPlayer): (WebCore::HTMLMediaElement::bufferingPolicy const): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * html/HTMLTagNames.in: * html/HTMLTrackElement.cpp: * html/HTMLTrackElement.h: * html/HTMLTrackElement.idl: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::texImageSourceHelper): (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): * html/shadow/MediaControlTextTrackContainerElement.cpp: * html/shadow/MediaControlTextTrackContainerElement.h: * html/track/AudioTrack.cpp: * html/track/AudioTrack.h: * html/track/AudioTrack.idl: * html/track/AudioTrackList.cpp: * html/track/AudioTrackList.h: * html/track/AudioTrackList.idl: * html/track/DataCue.cpp: * html/track/DataCue.h: * html/track/DataCue.idl: * html/track/InbandDataTextTrack.cpp: * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.cpp: * html/track/LoadableTextTrack.h: * html/track/TextTrack.cpp: * html/track/TextTrack.h: * html/track/TextTrack.idl: * html/track/TextTrackCue.cpp: * html/track/TextTrackCue.h: * html/track/TextTrackCue.idl: * html/track/TextTrackCueGeneric.cpp: * html/track/TextTrackCueGeneric.h: * html/track/TextTrackCueGeneric.idl: * html/track/TextTrackCueList.cpp: * html/track/TextTrackCueList.h: * html/track/TextTrackCueList.idl: * html/track/TextTrackList.cpp: * html/track/TextTrackList.h: * html/track/TextTrackList.idl: * html/track/TrackBase.cpp: * html/track/TrackBase.h: * html/track/TrackEvent.cpp: * html/track/TrackEvent.h: * html/track/TrackEvent.idl: * html/track/TrackListBase.cpp: * html/track/TrackListBase.h: * html/track/VTTCue.cpp: * html/track/VTTCue.h: * html/track/VTTCue.idl: * html/track/VTTRegion.cpp: * html/track/VTTRegion.h: * html/track/VTTRegion.idl: * html/track/VTTRegionList.cpp: * html/track/VTTRegionList.h: * html/track/VTTRegionList.idl: * html/track/VideoTrack.cpp: * html/track/VideoTrack.h: * html/track/VideoTrack.idl: * html/track/VideoTrackList.cpp: * html/track/VideoTrackList.h: * html/track/VideoTrackList.idl: * html/track/WebVTTElement.cpp: * html/track/WebVTTElement.h: * html/track/WebVTTParser.cpp: * html/track/WebVTTParser.h: * html/track/WebVTTToken.h: * html/track/WebVTTTokenizer.cpp: * html/track/WebVTTTokenizer.h: * loader/LinkLoader.cpp: (WebCore::LinkLoader::resourceTypeFromAsAttribute): (WebCore::createLinkPreloadResourceClient): (WebCore::LinkLoader::isSupportedType): * loader/ResourceLoadInfo.cpp: (WebCore::ContentExtensions::toResourceType): * loader/SubresourceLoader.cpp: (WebCore::logResourceLoaded): * loader/TextTrackLoader.cpp: * loader/TextTrackLoader.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::defaultPriorityForResourceType): * loader/cache/CachedResource.h: * loader/cache/CachedResourceLoader.cpp: (WebCore::createResource): (WebCore::contentTypeFromResourceType): (WebCore::CachedResourceLoader::checkInsecureContent const): (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const): (WebCore::destinationForType): * loader/cache/CachedResourceLoader.h: * loader/cache/CachedTextTrack.cpp: * loader/cache/CachedTextTrack.h: * page/CaptionUserPreferences.cpp: * page/CaptionUserPreferences.h: * page/CaptionUserPreferencesMediaAF.cpp: * page/CaptionUserPreferencesMediaAF.h: * page/Page.cpp: (WebCore::Page::setPageScaleFactor): (WebCore::Page::setUserInterfaceLayoutDirection): (WebCore::Page::doAfterUpdateRendering): (WebCore::Page::forEachMediaElement): * page/Page.h: * page/PageGroup.cpp: * page/PageGroup.h: * page/Settings.yaml: * platform/LocalizedStrings.cpp: * platform/LocalizedStrings.h: * platform/MIMETypeRegistry.cpp: (WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): * platform/SerializedPlatformDataCue.cpp: * platform/graphics/AudioTrackPrivate.h: * platform/graphics/ImageDecoder.cpp: (WebCore::ImageDecoder::create): (WebCore::ImageDecoder::supportsMediaType): * platform/graphics/InbandGenericCue.cpp: * platform/graphics/InbandGenericCue.h: * platform/graphics/InbandTextTrackPrivate.h: * platform/graphics/InbandTextTrackPrivateClient.h: * platform/graphics/MediaPlayer.cpp: (WebCore::buildMediaEnginesVector): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::textTrackRepresentationBoundsChanged): * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::tracksChanged): * platform/graphics/TextTrackRepresentation.cpp: * platform/graphics/TextTrackRepresentation.h: * platform/graphics/TrackPrivateBase.cpp: * platform/graphics/TrackPrivateBase.h: * platform/graphics/VideoTrackPrivate.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: * platform/graphics/avfoundation/AudioTrackPrivateAVF.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: * platform/graphics/avfoundation/VideoTrackPrivateAVF.h: * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h: * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm: * platform/graphics/cocoa/TextTrackRepresentationCocoa.h: * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: * platform/graphics/gstreamer/GStreamerCommon.cpp: (WebCore::initializeGStreamer): * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: * platform/graphics/gstreamer/ImageDecoderGStreamer.h: * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): (WebCore::MediaPlayerPrivateGStreamer::newTextSample): (WebCore::MediaPlayerPrivateGStreamer::updateTracks): (WebCore::MediaPlayerPrivateGStreamer::handleMessage): (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: * platform/graphics/gstreamer/TextCombinerGStreamer.h: * platform/graphics/gstreamer/TextSinkGStreamer.cpp: * platform/graphics/gstreamer/TextSinkGStreamer.h: * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: * platform/mac/SerializedPlatformDataCueMac.h: * platform/mac/SerializedPlatformDataCueMac.mm: * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: * platform/mediastream/AudioMediaStreamTrackRenderer.h: * platform/mediastream/AudioTrackPrivateMediaStream.cpp: * platform/mediastream/AudioTrackPrivateMediaStream.h: * platform/mediastream/VideoTrackPrivateMediaStream.h: * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: * rendering/RenderVTTCue.cpp: * rendering/RenderVTTCue.h: * style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::collectMatchingShadowPseudoElementRules): * style/PropertyCascade.cpp: (WebCore::Style::PropertyCascade::addMatch): * style/RuleData.cpp: (WebCore::Style::determinePropertyWhitelistType): * style/RuleData.h: * style/RuleSet.cpp: (WebCore::Style::RuleSet::addRule): (WebCore::Style::RuleSet::traverseRuleDatas): (WebCore::Style::RuleSet::hasShadowPseudoElementRules const): (WebCore::Style::RuleSet::shrinkToFit): * style/RuleSet.h: * style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const): * testing/InternalSettings.cpp: (WebCore::InternalSettings::Backup::Backup): (WebCore::InternalSettings::Backup::restoreTo): (WebCore::InternalSettings::setShouldDisplayTrackKind): (WebCore::InternalSettings::shouldDisplayTrackKind): * testing/InternalSettings.h: * testing/InternalSettings.idl: * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::Internals): (WebCore::Internals::userPreferredAudioCharacteristics const): (WebCore::Internals::setUserPreferredAudioCharacteristic): (WebCore::Internals::captionsStyleSheetOverride): (WebCore::Internals::setCaptionsStyleSheetOverride): (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): (WebCore::Internals::setCaptionDisplayMode): (WebCore::Internals::textTrackBCP47Language): (WebCore::Internals::getCurrentMediaControlsStatusForElement): * testing/Internals.h: * testing/Internals.idl: Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: * GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::dispatchMessage): * GPUProcess/GPUConnectionToWebProcess.h: * GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::textTrackSetMode): (WebKit::RemoteMediaPlayerProxy::notifyTrackModeChanged): * GPUProcess/media/RemoteMediaPlayerProxy.h: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.cpp: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.h: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRenderer.messages.in: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.cpp: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.h: * GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager.messages.in: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h: * GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.messages.in: * Shared/WebPreferences.yaml: * WebProcess/GPU/GPUProcessConnection.cpp: (WebKit::GPUProcessConnection::dispatchMessage): * WebProcess/GPU/GPUProcessConnection.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::tracksChanged): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::updatePreferences): * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.cpp: * WebProcess/GPU/webrtc/AudioMediaStreamTrackRenderer.h: * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp: * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h: * WebProcess/GPU/webrtc/SampleBufferDisplayLayer.messages.in: * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.cpp: * WebProcess/GPU/webrtc/SampleBufferDisplayLayerManager.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::maximumBufferingTime): Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKitLegacy/win: * WebPreferences.cpp: (WebPreferences::shouldDisplaySubtitles): (WebPreferences::setShouldDisplaySubtitles): (WebPreferences::shouldDisplayCaptions): (WebPreferences::setShouldDisplayCaptions): (WebPreferences::shouldDisplayTextDescriptions): (WebPreferences::setShouldDisplayTextDescriptions): * WebView.cpp: (WebView::notifyPreferencesChanged): Source/WTF: * wtf/PlatformEnable.h: Remove ENABLE_VIDEO_TRACK, which is now enabled by default under the ENABLE_VIDEO guard. * wtf/PlatformEnableCocoa.h: Ditto. Tools: * Scripts/webkitperl/FeatureList.pm: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Canonical link: https://commits.webkit.org/225692@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-06-07 09:55:32 +00:00
#if ENABLE(VIDEO)
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
#include "InbandTextTrack.h"
namespace WebCore {
[Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebCore: Tests: http/tests/media/track-in-band-hls-metadata.html media/track/track-datacue-value.html * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate. * CMakeLists.txt: Add JSDataCueCustom.cpp. * bindings/js/JSBindingsAllInOne.cpp: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/JSDataCueCustom.cpp: Added. (WebCore::JSDataCue::value): (WebCore::JSDataCue::setValue): (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate events when paused, don't call sort on an Vector that can't be sorted. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Initialize m_type. (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary. (WebCore::DataCue::data): Ask the platform value for data if non-null. (WebCore::DataCue::setData): Clear m_platformValue and m_value. (WebCore::DataCue::isEqual): New. (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed to the constructor/set by script. (WebCore::DataCue::setValue): Set m_value. * html/track/DataCue.h: * html/track/DataCue.idl: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once. (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration. (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue. (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead of VTTCue. * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::isEqual): New, test base class equality. * html/track/TextTrackCue.h: * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first. * html/track/TextTrackCueGeneric.h: * html/track/VTTCue.cpp: (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first. * html/track/VTTCue.h: * platform/SerializedPlatformRepresentation.h: Added. (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation): (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation): * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added. (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto. (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted. Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::currentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack): (WebCore::AVFWrapper::setCurrentTextTrack): (WebCore::AVFWrapper::AVFWrapper): (WebCore::AVFWrapper::processCue): (WebCore::AVFWrapper::currentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted. (WebCore::AVFWrapper::setCurrentTrack): Deleted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New. (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack. (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type. (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata. (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted. Create a JSValue representation from an AVMetadataItem. * platform/mac/SerializedPlatformRepresentationMac.h: Added. (WebCore::SerializedPlatformRepresentationMac::platformType): (WebCore::SerializedPlatformRepresentationMac::nativeValue): * platform/mac/SerializedPlatformRepresentationMac.mm: Added. (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::create): (WebCore::SerializedPlatformRepresentationMac::data): (WebCore::SerializedPlatformRepresentationMac::deserialize): (WebCore::SerializedPlatformRepresentationMac::isEqual): (WebCore::toSerializedPlatformRepresentationMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebKit2: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WTF: * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. LayoutTests: * http/tests/media/resources/hls: Added. * http/tests/media/resources/hls/metadata: Added. * http/tests/media/resources/hls/metadata/fileSequence0.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence1.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence2.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence3.ts: Added. * http/tests/media/resources/hls/metadata/prog_index.m3u8: Added. * http/tests/media/track-in-band-hls-metadata-expected.txt: Added. * http/tests/media/track-in-band-hls-metadata.html: Added. * media/track/track-datacue-value-expected.txt: Added. * media/track/track-datacue-value.html: Added. * platform/efl/TestExpectations: Skip the new tests. * platform/gtk/TestExpectations: Ditto. * platform/mac/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on Mountain Lion. * platform/win/TestExpectations: Skip the new tests. Canonical link: https://commits.webkit.org/150050@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-21 23:18:23 +00:00
class DataCue;
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
Clean up virtual functions in html/ https://bugs.webkit.org/show_bug.cgi?id=138166 Reviewed by Andreas Kling. Clean up virtual functions in html/ by: - Making virtual functions final when possible - Making classes final when possible - Using 'override' when appropriate - Explicitly marking functions / destructors as virtual when they are inherently virtual - Dropping virtual destructors when the class does not have subclasses and mark the class as final, to get rid of unnecessary vtables - Making isXXX() virtual functions private on XXX classes to avoid unnecessary type checks - De-virtualizing some functions that do not need to be virtual - Dropping final for virtual functions in classes already marked as final No new tests, no behavior change. * html/ButtonInputType.h: * html/CheckboxInputType.h: * html/ColorInputType.h: * html/DOMSettableTokenList.h: * html/DateInputType.h: * html/DateTimeInputType.h: * html/DateTimeLocalInputType.h: * html/EmailInputType.h: * html/FTPDirectoryDocument.h: * html/HTMLAnchorElement.h: * html/HTMLDetailsElement.cpp: * html/HTMLFormControlElement.h: * html/HTMLFormControlsCollection.h: * html/HTMLFrameElement.h: * html/HTMLFrameElementBase.h: * html/HTMLFrameOwnerElement.h: * html/HTMLInputElement.h: * html/HTMLMarqueeElement.h: * html/HTMLMediaElement.h: * html/HTMLMediaSession.h: (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted. * html/HTMLMeterElement.h: * html/HTMLNameCollection.h: * html/HTMLObjectElement.h: * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.h: * html/HTMLSpanElement.h: * html/HTMLStyleElement.h: * html/HTMLSummaryElement.cpp: * html/HTMLSummaryElement.h: * html/HTMLUnknownElement.h: * html/HTMLVideoElement.h: * html/HiddenInputType.h: * html/ImageInputType.h: * html/MediaKeyEvent.h: * html/MonthInputType.h: * html/NumberInputType.h: * html/PasswordInputType.h: * html/PublicURLManager.h: * html/RadioInputType.h: * html/ResetInputType.h: * html/SubmitInputType.h: * html/TelephoneInputType.h: * html/TextInputType.h: * html/TimeInputType.h: * html/URLInputType.h: * html/WeekInputType.h: * html/canvas/ANGLEInstancedArrays.h: * html/canvas/CanvasRenderingContext2D.h: * html/canvas/DOMPath.h: * html/canvas/EXTShaderTextureLOD.h: * html/canvas/EXTTextureFilterAnisotropic.h: * html/canvas/OESElementIndexUint.h: * html/canvas/OESStandardDerivatives.h: * html/canvas/OESTextureFloat.h: * html/canvas/OESTextureFloatLinear.h: * html/canvas/OESTextureHalfFloat.h: * html/canvas/OESTextureHalfFloatLinear.h: * html/canvas/OESVertexArrayObject.h: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureATC.h: * html/canvas/WebGLCompressedTexturePVRTC.h: * html/canvas/WebGLCompressedTextureS3TC.h: * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextEvent.h: * html/canvas/WebGLDebugRendererInfo.h: * html/canvas/WebGLDebugShaders.h: * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.h: * html/canvas/WebGLFramebuffer.h: (WebCore::WebGLFramebuffer::isFramebuffer): Deleted. * html/canvas/WebGLLoseContext.h: * html/canvas/WebGLProgram.h: * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLShader.h: * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isFramebuffer): Deleted. * html/canvas/WebGLTexture.h: * html/canvas/WebGLVertexArrayObjectOES.h: (WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted. * html/shadow/ImageControlsRootElement.h: * html/shadow/InsertionPoint.h: * html/shadow/MediaControlElementTypes.h: * html/shadow/MediaControlElements.h: * html/shadow/MediaControls.h: * html/shadow/MediaControlsApple.h: * html/shadow/SpinButtonElement.h: * html/track/AudioTrack.h: * html/track/AudioTrackList.h: * html/track/DataCue.h: (WebCore::DataCue::cueType): Deleted. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.h: * html/track/TextTrackList.h: * html/track/TrackEvent.h: * html/track/VTTCue.h: (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs): * html/track/VTTRegion.h: * html/track/VideoTrack.h: * html/track/VideoTrackList.h: * html/track/WebVTTParser.h: (WebCore::WebVTTCueData::~WebVTTCueData): Deleted. Canonical link: https://commits.webkit.org/156014@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-10-29 15:09:57 +00:00
class InbandDataTextTrack final : public InbandTextTrack {
[WebCore] Put most of derived classes of ScriptWrappable into IsoHeap https://bugs.webkit.org/show_bug.cgi?id=196475 Reviewed by Saam Barati. Source/bmalloc: Add MAKE_BISO_MALLOCED_IMPL_TEMPLATE, which can be used for explicit specialization for template classes. * bmalloc/IsoHeap.h: * bmalloc/IsoHeapInlines.h: Source/WebCore: This patch puts most of derived classes of ScriptWrappable into IsoHeap. We do not include derived classes of Event simply because Internal repository code also inherits it. After watching the result of this patch, we will try Event and its derived classes into IsoHeap too. This patch makes the following things IsoHeap-allocated. These classes are listed by using lldb python script. 1. DOM collections (HTMLCollection etc.) 2. WebAudio nodes 3. IDB classes 4. FileSystem API classes 5. Canvas contexts 6. WebRTC classses 7. XMLHttpRequest related classes 8. WebSocket related classes 9. Worker and Worklet related classes 10. Other misc classes * Modules/applepay/ApplePaySession.cpp: * Modules/applepay/ApplePaySession.h: * Modules/encryptedmedia/MediaKeySession.cpp: * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h: * Modules/entriesapi/DOMFileSystem.cpp: * Modules/entriesapi/DOMFileSystem.h: (WebCore::DOMFileSystem::createEntryForFile): Deleted. (WebCore::DOMFileSystem::name const): Deleted. * Modules/entriesapi/FileSystemDirectoryEntry.h: * Modules/entriesapi/FileSystemDirectoryReader.cpp: * Modules/entriesapi/FileSystemDirectoryReader.h: * Modules/entriesapi/FileSystemEntry.cpp: * Modules/entriesapi/FileSystemEntry.h: * Modules/entriesapi/FileSystemFileEntry.h: * Modules/geolocation/Geolocation.cpp: * Modules/geolocation/Geolocation.h: (WebCore::Geolocation::document const): Deleted. (WebCore::Geolocation::frame const): Deleted. (WebCore::Geolocation::resetIsAllowed): Deleted. (WebCore::Geolocation::isAllowed const): Deleted. (WebCore::Geolocation::isDenied const): Deleted. (WebCore::Geolocation::hasListeners const): Deleted. * Modules/indexeddb/IDBCursor.cpp: * Modules/indexeddb/IDBCursor.h: * Modules/indexeddb/IDBCursorWithValue.cpp: * Modules/indexeddb/IDBCursorWithValue.h: * Modules/indexeddb/IDBDatabase.cpp: * Modules/indexeddb/IDBDatabase.h: (WebCore::IDBDatabase::info const): Deleted. (WebCore::IDBDatabase::databaseConnectionIdentifier const): Deleted. (WebCore::IDBDatabase::connectionProxy): Deleted. (WebCore::IDBDatabase::isClosingOrClosed const): Deleted. * Modules/indexeddb/IDBKeyRange.cpp: * Modules/indexeddb/IDBKeyRange.h: (WebCore::IDBKeyRange::lower const): Deleted. (WebCore::IDBKeyRange::upper const): Deleted. (WebCore::IDBKeyRange::lowerOpen const): Deleted. (WebCore::IDBKeyRange::upperOpen const): Deleted. * Modules/indexeddb/IDBOpenDBRequest.cpp: * Modules/indexeddb/IDBOpenDBRequest.h: * Modules/indexeddb/IDBRequest.cpp: * Modules/indexeddb/IDBRequest.h: * Modules/indexeddb/IDBTransaction.cpp: * Modules/indexeddb/IDBTransaction.h: (WebCore::IDBTransaction::mode const): Deleted. (WebCore::IDBTransaction::info const): Deleted. (WebCore::IDBTransaction::database): Deleted. (WebCore::IDBTransaction::database const): Deleted. (WebCore::IDBTransaction::originalDatabaseInfo const): Deleted. (WebCore::IDBTransaction::isVersionChange const): Deleted. (WebCore::IDBTransaction::isReadOnly const): Deleted. (WebCore::IDBTransaction::isFinished const): Deleted. * Modules/mediarecorder/MediaRecorder.cpp: * Modules/mediarecorder/MediaRecorder.h: * Modules/mediasession/MediaRemoteControls.cpp: * Modules/mediasession/MediaRemoteControls.h: (WebCore::MediaRemoteControls::create): Deleted. (WebCore::MediaRemoteControls::previousTrackEnabled const): Deleted. (WebCore::MediaRemoteControls::nextTrackEnabled const): Deleted. * Modules/mediasource/MediaSource.cpp: * Modules/mediasource/MediaSource.h: * Modules/mediasource/SourceBuffer.cpp: * Modules/mediasource/SourceBuffer.h: * Modules/mediasource/SourceBufferList.cpp: * Modules/mediasource/SourceBufferList.h: * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: * Modules/mediastream/CanvasCaptureMediaStreamTrack.h: * Modules/mediastream/MediaDeviceInfo.cpp: * Modules/mediastream/MediaDeviceInfo.h: (WebCore::MediaDeviceInfo::label const): Deleted. (WebCore::MediaDeviceInfo::deviceId const): Deleted. (WebCore::MediaDeviceInfo::groupId const): Deleted. (WebCore::MediaDeviceInfo::kind const): Deleted. * Modules/mediastream/MediaDevices.cpp: * Modules/mediastream/MediaDevices.h: * Modules/mediastream/MediaStream.cpp: * Modules/mediastream/MediaStream.h: * Modules/mediastream/MediaStreamTrack.cpp: * Modules/mediastream/MediaStreamTrack.h: * Modules/mediastream/RTCDTMFSender.cpp: * Modules/mediastream/RTCDTMFSender.h: * Modules/mediastream/RTCDataChannel.cpp: * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCIceCandidate.cpp: * Modules/mediastream/RTCIceCandidate.h: (WebCore::RTCIceCandidate::candidate const): Deleted. (WebCore::RTCIceCandidate::sdpMid const): Deleted. (WebCore::RTCIceCandidate::sdpMLineIndex const): Deleted. (WebCore::RTCIceCandidate::setCandidate): Deleted. * Modules/mediastream/RTCIceTransport.cpp: * Modules/mediastream/RTCIceTransport.h: (WebCore::RTCIceTransport::create): Deleted. (WebCore::RTCIceTransport::state const): Deleted. (WebCore::RTCIceTransport::setState): Deleted. (WebCore::RTCIceTransport::gatheringState const): Deleted. (WebCore::RTCIceTransport::setGatheringState): Deleted. (WebCore::RTCIceTransport::RTCIceTransport): Deleted. * Modules/mediastream/RTCPeerConnection.cpp: * Modules/mediastream/RTCPeerConnection.h: * Modules/mediastream/RTCRtpReceiver.cpp: * Modules/mediastream/RTCRtpReceiver.h: (WebCore::RTCRtpReceiver::create): Deleted. (WebCore::RTCRtpReceiver::setBackend): Deleted. (WebCore::RTCRtpReceiver::getParameters): Deleted. (WebCore::RTCRtpReceiver::getContributingSources const): Deleted. (WebCore::RTCRtpReceiver::getSynchronizationSources const): Deleted. (WebCore::RTCRtpReceiver::track): Deleted. (WebCore::RTCRtpReceiver::backend): Deleted. * Modules/mediastream/RTCRtpSender.cpp: * Modules/mediastream/RTCRtpSender.h: (WebCore::RTCRtpSender::track): Deleted. (WebCore::RTCRtpSender::trackId const): Deleted. (WebCore::RTCRtpSender::trackKind const): Deleted. (WebCore::RTCRtpSender::mediaStreamIds const): Deleted. (WebCore::RTCRtpSender::setMediaStreamIds): Deleted. (WebCore::RTCRtpSender::isStopped const): Deleted. (WebCore::RTCRtpSender::backend): Deleted. * Modules/mediastream/RTCRtpTransceiver.cpp: * Modules/mediastream/RTCRtpTransceiver.h: (WebCore::RTCRtpTransceiver::create): Deleted. (WebCore::RTCRtpTransceiver::sender): Deleted. (WebCore::RTCRtpTransceiver::receiver): Deleted. (WebCore::RTCRtpTransceiver::iceTransport): Deleted. (WebCore::RTCRtpTransceiver::backend): Deleted. * Modules/mediastream/RTCSessionDescription.cpp: * Modules/mediastream/RTCSessionDescription.h: (WebCore::RTCSessionDescription::type const): Deleted. (WebCore::RTCSessionDescription::sdp const): Deleted. (WebCore::RTCSessionDescription::setSdp): Deleted. * Modules/notifications/Notification.cpp: * Modules/notifications/Notification.h: * Modules/paymentrequest/PaymentRequest.cpp: * Modules/paymentrequest/PaymentRequest.h: * Modules/paymentrequest/PaymentResponse.cpp: * Modules/paymentrequest/PaymentResponse.h: * Modules/speech/SpeechSynthesisUtterance.cpp: * Modules/speech/SpeechSynthesisUtterance.h: * Modules/webaudio/AnalyserNode.cpp: * Modules/webaudio/AnalyserNode.h: * Modules/webaudio/AudioBasicInspectorNode.cpp: * Modules/webaudio/AudioBasicInspectorNode.h: * Modules/webaudio/AudioBasicProcessorNode.cpp: * Modules/webaudio/AudioBasicProcessorNode.h: * Modules/webaudio/AudioBufferSourceNode.cpp: * Modules/webaudio/AudioBufferSourceNode.h: * Modules/webaudio/AudioContext.cpp: * Modules/webaudio/AudioContext.h: * Modules/webaudio/AudioDestinationNode.cpp: * Modules/webaudio/AudioDestinationNode.h: * Modules/webaudio/AudioNode.cpp: * Modules/webaudio/AudioNode.h: * Modules/webaudio/AudioScheduledSourceNode.cpp: * Modules/webaudio/AudioScheduledSourceNode.h: * Modules/webaudio/BiquadFilterNode.cpp: * Modules/webaudio/BiquadFilterNode.h: * Modules/webaudio/ChannelMergerNode.cpp: * Modules/webaudio/ChannelMergerNode.h: * Modules/webaudio/ChannelSplitterNode.cpp: * Modules/webaudio/ChannelSplitterNode.h: * Modules/webaudio/ConvolverNode.cpp: * Modules/webaudio/ConvolverNode.h: * Modules/webaudio/DefaultAudioDestinationNode.cpp: * Modules/webaudio/DefaultAudioDestinationNode.h: * Modules/webaudio/DelayNode.cpp: * Modules/webaudio/DelayNode.h: * Modules/webaudio/DynamicsCompressorNode.cpp: * Modules/webaudio/DynamicsCompressorNode.h: * Modules/webaudio/GainNode.cpp: * Modules/webaudio/GainNode.h: * Modules/webaudio/MediaElementAudioSourceNode.cpp: * Modules/webaudio/MediaElementAudioSourceNode.h: * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: * Modules/webaudio/MediaStreamAudioDestinationNode.h: * Modules/webaudio/MediaStreamAudioSourceNode.cpp: * Modules/webaudio/MediaStreamAudioSourceNode.h: * Modules/webaudio/OfflineAudioContext.cpp: * Modules/webaudio/OfflineAudioContext.h: * Modules/webaudio/OfflineAudioDestinationNode.cpp: * Modules/webaudio/OfflineAudioDestinationNode.h: * Modules/webaudio/OscillatorNode.cpp: * Modules/webaudio/OscillatorNode.h: * Modules/webaudio/PannerNode.cpp: * Modules/webaudio/PannerNode.h: * Modules/webaudio/ScriptProcessorNode.cpp: * Modules/webaudio/ScriptProcessorNode.h: * Modules/webaudio/WaveShaperNode.cpp: * Modules/webaudio/WaveShaperNode.h: * Modules/webgpu/GPUCanvasContext.cpp: * Modules/webgpu/GPUCanvasContext.h: * Modules/websockets/WebSocket.cpp: * Modules/websockets/WebSocket.h: * Modules/webvr/VRDisplay.cpp: * Modules/webvr/VRDisplay.h: (WebCore::VRDisplay::isPresenting const): Deleted. (WebCore::VRDisplay::displayName const): Deleted. (WebCore::VRDisplay::displayId const): Deleted. (WebCore::VRDisplay::depthNear const): Deleted. (WebCore::VRDisplay::setDepthNear): Deleted. (WebCore::VRDisplay::depthFar const): Deleted. (WebCore::VRDisplay::setDepthFar): Deleted. (WebCore::VRDisplay::document): Deleted. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * animation/CSSAnimation.cpp: * animation/CSSAnimation.h: * animation/CSSTransition.cpp: * animation/CSSTransition.h: * animation/DeclarativeAnimation.cpp: * animation/DeclarativeAnimation.h: * animation/WebAnimation.cpp: * animation/WebAnimation.h: * bindings/js/ScriptWrappable.h: * css/CSSComputedStyleDeclaration.cpp: * css/CSSComputedStyleDeclaration.h: * css/CSSStyleDeclaration.cpp: (): Deleted. * css/CSSStyleDeclaration.h: * css/DOMMatrix.h: * css/DOMMatrixReadOnly.cpp: * css/DOMMatrixReadOnly.h: * css/FontFaceSet.cpp: * css/FontFaceSet.h: * css/PropertySetCSSStyleDeclaration.cpp: * css/PropertySetCSSStyleDeclaration.h: * css/WebKitCSSMatrix.cpp: * css/WebKitCSSMatrix.h: * css/typedom/TypedOMCSSImageValue.cpp: Added. * css/typedom/TypedOMCSSImageValue.h: * css/typedom/TypedOMCSSNumericValue.cpp: Added. * css/typedom/TypedOMCSSNumericValue.h: * css/typedom/TypedOMCSSStyleValue.cpp: Added. * css/typedom/TypedOMCSSStyleValue.h: * css/typedom/TypedOMCSSUnitValue.cpp: Added. * css/typedom/TypedOMCSSUnitValue.h: * css/typedom/TypedOMCSSUnparsedValue.cpp: Added. * css/typedom/TypedOMCSSUnparsedValue.h: * dom/AbortController.cpp: * dom/AbortController.h: * dom/AbortSignal.cpp: * dom/AbortSignal.h: * dom/AllDescendantsCollection.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h. * dom/AllDescendantsCollection.h: * dom/ChildNodeList.cpp: * dom/ChildNodeList.h: * dom/ClassCollection.cpp: * dom/ClassCollection.h: * dom/DOMImplementation.cpp: * dom/DOMImplementation.h: (WebCore::DOMImplementation::ref): Deleted. (WebCore::DOMImplementation::deref): Deleted. (WebCore::DOMImplementation::document): Deleted. (WebCore::DOMImplementation::hasFeature): Deleted. * dom/DOMPoint.h: * dom/DOMPointReadOnly.cpp: * dom/DOMPointReadOnly.h: * dom/DOMQuad.cpp: * dom/DOMQuad.h: * dom/DOMRect.h: * dom/DOMRectReadOnly.cpp: Copied from Source/WebCore/dom/DOMPointReadOnly.cpp. * dom/DOMRectReadOnly.h: * dom/DataTransferItemList.cpp: * dom/DataTransferItemList.h: (WebCore::DataTransferItemList::ref): Deleted. (WebCore::DataTransferItemList::deref): Deleted. (WebCore::DataTransferItemList::dataTransfer): Deleted. (WebCore::DataTransferItemList::hasItems const): Deleted. (WebCore::DataTransferItemList::items const): Deleted. * dom/DatasetDOMStringMap.cpp: * dom/DatasetDOMStringMap.h: * dom/DocumentParser.h: * dom/EventTarget.cpp: * dom/EventTarget.h: * dom/LiveNodeList.cpp: * dom/LiveNodeList.h: * dom/MessageChannel.cpp: * dom/MessagePort.cpp: * dom/MessagePort.h: * dom/NameNodeList.cpp: * dom/NameNodeList.h: * dom/NamedNodeMap.cpp: * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::NamedNodeMap): Deleted. (WebCore::NamedNodeMap::element): Deleted. * dom/NodeIterator.cpp: * dom/NodeIterator.h: (WebCore::NodeIterator::detach): Deleted. (WebCore::NodeIterator::referenceNode const): Deleted. (WebCore::NodeIterator::pointerBeforeReferenceNode const): Deleted. * dom/NodeList.cpp: Copied from Source/WebCore/xml/XMLHttpRequestEventTarget.h. * dom/NodeList.h: * dom/NodeRareData.cpp: * dom/ScriptExecutionContext.cpp: * dom/SimulatedClick.cpp: * dom/StaticNodeList.cpp: * dom/StaticNodeList.h: * dom/TagCollection.cpp: * dom/TagCollection.h: * dom/TreeWalker.cpp: * dom/TreeWalker.h: (WebCore::TreeWalker::create): Deleted. (WebCore::TreeWalker::currentNode): Deleted. (WebCore::TreeWalker::currentNode const): Deleted. * fileapi/Blob.cpp: * fileapi/Blob.h: * fileapi/File.cpp: * fileapi/File.h: * fileapi/FileList.cpp: * fileapi/FileList.h: (WebCore::FileList::create): Deleted. (WebCore::FileList::length const): Deleted. (WebCore::FileList::isEmpty const): Deleted. (WebCore::FileList::files const): Deleted. (WebCore::FileList::file const): Deleted. (WebCore::FileList::FileList): Deleted. (WebCore::FileList::append): Deleted. (WebCore::FileList::clear): Deleted. * fileapi/FileReader.cpp: * fileapi/FileReader.h: * html/CachedHTMLCollection.h: * html/GenericCachedHTMLCollection.cpp: * html/GenericCachedHTMLCollection.h: * html/HTMLAllCollection.cpp: * html/HTMLAllCollection.h: * html/HTMLCollection.cpp: * html/HTMLCollection.h: * html/HTMLFormControlsCollection.cpp: * html/HTMLFormControlsCollection.h: * html/HTMLNameCollection.cpp: * html/HTMLNameCollection.h: * html/HTMLOptionsCollection.cpp: * html/HTMLOptionsCollection.h: * html/HTMLTableRowsCollection.cpp: * html/HTMLTableRowsCollection.h: * html/ImageBitmap.cpp: * html/ImageBitmap.h: (WebCore::ImageBitmap::isDetached const): Deleted. (WebCore::ImageBitmap::buffer): Deleted. (WebCore::ImageBitmap::originClean const): Deleted. * html/LabelsNodeList.cpp: * html/LabelsNodeList.h: * html/MediaController.cpp: * html/MediaController.h: * html/OffscreenCanvas.cpp: * html/OffscreenCanvas.h: * html/RadioNodeList.cpp: * html/RadioNodeList.h: * html/canvas/CanvasRenderingContext.cpp: * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2D.cpp: * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2DBase.cpp: * html/canvas/CanvasRenderingContext2DBase.h: * html/canvas/GPUBasedCanvasRenderingContext.h: * html/canvas/ImageBitmapRenderingContext.cpp: * html/canvas/ImageBitmapRenderingContext.h: * html/canvas/OffscreenCanvasRenderingContext2D.cpp: * html/canvas/OffscreenCanvasRenderingContext2D.h: * html/canvas/PaintRenderingContext2D.cpp: * html/canvas/PaintRenderingContext2D.h: * html/canvas/PlaceholderRenderingContext.cpp: * html/canvas/PlaceholderRenderingContext.h: * html/canvas/WebGL2RenderingContext.cpp: * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: * html/canvas/WebGLRenderingContextBase.h: * html/track/AudioTrackList.h: * html/track/DataCue.cpp: * html/track/DataCue.h: * html/track/InbandDataTextTrack.cpp: * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.cpp: * html/track/LoadableTextTrack.h: * html/track/TextTrack.cpp: * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: * html/track/TextTrackCue.h: * html/track/TextTrackCueGeneric.cpp: * html/track/TextTrackCueGeneric.h: * html/track/TextTrackList.cpp: * html/track/TextTrackList.h: * html/track/TrackListBase.cpp: * html/track/TrackListBase.h: * html/track/VTTCue.cpp: * html/track/VTTCue.h: * html/track/VideoTrackList.h: * loader/appcache/DOMApplicationCache.cpp: * loader/appcache/DOMApplicationCache.h: * page/AbstractDOMWindow.cpp: * page/AbstractDOMWindow.h: * page/BarProp.cpp: * page/BarProp.h: (WebCore::BarProp::create): Deleted. * page/DOMWindow.cpp: * page/DOMWindow.h: * page/EventSource.cpp: * page/EventSource.h: * page/History.cpp: * page/History.h: * page/Location.cpp: * page/Location.h: (WebCore::Location::create): Deleted. (WebCore::Location::toString const): Deleted. * page/Navigator.cpp: * page/Navigator.h: * page/Performance.cpp: * page/Performance.h: * page/RemoteDOMWindow.cpp: * page/RemoteDOMWindow.h: * page/Screen.cpp: * page/Screen.h: * page/VisualViewport.cpp: * page/VisualViewport.h: * plugins/DOMMimeTypeArray.cpp: * plugins/DOMMimeTypeArray.h: (WebCore::DOMMimeTypeArray::create): Deleted. * plugins/DOMPlugin.cpp: * plugins/DOMPlugin.h: (WebCore::DOMPlugin::create): Deleted. * plugins/DOMPluginArray.cpp: * plugins/DOMPluginArray.h: (WebCore::DOMPluginArray::create): Deleted. * storage/Storage.cpp: * storage/Storage.h: (WebCore::Storage::area const): Deleted. * workers/AbstractWorker.cpp: * workers/AbstractWorker.h: * workers/DedicatedWorkerGlobalScope.cpp: * workers/DedicatedWorkerGlobalScope.h: * workers/Worker.cpp: * workers/Worker.h: * workers/WorkerGlobalScope.cpp: * workers/WorkerGlobalScope.h: * workers/service/ServiceWorker.cpp: * workers/service/ServiceWorker.h: * workers/service/ServiceWorkerContainer.cpp: * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerGlobalScope.cpp: * workers/service/ServiceWorkerGlobalScope.h: * workers/service/ServiceWorkerRegistration.cpp: * workers/service/ServiceWorkerRegistration.h: * worklets/PaintWorkletGlobalScope.cpp: * worklets/PaintWorkletGlobalScope.h: * worklets/Worklet.cpp: * worklets/Worklet.h: * worklets/WorkletGlobalScope.cpp: * worklets/WorkletGlobalScope.h: * xml/XMLHttpRequest.cpp: * xml/XMLHttpRequest.h: * xml/XMLHttpRequestEventTarget.h: * xml/XMLHttpRequestUpload.cpp: * xml/XMLHttpRequestUpload.h: * xml/XPathParser.cpp: Source/WTF: * wtf/ForbidHeapAllocation.h: * wtf/IsoMalloc.h: * wtf/IsoMallocInlines.h: Canonical link: https://commits.webkit.org/210879@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-04 19:07:53 +00:00
WTF_MAKE_ISO_ALLOCATED(InbandDataTextTrack);
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
public:
Improve some media code https://bugs.webkit.org/show_bug.cgi?id=208322 Reviewed by Anders Carlsson. Source/WebCore: - TextTrack objects now take Document instead of ScriptExecutionContext. - Made more TextTrack functions private and protected. - Made TextTrack parsing functions use return values rather than out arguments. - Use references rather than pointers and Ref rather than RefPtr for non-null things. - Made MediaControlsHost use a WeakPtr instead of a raw pointer. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::alwaysOnKeyword): Made private to this file instead of exposed in header. (WebCore::manualKeyword): Ditto. (WebCore::MediaControlsHost::create): Take a reference instead of a pointer to the media element. (WebCore::MediaControlsHost::MediaControlsHost): Ditto, and make a weak pointer. (WebCore::MediaControlsHost::sortedTrackListForMenu): Added null check. (WebCore::MediaControlsHost::displayNameForTrack): Ditto. (WebCore::MediaControlsHost::captionMenuOffItem): Ditto. (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto. (WebCore::MediaControlsHost::captionDisplayMode const): Ditto. (WebCore::MediaControlsHost::setSelectedTextTrack): Ditto. (WebCore::MediaControlsHost::textTrackContainer): Ditto. (WebCore::MediaControlsHost::allowsInlineMediaPlayback const): Ditto. (WebCore::MediaControlsHost::supportsFullscreen const): Ditto. (WebCore::MediaControlsHost::isVideoLayerInline const): Ditto. (WebCore::MediaControlsHost::isInMediaDocument const): Ditto. (WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline): Ditto. (WebCore::MediaControlsHost::userGestureRequired const): Ditto. (WebCore::MediaControlsHost::shouldForceControlsDisplay const): Ditto. (WebCore::MediaControlsHost::externalDeviceDisplayName const): Ditto. (WebCore::MediaControlsHost::externalDeviceType const): Ditto. (WebCore::MediaControlsHost::controlsDependOnPageScaleFactor const): Ditto. (WebCore::MediaControlsHost::setControlsDependOnPageScaleFactor): Ditto. (WebCore::MediaControlsHost::generateUUID): Made a static member. (WebCore::MediaControlsHost::shadowRootCSSText): Ditto. (WebCore::MediaControlsHost::base64StringForIconNameAndType): Ditto. (WebCore::MediaControlsHost::formattedStringForDuration): Ditto. (WebCore::MediaControlsHost::compactMode const): Tweaked logic a bit. * Modules/mediacontrols/MediaControlsHost.h: Made various member functions into static member functions, used references instead of pointers for things that are never null, used WeakPtr for m_mediaElement. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Document instead of ScriptExecutionContext. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Document instead of ScriptExecutionContext. (WebCore::HTMLMediaElement::updateCaptionContainer): Pass reference to MediaControlsHost::create. (WebCore::HTMLMediaElement::setSelectedTextTrack): Update since special items are now references rather than pointers. (WebCore::HTMLMediaElement::updateTextTrackDisplay): Pass reference. (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Ditto. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::parseAttribute): Removed setIsDefault function since the track can simply read the attribute out of the element instead. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Update since special items are now referencse rather than pointers. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Document instead of ScriptExecutionContext. (WebCore::DataCue::create): Moved these functions out of the header. * html/track/DataCue.h: Updated for the above. * html/track/DataCue.idl: Ditto. * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::InbandDataTextTrack): Document instead of ScriptExecutionContext. (WebCore::InbandDataTextTrack::create): Ditto. (WebCore::InbandDataTextTrack::addDataCue): Ditto. Also use reference instead of pointer when calling hasCue. * html/track/InbandDataTextTrack.h: Updated for the above. * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Document instead of ScriptExecutionContext. (WebCore::InbandGenericTextTrack::create): Ditto. (WebCore::InbandGenericTextTrack::addGenericCue): Ditto. Also use reference instead of pointer when calling hasCue. (WebCore::InbandGenericTextTrack::parser): Ditto. (WebCore::InbandGenericTextTrack::newCuesParsed): Ditto. Also use return value from takeCues instead of out arguenmt from getNewCues. Also use reference instead of pointer when calling hasCue. (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto. * html/track/InbandGenericTextTrack.h: Update for above. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Document instead of ScriptExecutionContext. (WebCore::InbandTextTrack::InbandTextTrack): Ditto. * html/track/InbandTextTrack.h: Update for above. * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Document instead of ScriptExecutionContext. (WebCore::InbandWebVTTTextTrack::create): Ditto. (WebCore::InbandWebVTTTextTrack::parser): Ditto. (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. Also use return value from takeCues instead of out arguenmt from getNewCues. Also use reference instead of pointer when calling hasCue. (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Ditto. * html/track/InbandWebVTTTextTrack.h: Update for above. * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::create): Moved here from header. (WebCore::LoadableTextTrack::loadTimerFired): Document instead of ScriptExecutionContext. (WebCore::LoadableTextTrack::newRegionsAvailable): Use return value from getNewRegions instead of out argument. (WebCore::LoadableTextTrack::isDefault const): New implementation that does not rely on a data member; checks attribute on video element. * html/track/LoadableTextTrack.h: Updated for above changes. * html/track/TextTrack.cpp: (WebCore::TextTrack::captionMenuOffItem): Return a reference rather than a pointer. (WebCore::TextTrack::captionMenuAutomaticItem): Ditto. (WebCore::TextTrack::create): Document rather than ScriptExecutionContext. (WebCore::TextTrack::document const): Added. For use by derived classes. (WebCore::TextTrack::addRegion): Ref rather than RefPtr. (WebCore::TextTrack::removeRegion): Reference rather than pointer. (WebCore::TextTrack::cueWillChange): Ditto. (WebCore::TextTrack::cueDidChange): Ditto. (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: Removed declarations of non-existent disabledKeyword, hiddenKeyword, and showingKeyword functions. Made setKind, client, and hasCue protected. Made overrides of eventTargetInterface, scriptExecutionContext, and logClassName private. Removed setIsDefault. Updated for changes above. * html/track/TextTrack.idl: Did what FIXME suggested, making the region parameters non-nullable. Passing null silently did nothing before. There is some small risk of website incompatibility if someone accidentally relied on this WebKit-specific behavior. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::create): Document instead of ScriptExecutionContext. (WebCore::TextTrackCue::TextTrackCue): Ditto. (WebCore::TextTrackCue::willChange): Pass reference. (WebCore::TextTrackCue::didChange): Ditto. * html/track/TextTrackCue.h: Update for above changes. * html/track/TextTrackCue.idl: Ditto. * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Update since the base class now takes an rvalue reference to the string. (WebCore::TextTrackCueGeneric::isOrderedBefore const): Use auto. (WebCore::TextTrackCueGeneric::isPositionedAbove const): Ditto. * html/track/VTTCue.cpp: (WebCore::VTTCue::create): Document instead of ScriptExecutionContext. Also take String with an rvalue reference. (WebCore::VTTCue::VTTCue): Ditto. * html/track/VTTCue.h: Update for above changes. * html/track/VTTCue.idl: Ditto. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::WebVTTParser): Document instead of ScriptExecutionContext. References instead of pointers. Initialize m_state in class definition. (WebCore::WebVTTParser::takeCues): Renamed from getNewCues and changed to use a return value instead of an out argument. (WebCore::WebVTTParser::takeRegions): Ditto. (WebCore::WebVTTParser::takeStyleSheets): Ditto. (WebCore::WebVTTParser::parseCueData): Remove null check of m_client. (WebCore::WebVTTParser::parse): Ditto. (WebCore::WebVTTParser::collectWebVTTBlock): Ditto. (WebCore::WebVTTParser::checkAndCreateRegion): Pass document. (WebCore::WebVTTParser::checkAndStoreRegion): Use Vector::removeFirstMatching instead of Vector::removeFirst. (WebCore::WebVTTParser::createNewCue): Remove null check of m_client. * html/track/WebVTTParser.h: Update for above changes. * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::TextTrackLoader): Document instead of ScriptExecutionContext. References instead of pointers. Initialize data members in in class definition. (WebCore::TextTrackLoader::processNewCueData): Pass references. (WebCore::TextTrackLoader::corsPolicyPreventedLoad): Use m_document. (WebCore::TextTrackLoader::load): Ditto. (WebCore::TextTrackLoader::getNewCues): Use takeCues. (WebCore::TextTrackLoader::getNewRegions): Changed to return a vector instead of using an out argument. Use takeRegions. (WebCore::TextTrackLoader::getNewStyleSheets): Ditto. * loader/TextTrackLoader.h: Updated for the above. * page/CaptionUserPreferences.cpp: (WebCore::trackDisplayName): Updated since these are references. (WebCore::CaptionUserPreferences::mediaSelectionOptionForTrack const): Ditto. (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto. * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Ditto. (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Ditto. * platform/cocoa/PlaybackSessionModelMediaElement.mm: (WebCore::PlaybackSessionModelMediaElement::selectLegibleMediaOption): Ditto. (WebCore::PlaybackSessionModelMediaElement::legibleMediaSelectedIndex const): Updated to use references rather than pointers. Refactored the logic to use Optional and nested if statements to make the algorithm clearer. Source/WTF: * wtf/WeakPtr.h: (WTF::WeakPtr::operator! const): Added. Canonical link: https://commits.webkit.org/221612@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-06 16:08:33 +00:00
static Ref<InbandDataTextTrack> create(Document&, TextTrackClient&, InbandTextTrackPrivate&);
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
virtual ~InbandDataTextTrack();
private:
Improve some media code https://bugs.webkit.org/show_bug.cgi?id=208322 Reviewed by Anders Carlsson. Source/WebCore: - TextTrack objects now take Document instead of ScriptExecutionContext. - Made more TextTrack functions private and protected. - Made TextTrack parsing functions use return values rather than out arguments. - Use references rather than pointers and Ref rather than RefPtr for non-null things. - Made MediaControlsHost use a WeakPtr instead of a raw pointer. * Modules/mediacontrols/MediaControlsHost.cpp: (WebCore::alwaysOnKeyword): Made private to this file instead of exposed in header. (WebCore::manualKeyword): Ditto. (WebCore::MediaControlsHost::create): Take a reference instead of a pointer to the media element. (WebCore::MediaControlsHost::MediaControlsHost): Ditto, and make a weak pointer. (WebCore::MediaControlsHost::sortedTrackListForMenu): Added null check. (WebCore::MediaControlsHost::displayNameForTrack): Ditto. (WebCore::MediaControlsHost::captionMenuOffItem): Ditto. (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto. (WebCore::MediaControlsHost::captionDisplayMode const): Ditto. (WebCore::MediaControlsHost::setSelectedTextTrack): Ditto. (WebCore::MediaControlsHost::textTrackContainer): Ditto. (WebCore::MediaControlsHost::allowsInlineMediaPlayback const): Ditto. (WebCore::MediaControlsHost::supportsFullscreen const): Ditto. (WebCore::MediaControlsHost::isVideoLayerInline const): Ditto. (WebCore::MediaControlsHost::isInMediaDocument const): Ditto. (WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline): Ditto. (WebCore::MediaControlsHost::userGestureRequired const): Ditto. (WebCore::MediaControlsHost::shouldForceControlsDisplay const): Ditto. (WebCore::MediaControlsHost::externalDeviceDisplayName const): Ditto. (WebCore::MediaControlsHost::externalDeviceType const): Ditto. (WebCore::MediaControlsHost::controlsDependOnPageScaleFactor const): Ditto. (WebCore::MediaControlsHost::setControlsDependOnPageScaleFactor): Ditto. (WebCore::MediaControlsHost::generateUUID): Made a static member. (WebCore::MediaControlsHost::shadowRootCSSText): Ditto. (WebCore::MediaControlsHost::base64StringForIconNameAndType): Ditto. (WebCore::MediaControlsHost::formattedStringForDuration): Ditto. (WebCore::MediaControlsHost::compactMode const): Tweaked logic a bit. * Modules/mediacontrols/MediaControlsHost.h: Made various member functions into static member functions, used references instead of pointers for things that are never null, used WeakPtr for m_mediaElement. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Document instead of ScriptExecutionContext. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Document instead of ScriptExecutionContext. (WebCore::HTMLMediaElement::updateCaptionContainer): Pass reference to MediaControlsHost::create. (WebCore::HTMLMediaElement::setSelectedTextTrack): Update since special items are now references rather than pointers. (WebCore::HTMLMediaElement::updateTextTrackDisplay): Pass reference. (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Ditto. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::parseAttribute): Removed setIsDefault function since the track can simply read the attribute out of the element instead. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Update since special items are now referencse rather than pointers. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Document instead of ScriptExecutionContext. (WebCore::DataCue::create): Moved these functions out of the header. * html/track/DataCue.h: Updated for the above. * html/track/DataCue.idl: Ditto. * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::InbandDataTextTrack): Document instead of ScriptExecutionContext. (WebCore::InbandDataTextTrack::create): Ditto. (WebCore::InbandDataTextTrack::addDataCue): Ditto. Also use reference instead of pointer when calling hasCue. * html/track/InbandDataTextTrack.h: Updated for the above. * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Document instead of ScriptExecutionContext. (WebCore::InbandGenericTextTrack::create): Ditto. (WebCore::InbandGenericTextTrack::addGenericCue): Ditto. Also use reference instead of pointer when calling hasCue. (WebCore::InbandGenericTextTrack::parser): Ditto. (WebCore::InbandGenericTextTrack::newCuesParsed): Ditto. Also use return value from takeCues instead of out arguenmt from getNewCues. Also use reference instead of pointer when calling hasCue. (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto. * html/track/InbandGenericTextTrack.h: Update for above. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Document instead of ScriptExecutionContext. (WebCore::InbandTextTrack::InbandTextTrack): Ditto. * html/track/InbandTextTrack.h: Update for above. * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Document instead of ScriptExecutionContext. (WebCore::InbandWebVTTTextTrack::create): Ditto. (WebCore::InbandWebVTTTextTrack::parser): Ditto. (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. Also use return value from takeCues instead of out arguenmt from getNewCues. Also use reference instead of pointer when calling hasCue. (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Ditto. * html/track/InbandWebVTTTextTrack.h: Update for above. * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::create): Moved here from header. (WebCore::LoadableTextTrack::loadTimerFired): Document instead of ScriptExecutionContext. (WebCore::LoadableTextTrack::newRegionsAvailable): Use return value from getNewRegions instead of out argument. (WebCore::LoadableTextTrack::isDefault const): New implementation that does not rely on a data member; checks attribute on video element. * html/track/LoadableTextTrack.h: Updated for above changes. * html/track/TextTrack.cpp: (WebCore::TextTrack::captionMenuOffItem): Return a reference rather than a pointer. (WebCore::TextTrack::captionMenuAutomaticItem): Ditto. (WebCore::TextTrack::create): Document rather than ScriptExecutionContext. (WebCore::TextTrack::document const): Added. For use by derived classes. (WebCore::TextTrack::addRegion): Ref rather than RefPtr. (WebCore::TextTrack::removeRegion): Reference rather than pointer. (WebCore::TextTrack::cueWillChange): Ditto. (WebCore::TextTrack::cueDidChange): Ditto. (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: Removed declarations of non-existent disabledKeyword, hiddenKeyword, and showingKeyword functions. Made setKind, client, and hasCue protected. Made overrides of eventTargetInterface, scriptExecutionContext, and logClassName private. Removed setIsDefault. Updated for changes above. * html/track/TextTrack.idl: Did what FIXME suggested, making the region parameters non-nullable. Passing null silently did nothing before. There is some small risk of website incompatibility if someone accidentally relied on this WebKit-specific behavior. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::create): Document instead of ScriptExecutionContext. (WebCore::TextTrackCue::TextTrackCue): Ditto. (WebCore::TextTrackCue::willChange): Pass reference. (WebCore::TextTrackCue::didChange): Ditto. * html/track/TextTrackCue.h: Update for above changes. * html/track/TextTrackCue.idl: Ditto. * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Update since the base class now takes an rvalue reference to the string. (WebCore::TextTrackCueGeneric::isOrderedBefore const): Use auto. (WebCore::TextTrackCueGeneric::isPositionedAbove const): Ditto. * html/track/VTTCue.cpp: (WebCore::VTTCue::create): Document instead of ScriptExecutionContext. Also take String with an rvalue reference. (WebCore::VTTCue::VTTCue): Ditto. * html/track/VTTCue.h: Update for above changes. * html/track/VTTCue.idl: Ditto. * html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::WebVTTParser): Document instead of ScriptExecutionContext. References instead of pointers. Initialize m_state in class definition. (WebCore::WebVTTParser::takeCues): Renamed from getNewCues and changed to use a return value instead of an out argument. (WebCore::WebVTTParser::takeRegions): Ditto. (WebCore::WebVTTParser::takeStyleSheets): Ditto. (WebCore::WebVTTParser::parseCueData): Remove null check of m_client. (WebCore::WebVTTParser::parse): Ditto. (WebCore::WebVTTParser::collectWebVTTBlock): Ditto. (WebCore::WebVTTParser::checkAndCreateRegion): Pass document. (WebCore::WebVTTParser::checkAndStoreRegion): Use Vector::removeFirstMatching instead of Vector::removeFirst. (WebCore::WebVTTParser::createNewCue): Remove null check of m_client. * html/track/WebVTTParser.h: Update for above changes. * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::TextTrackLoader): Document instead of ScriptExecutionContext. References instead of pointers. Initialize data members in in class definition. (WebCore::TextTrackLoader::processNewCueData): Pass references. (WebCore::TextTrackLoader::corsPolicyPreventedLoad): Use m_document. (WebCore::TextTrackLoader::load): Ditto. (WebCore::TextTrackLoader::getNewCues): Use takeCues. (WebCore::TextTrackLoader::getNewRegions): Changed to return a vector instead of using an out argument. Use takeRegions. (WebCore::TextTrackLoader::getNewStyleSheets): Ditto. * loader/TextTrackLoader.h: Updated for the above. * page/CaptionUserPreferences.cpp: (WebCore::trackDisplayName): Updated since these are references. (WebCore::CaptionUserPreferences::mediaSelectionOptionForTrack const): Ditto. (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto. * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Ditto. (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Ditto. * platform/cocoa/PlaybackSessionModelMediaElement.mm: (WebCore::PlaybackSessionModelMediaElement::selectLegibleMediaOption): Ditto. (WebCore::PlaybackSessionModelMediaElement::legibleMediaSelectedIndex const): Updated to use references rather than pointers. Refactored the logic to use Optional and nested if statements to make the algorithm clearer. Source/WTF: * wtf/WeakPtr.h: (WTF::WeakPtr::operator! const): Added. Canonical link: https://commits.webkit.org/221612@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-06 16:08:33 +00:00
InbandDataTextTrack(Document&, TextTrackClient&, InbandTextTrackPrivate&);
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
Remove PassRefPtr use from the "html" directory, other improvements https://bugs.webkit.org/show_bug.cgi?id=166635 Reviewed by Alex Christensen. Source/WebCore: * CMakeLists.txt: Removed the duplicate copies of all the WebGL-specific files in the main list of source files; there is no value in listing them twice. Replaced WebGLGetInfo.cpp with WebGLAny.cpp. * Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::removeSourceBuffer): Updates since the tracks functions return references now. * Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime): Removed unneeded SourceBufferPrivate* argument. (WebCore::SourceBuffer::appendBufferTimerFired): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveRenderingError): Ditto. (WebCore::SourceBuffer::videoTracks): Return a reference rather than a pointer. (WebCore::SourceBuffer::audioTracks): Ditto. (WebCore::SourceBuffer::textTracks): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Removed unneeded SourceBufferPrivate* argument. (WebCore::SourceBuffer::validateInitializationSegment): Updated since tracks functions now return a pointer. (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Removed unneeded SourceBufferPrivate* argument. (WebCore::SourceBuffer::sourceBufferPrivateHasAudio): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateHasVideo): Ditto. (WebCore::SourceBuffer::videoTrackSelectedChanged): Take a reference rather than a pointer. (WebCore::SourceBuffer::audioTrackEnabledChanged): Ditto. (WebCore::SourceBuffer::textTrackModeChanged): Ditto. (WebCore::SourceBuffer::textTrackAddCue): Ditto. (WebCore::SourceBuffer::textTrackAddCues): Ditto. (WebCore::SourceBuffer::textTrackRemoveCue): Ditto. (WebCore::SourceBuffer::textTrackRemoveCues): Ditto. (WebCore::SourceBuffer::textTrackKindChanged): Ditto. (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples): Ditto. (WebCore::SourceBuffer::provideMediaData): Ditto. (WebCore::SourceBuffer::reenqueueMediaForTime): Ditto. * Modules/mediasource/SourceBuffer.h: Updated for above changes. * WebCore.xcodeproj/project.pbxproj: Replaced WebGLGetInfo with WebGLAny. * bindings/js/JSCanvasRenderingContext2DCustom.cpp: (WebCore::toHTMLCanvasStyle): Removed explicit cast to CanvasStyle and unneeded conversion to a pointer since CanvasStyle constructors now take references. * bindings/js/JSPluginElementFunctions.cpp: (WebCore::pluginInstance): Updated since bindingsInstance now returns a raw pointer. (WebCore::pluginScriptObject): Ditto. * bindings/js/JSWebGL2RenderingContextCustom.cpp: (WebCore::toJS): Moved to WebGLAny.h/cpp. (WebCore::JSWebGL2RenderingContext::getIndexedParameter): Updated since the toJS function in WebGLAny.h takes references, not pointers. * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: Removed quite a few unneeded includes and got rid of a lot of unneeded JSC prefixes. (WebCore::toJS): Moved to WebGLAny.h/cpp. (WebCore::toJSNewlyCreated): (WebCore::objectParameter): Renamed from getObjectParameter and also changed to take a pointer to member function so we don't need an enum and a switch statement. (WebCore::toJS): Changed to take references rather than pointers. (WebCore::JSWebGLRenderingContextBase::getAttachedShaders): Use a modern for loop. (WebCore::JSWebGLRenderingContextBase::getBufferParameter): Use objectParameter. (WebCore::JSWebGLRenderingContextBase::getRenderbufferParameter): Ditto. (WebCore::JSWebGLRenderingContextBase::getVertexAttrib): Ditto. (WebCore::toNumberVector): Renamed from toVector, since this is specifically for vectors of numbers. Use uncheckedAppend instead of assignment. (WebCore::functionForUniform): Marked this inline. (WebCore::dataFunctionf): Updated for above changes. (WebCore::dataFunctioni): Ditto. (WebCore::dataFunctionMatrix): Ditto. * bindings/js/ScriptModuleLoader.cpp: (WebCore::ScriptModuleLoader::fetch): Moved assertions to the top of the function. Also added a FIXME because it's unclear why these assertions are correct. Updated to use downcastScriptElement instead of toScriptElementIfPossible. * dom/Document.h: Sorted list of forward-declared classes. Removed duplicate forward declaration of ScriptModuleLoader. * dom/PendingScript.cpp: (WebCore::PendingScript::create): Take a ScriptElement instead of an Element. (WebCore::PendingScript::PendingScript): Ditto. (WebCore::PendingScript::loadableScript): Moved inline to header and made inline. (WebCore::PendingScript::setClient): Take a reference instead of a pointer. * dom/PendingScript.h: UPdated for above changes. * dom/ScriptElement.cpp: (WebCore::ScriptElement::prepareScript): Pass a reference instead of a pointer. (WebCore::ScriptElement::ref): Added. Forwards ref/deref to the underlying element so we can use Ref and RefPtr with this class. (WebCore::ScriptElement::deref): Ditto. (WebCore::isScriptElement): Added. Replaces one of the two uses of toScriptElementIfPossible, and is similar in style to is<Element>. (WebCore::downcastScriptElement): Ditto, but for downcast. * dom/ScriptElement.h: Updated for above changes. * dom/ScriptRunner.cpp: (WebCore::ScriptRunner::queueScriptForExecution): Take reference rather than pointer, and pass ScriptElement rather than Element. (WebCore::ScriptRunner::notifyFinished): Ditto. (WebCore::ScriptRunner::timerFired): Ditto. * dom/ScriptRunner.h: Updated for above changes. * html/FileInputType.cpp: (WebCore::FileInputType::files): Updated since m_fileList is a Ref. (WebCore::FileInputType::createFileList): Updated to return a Ref instead of a PassRefPtr. Also use reserveInitialCapacity/uncheckedAppend. (WebCore::FileInputType::requestIcon): Updated since the updateRendering function is now called iconLoaded. Also use references instead of pointers. (WebCore::FileInputType::setFiles): Take a RefPtr&& insted of a PassRefPtr. Also put some conditional code inside an #if. (WebCore::FileInputType::filesChosen): Updated for function name change. (WebCore::FileInputType::iconLoaded): Renamed from updateRendering. Changed argument to RefPtr&& from PassRefPtr. (WebCore::FileInputType::defaultToolTip): Got rid of unneeded local variable and used the correct type, unsigned, rather than size_t. * html/FileInputType.h: Updated for the above changes, use final instead of override, and use Ref instead of RefPtr. * html/HTMLElement.cpp: (WebCore::HTMLElement::form): Renamed from virtualForm. * html/HTMLElement.h: Replaced the form/virtualForm pair of functions with just a form function. The old design dates back before we had "final" for virtual functions, and now we can just use that instead. * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::virtualForm): Deleted. * html/HTMLFormControlElement.h: Mark the form function final, since it's now both an inline function in this class, and an override of a virtual function inherited from the base class. Deleted the virtualForm function. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Removed use of the formForSubmission function, which was just another way to get the same thing as the form function; perhaps they were different in the past. (WebCore::HTMLInputElement::setFiles): Take a RefPtr&& rather than a PassRefPtr. * html/HTMLInputElement.h: Updated for the above. * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): Made this const. (WebCore::HTMLLabelElement::form): Made this const, so it can be used to override the const form function from the base class. * html/HTMLLabelElement.h: Marked the form function final, since we want it to override the form function inherited from HTMLElement. * html/HTMLLegendElement.cpp: (WebCore::HTMLLegendElement::form): Renamed from virtualForm. * html/HTMLLegendElement.h: Override form instead of virtualForm and mark it final This makes things more efficient if someone calls form directly on this class; before it would make an unnecessary virtual function call. * html/HTMLMediaElement.cpp: (WebCore::TrackDisplayUpdateScope::TrackDisplayUpdateScope): Take a reference rather than a pointer. (WebCore::TrackDisplayUpdateScope::~TrackDisplayUpdateScope): Ditto. (WebCore::eventTimeCueCompare): Compare the cues the same way the cue list would rather than using cueIndex. (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Take a reference. (WebCore::HTMLMediaElement::textTrackModeChanged): Ditto. (WebCore::HTMLMediaElement::videoTrackSelectedChanged): Ditto. (WebCore::HTMLMediaElement::textTrackKindChanged): Ditto. (WebCore::HTMLMediaElement::textTrackAddCues): Ditto. (WebCore::HTMLMediaElement::textTrackRemoveCues): Ditto. (WebCore::HTMLMediaElement::textTrackAddCue): Ditto. (WebCore::HTMLMediaElement::textTrackRemoveCue): Ditto. (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Pass references. (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto. (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Ditto. (WebCore::HTMLMediaElement::removeTextTrack): Ditto. (WebCore::HTMLMediaElement::forgetResourceSpecificTracks): Ditto. (WebCore::HTMLMediaElement::setController): Take a RefPtr&& instead of PassRefPtr. * html/HTMLMediaElement.h: Updated for above changes. * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::virtualForm): Deleted. * html/HTMLObjectElement.h: Made the form function inline and final, which achieves the same thing we did before with using, but without requiring the separate virtualForm function, now deleted. * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::collectOptionInnerText): Use isScriptElement instead of toScriptElementIfPossible. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::bindingsInstance): Renamed from getInstance and changed the return type to a raw pointer. * html/HTMLPlugInElement.h: Updated for the above changes. Also changed the updateSnapshot function to take a raw pointer instead of a PassRefPtr. * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::createElementRenderer): Pass a pointer to updateSnapshot. (WebCore::HTMLPlugInImageElement::updateSnapshot): Updated to take a raw pointer instead of a PassRefPtr. * html/HTMLPlugInImageElement.h: Updated for above changes. * html/HTMLScriptElement.h: Added using to resolve the ambiguity with the ref/deref from HTMLElement and from ScriptElement. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::selection): Return a RefPtr instead of a PassRefPtr. * html/HTMLTextFormControlElement.h: Updated for above changes. * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::textTrackKindChanged): Take a reference. (WebCore::HTMLTrackElement::textTrackModeChanged): Ditto. (WebCore::HTMLTrackElement::textTrackAddCues): Ditto. (WebCore::HTMLTrackElement::textTrackRemoveCues): Ditto. (WebCore::HTMLTrackElement::textTrackAddCue): Ditto. (WebCore::HTMLTrackElement::textTrackRemoveCue): Ditto. * html/HTMLTrackElement.h: Updated for above changes. * html/InputType.cpp: (WebCore::InputType::formForSubmission): Deleted. (WebCore::InputType::setFiles): Take a RefPtr&& instead of a PassRefPtr. * html/InputType.h: Updated for above changes. * html/PluginDocument.cpp: (WebCore::PluginDocumentParser::createDocumentStructure): Pass a reference. (WebCore::PluginDocument::setPluginElement): Take a reference rather than a PassRefPtr. * html/PluginDocument.h: Updated for above changes. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setStrokeStyle): Pass a reference. (WebCore::CanvasRenderingContext2D::setFillStyle): Ditto. (WebCore::CanvasRenderingContext2D::drawTextInternal): Ditto. * html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::CanvasStyle): Rewrite all constructors to use the m_style variant instead of separate m_type and other data members. Also change from PassRefPtr to a reference. (WebCore::CanvasStyle::createFromString): Update to use the variant. (WebCore::CanvasStyle::createFromStringWithOverrideAlpha): Ditto. (WebCore::CanvasStyle::isEquivalentColor): Ditto. (WebCore::CanvasStyle::isEquivalentRGBA): Ditto. (WebCore::CanvasStyle::isEquivalentCMYKA): Ditto. (WebCore::CanvasStyle::CanvasStyle): Deleted copy constructor; the compiler can now generate a correct copy or move constructor. (WebCore::CanvasStyle::~CanvasStyle): Deleted. Compiler generates this properly now without help from us. (WebCore::CanvasStyle::operator=): Deleted. The compiler can now generate a correct copy of move assignment operator. (WebCore::CanvasStyle::applyStrokeColor): Updated to take a reference and use the variant. (WebCore::CanvasStyle::applyFillColor): Ditto. * html/canvas/CanvasStyle.h: Redid this class to use a variant instead of a type enumeration and a union. * html/canvas/OESVertexArrayObject.cpp: (WebCore::OESVertexArrayObject::createVertexArrayOES): Updated use of enum since it's now an enum class. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Use Ref&& instead of RefPtr&& for the GraphicsContext3D. (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects): Updated enum and also use references. (WebCore::WebGL2RenderingContext::getInternalformatParameter): Use nullptr to return null rather than the old idiom (default-constructed WebGLGetInfo). (WebCore::WebGL2RenderingContext::texStorage2D): Ditto. (WebCore::WebGL2RenderingContext::getQueryParameter): Ditto. (WebCore::WebGL2RenderingContext::getSamplerParameter): Ditto. (WebCore::WebGL2RenderingContext::getSyncParameter): Ditto. (WebCore::WebGL2RenderingContext::getIndexedParameter): Ditto. (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter): Ditto. (WebCore::WebGL2RenderingContext::getActiveUniformBlockName): Ditto. (WebCore::WebGL2RenderingContext::createVertexArray): Updated enum and also use reference. (WebCore::WebGL2RenderingContext::getExtension): Rearranged logic in three ways: (1) Moved checks for whether an extension is supported inside the case for that extension, rather than combining the extension name check with the extensions enabled check. (2) Used the new enableSupportedExtension function to simplify many of the checks to avoid repeating the extension name twice. (3) Changed the idiom so we set the pointers to nullptr explicitly, preparing for a future where we might make the extension pointers use std::optional so we can cache a negative for each extension too, not just a positive result. (WebCore::WebGL2RenderingContext::getSupportedExtensions): Use ASCIILiteral. (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Use nullptr as above. For non-null types, return the object without converting, letting the WebGLAny class handle things, except for enumerations, which we need to explicitly static_cast to an integral type, and things that will be stored in the variant in a RefPtr, where we use makeRefPtr. (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Simplified and clarified the handling of COLOR_ATTACHMENT. (WebCore::WebGL2RenderingContext::getParameter): Return WebGLAny, same idiom as described above for getFramebufferAttachmentParameter. * html/canvas/WebGL2RenderingContext.h: Updated for above changes. * html/canvas/WebGLAny.cpp: Added. (WebCore::toJS): Handles conversion to JavaScript types. This function is based on the existing toJS functions from the two classes that were using WebGLGetInfo. Eventually we can probably just get the bindings to automatically generate this, but there is some work to do to get to that point. * html/canvas/WebGLAny.h: Added. This type, a variant, replaces the WebGLGetInfo class. Also includes the toJS function, which is the real point of this type, since it's about returning a variant mapped appropriately to JavaScript types. * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::getAGraphicsContext3D): Changed to return a reference. Droped unnecessary local variable with a long type name. (WebCore::WebGLContextGroup::addContext): Take a reference. (WebCore::WebGLContextGroup::removeContext): Ditto. (WebCore::WebGLContextGroup::removeObject): Ditto. (WebCore::WebGLContextGroup::addObject): Ditto. (WebCore::WebGLContextGroup::detachAndRemoveAllObjects): Dropped unnecessary local variable with a long type name. * html/canvas/WebGLContextGroup.h: Updated for above changes. * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::~WebGLContextObject): Pass references. (WebCore::WebGLContextObject::detachContext): Ditto. * html/canvas/WebGLGetInfo.cpp: Removed. * html/canvas/WebGLGetInfo.h: Removed. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContext): Take a Ref&& instead of as PassRefPtr. (WebCore::WebGLRenderingContext::initializeVertexArrayObjects): Updated enum and also use references. (WebCore::WebGLRenderingContext::getExtension): Rearranged logic in three ways: (1) Moved checks for whether an extension is supported inside the case for that extension, rather than combining the extension name check with the extensions enabled check. (2) Used the new enableSupportedExtension function to simplify many of the checks to avoid repeating the extension name twice. (3) Changed the idiom so we set the pointers to nullptr explicitly, preparing for a future where we might make the extension pointers use std::optional so we can cache a negative for each extension too, not just a positive result. (WebCore::WebGLRenderingContext::getSupportedExtensions): Use ASCIILiteral. (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Use nullptr as above. For non-null types, return the object without converting, letting the WebGLAny class handle things, except for enumerations, which we need to explicitly static_cast to an integral type, and things that will be stored in the variant in a RefPtr, where we use makeRefPtr. (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Simplified and clarified the handling of COLOR_ATTACHMENT adding a FIXME about something questionable. (WebCore::WebGLRenderingContext::getParameter): Return WebGLAny, same idiom as described above for getFramebufferAttachmentParameter. * html/canvas/WebGLRenderingContext.h: Updated for above changes. * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): Updated to pass references instead of pointers in a couple cases (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase): Changed graphics context argument type from RefPtr&& to Ref&&. Also moved initialization of scalars from the constructor to the class definition. (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase): Pass a reference. (WebCore::WebGLRenderingContextBase::createBuffer): Pass a reference instead of a pointer. (WebCore::WebGLRenderingContextBase::createFramebuffer): Ditto. (WebCore::WebGLRenderingContextBase::createTexture): Ditto. (WebCore::WebGLRenderingContextBase::createProgram): Ditto. (WebCore::WebGLRenderingContextBase::createRenderbuffer): Ditto. (WebCore::WebGLRenderingContextBase::createShader): Ditto. (WebCore::WebGLRenderingContextBase::deleteBuffer): Ditto. (WebCore::WebGLRenderingContextBase::getBufferParameter): Update to use WebGLAny. (WebCore::WebGLRenderingContextBase::getProgramParameter): Ditto. (WebCore::WebGLRenderingContextBase::getRenderbufferParameter): Ditto. (WebCore::WebGLRenderingContextBase::getShaderParameter): Ditto. (WebCore::WebGLRenderingContextBase::getTexParameter): Ditto. (WebCore::WebGLRenderingContextBase::getUniform): Ditto. (WebCore::WebGLRenderingContextBase::getVertexAttrib): Ditto. (WebCore::WebGLRenderingContextBase::getVertexAttribOffset): Removed unnneed type casts. (WebCore::WebGLRenderingContextBase::vertexAttribPointer): Pass a reference. (WebCore::WebGLRenderingContextBase::removeSharedObject): Take a reference. (WebCore::WebGLRenderingContextBase::addSharedObject): Ditto. (WebCore::WebGLRenderingContextBase::removeContextObject): Ditto. (WebCore::WebGLRenderingContextBase::addContextObject): Ditto. (WebCore::WebGLRenderingContextBase::getBooleanParameter): Changed return type; connversion to WebGLAny can happen at the point of use. (WebCore::WebGLRenderingContextBase::getBooleanArrayParameter): Ditto. (WebCore::WebGLRenderingContextBase::getFloatParameter): Ditto. (WebCore::WebGLRenderingContextBase::getIntParameter): Ditto. (WebCore::WebGLRenderingContextBase::getUnsignedIntParameter): Ditto. (WebCore::WebGLRenderingContextBase::getInt64Parameter): Ditto. (WebCore::WebGLRenderingContextBase::getWebGLFloatArrayParameter): Ditto. (WebCore::WebGLRenderingContextBase::getWebGLIntArrayParameter): Ditto. (WebCore::WebGLRenderingContextBase::validateBufferDataParameters): Use optional to simplify logic and get rid of a boolean. (WebCore::WebGLRenderingContextBase::enableSupportedExtension): Added. Helper used by the getExtension functions. * html/canvas/WebGLRenderingContextBase.h: Updated for the above changes. Also changed setBoundVertexArrayObject to take a raw pointer instead of as PassRefPtr. * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::~WebGLSharedObject): Pass a reference. (WebCore::WebGLSharedObject::detachContextGroup): Ditto. (WebCore::WebGLSharedObject::getAGraphicsContext3D): Updated since the underlying getAGraphicsContext3D function now returns a reference. * html/canvas/WebGLSharedObject.h: Removed many unused "is" virtual functions. * html/canvas/WebGLTransformFeedback.h: Ditto. * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::create): Updated for new type enumeration. (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Ditto. (WebCore::WebGLVertexArrayObject::deleteObjectImpl): Ditto. * html/canvas/WebGLVertexArrayObject.h: Updated for above changes. * html/canvas/WebGLVertexArrayObjectBase.cpp: (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase): Updated for new type enumeration and moved initialization to class definition. (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer): Changed argument to raw pointer instead of PassRefPtr. (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState): Changed argument to reference instead of PassRefPtr. (WebCore::WebGLVertexArrayObjectBase::unbindBuffer): Changed arugment type to reference instead of PassRefPtr. (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor): Removed unneeded local variable. * html/canvas/WebGLVertexArrayObjectBase.h: Updated for above changes. Replaced VAOType with Type. Used class member initialization. * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::create): Updated for new type enumeration. (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES): Ditto. (WebCore::WebGLVertexArrayObjectOES::~WebGLVertexArrayObjectOES) Ditto.: (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): Ditto. * html/canvas/WebGLVertexArrayObjectOES.h: Updated for above changes. * html/forms/FileIconLoader.cpp: (WebCore::FileIconLoader::iconLoaded): Renamed from notifyFinished. Also changed the name of the function this calls to iconLoaded. Changed the arguemnt to RefPtr&& instead of PassRefPtr. * html/forms/FileIconLoader.h: Updated for above changes. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::attachLater): Use isScriptElement instead of toScriptElementIfPossible. (WebCore::HTMLConstructionSite::insertForeignElement): Ditto. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Pass script element as a Ref rather than RefPtr. (WebCore::HTMLDocumentParser::watchForLoad): Pass a reference instead of a pointer. * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::executeParsingBlockingScript): Deleted. Moved the code into the single call site, execute ParsingBlockingScripts. (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): Changed argument type to a reference from a RefPtr; this funtion was not taking ownership. Also remove call to toScriptElementIfPossible, since pending scripts now contains script elements already. (WebCore::HTMLScriptRunner::execute): Changed argument type to Ref<ScriptElement>&& from PassRefPtr<Element>. (WebCore::HTMLScriptRunner::executeParsingBlockingScripts): Moved code here from executeParsingBlockingScript. Also pass a reference. (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing): Pass a reference. (WebCore::requestPendingScript): Changed argument type to ScriptElement& from Element*. (WebCore::HTMLScriptRunner::requestParsingBlockingScript): Ditto. (WebCore::HTMLScriptRunner::requestDeferredScript): Ditto. (WebCore::HTMLScriptRunner::runScript): Ditto. * html/parser/HTMLScriptRunner.h: Updated for above changes. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::takeScriptToProcess): Changed return type from RefPtr<Element> to RefPtr<ScriptElement>. (WebCore::HTMLTreeBuilder::processEndTag): Downcast the script element to HTMLScriptElement so we can store it as a ScriptElement. (WebCore::HTMLTreeBuilder::processTokenInForeignContent): Downcast the script element to SVGScriptElement so we can store it as a script element. * html/parser/HTMLTreeBuilder.h: Updated for above changes. Changed the type of m_scriptToProcess to RefPtr<ScriptElement>. * html/parser/TextDocumentParser.cpp: Added now-needed include. * html/parser/XSSAuditorDelegate.cpp: (WebCore::XSSAuditorDelegate::generateViolationReport): Changed return type to Ref from PassRefPtr. * html/parser/XSSAuditorDelegate.h: Updated for above. * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): Take references. (WebCore::AudioTrack::setPrivate): Ditto. (WebCore::AudioTrack::setEnabled): Removed redundant code to do what the private setEnabled function is already going to do. (WebCore::AudioTrack::inbandTrackIndex): Removed assertion since m_private is now a Ref rather than RefPtr. (WebCore::AudioTrack::enabledChanged): Added an early exit so we will only call audioTrackEnabledChanged if m_enabled is actually changing. Also removed the unneeded track private argument. (WebCore::AudioTrack::idChanged): Ditto. (WebCore::AudioTrack::labelChanged): Ditto. (WebCore::AudioTrack::languageChanged): Ditto. (WebCore::AudioTrack::willRemove): Ditto. * html/track/AudioTrack.h: Updated for above changes. * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Removed inband text track private argument. Use contains instead of find/end. (WebCore::InbandDataTextTrack::updateDataCue): Ditto. Use get instead of find/end. (WebCore::InbandDataTextTrack::removeDataCue): Ditto. * html/track/InbandDataTextTrack.h: Updated for above changes. * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Take references. (WebCore::InbandGenericTextTrack::create): Ditto. (WebCore::InbandGenericTextTrack::updateCueFromCueData): Ditto. (WebCore::InbandGenericTextTrack::addGenericCue): Ditto. Also removed unused track private argument. (WebCore::InbandGenericTextTrack::updateGenericCue): Ditto. (WebCore::InbandGenericTextTrack::removeGenericCue): Ditto. (WebCore::InbandGenericTextTrack::parseWebVTTCueData): Ditto. (WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Ditto. (WebCore::InbandGenericTextTrack::newRegionsParsed): Pass a reference. * html/track/InbandGenericTextTrack.h: Updated for above changes. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Return a Ref instead of a PassRefPtr. Take references. (WebCore::InbandTextTrack::InbandTextTrack): Ditto. (WebCore::InbandTextTrack::setPrivate): Take a reference instead of a PassRefPtr. (WebCore::InbandTextTrack::isClosedCaptions): Removed check for null since m_private is now a Ref and so never null. (WebCore::InbandTextTrack::isSDH): Ditto. (WebCore::InbandTextTrack::containsOnlyForcedSubtitles): Ditto. (WebCore::InbandTextTrack::isMainProgramContent): Ditto. (WebCore::InbandTextTrack::isEasyToRead): Ditto. (WebCore::InbandTextTrack::inbandTrackIndex): Ditto. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Ditto. (WebCore::InbandTextTrack::idChanged): Removed unneeded track private argument. (WebCore::InbandTextTrack::labelChanged): Ditto. (WebCore::InbandTextTrack::languageChanged): Ditto. (WebCore::InbandTextTrack::willRemove): Ditto. (WebCore::InbandTextTrack::updateKindFromPrivate): Improved switch statement by removing default so we get a warning if we forget to handle a kind value. (WebCore::InbandTextTrack::startTimeVariance): Removed check for null. * html/track/InbandTextTrack.h: Updated for above changes. Changed m_private from a RefPtr to a Ref. * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Take references. (WebCore::InbandWebVTTTextTrack::create): Ditto. (WebCore::InbandWebVTTTextTrack::parseWebVTTCueData): Removed unneeded track private arguemnt. (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Pass a reference. * html/track/InbandWebVTTTextTrack.h: Updated for above changes. * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::newCuesAvailable): Pass references. (WebCore::LoadableTextTrack::newRegionsAvailable): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::~TextTrack): Use references. (WebCore::TextTrack::setKind): Ditto. (WebCore::TextTrack::setMode): Ditto. (WebCore::TextTrack::removeAllCues): Ditto. (WebCore::TextTrack::activeCues): Ditto. (WebCore::TextTrack::addCue): Ditto. (WebCore::TextTrack::removeCue): Removed unneeded code to handle a cue that points to a track but is not in that track. Added a call to setIsActive(false) here instead of having the remove function do it. (WebCore::TextTrack::addRegion): Use references. (WebCore::TextTrack::removeRegion): Removed unneeded code to handle a region that points to a track but is not in that track. (WebCore::TextTrack::cueWillChange): Use references. (WebCore::TextTrack::cueDidChange): Ditto. (WebCore::TextTrack::setLanguage): Ditto. * html/track/TextTrack.h: Updated for above changes. * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::TextTrackCue): Initialized the data members in the class definition. (WebCore::TextTrackCue::cueIndex): Deleted. (WebCore::TextTrackCue::invalidateCueIndex): Deleted. * html/track/TextTrackCue.h: Updated for the above. Removed m_cueIndex, because it is not a good design to store these and try to keep them up to date. * html/track/TextTrackCueList.cpp: (WebCore::compareCues): Added. Helper for sorting and checking sorting. (WebCore::TextTrackCueList::TextTrackCueList): Deleted. Let the compiler generate this. (WebCore::TextTrackCueList::length): Moved to header. (WebCore::TextTrackCueList::cueIndex): Renamed from getCueIndex. Changed return type to unsigned rather than unsigned long. (WebCore::TextTrackCueList::item): Updated for name change. (WebCore::TextTrackCueList::getCueById): Ditto. (WebCore::TextTrackCueList::activeCues): Build the vector directly rather than wastefully adding with TextTrackCueList::add, which will try to sort. (WebCore::TextTrackCueList::add): Take a Ref&& instead of a PassRefPtr. Also, keep sorted using std::upper_bound instead of the recursive binary search this code was using before. Also remove the invalidateCueIndexes call since there are no cue indices any more. Also remove the boolean return value since no caller was using it. (WebCore::TextTrackCueList::remove): Take a reference instead of a pointer. Also remove the boolean return value since no caller was using it. (WebCore::TextTrackCueList::contains): Deleted. Was unused. (WebCore::TextTrackCueList::updateCueIndex): Reimplemented using the std::upper_bound and std::rotate operations. The old code that used remove and add was inefficient and also could cause a cue to be deallocated if something else wasn't holding a reference to the cue. Also changed to take a reference. (WebCore::TextTrackCueList::clear): Deleted. Was unused. (WebCore::TextTrackCueList::invalidateCueIndexes): Deleted. No longer needed since we don't store cue indices in the cues any more. * html/track/TextTrackCueList.h: Updated for the above changes. * html/track/VTTRegionList.cpp: (WebCore::VTTRegionList::VTTRegionList): Deleted. Let the compiler generate this. (WebCore::VTTRegionList::length): Moved to header. (WebCore::VTTRegionList::item): Updated for name and type changes. (WebCore::VTTRegionList::getRegionById): Ditto. (WebCore::VTTRegionList::add): Changed to take a Ref&& instead of a PassRefPtr. (WebCore::VTTRegionList::remove): Updated. (WebCore::VTTRegionList::clear): Deleted. Was unused. * html/track/VTTRegionList.h: Updated for the above changes. * html/track/VTTRegionList.idl: Made return values nullable to reflect the actual semantic of the code. * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): Use references. (WebCore::VideoTrack::setPrivate): Ditto. (WebCore::VideoTrack::setSelected): Ditto. (WebCore::VideoTrack::inbandTrackIndex): Removed assertion since m_private is now a Ref instead of a RefPtr. (WebCore::VideoTrack::selectedChanged): Removed unneeded track private argument. (WebCore::VideoTrack::idChanged): Ditto. (WebCore::VideoTrack::labelChanged): Ditto. (WebCore::VideoTrack::languageChanged): Ditto. (WebCore::VideoTrack::willRemove): Ditto. (WebCore::VideoTrack::setKind): Updated to use reference. (WebCore::VideoTrack::setLanguage): Ditto. * html/track/VideoTrack.h: Updated for the above. Changed derivation to private. Removed unneeded defaultKindKeyword. * loader/EmptyClients.h: Updated to use reference. * loader/PingLoader.cpp: (WebCore::PingLoader::sendViolationReport): Take a Ref&& instead of RefPtr&&. * loader/PingLoader.h: Updated for above change. * page/Chrome.cpp: (WebCore::Chrome::loadIconForFiles): Take a reference. * page/Chrome.h: Updated for above change. * page/ChromeClient.h: Ditto. * page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::reportViolation): Use auto. * platform/cocoa/WebPlaybackSessionModelMediaElement.mm: (WebPlaybackSessionModelMediaElement::selectAudioMediaOption): Simplified algorithm by removing unneeded direct call to audioTrackEnabledChanged, which will be called by setEnabled and doesn't need to be called again here. (WebPlaybackSessionModelMediaElement::selectLegibleMediaOption): Removed unhelpful assertion and unnneded initialization. * platform/graphics/AudioTrackPrivate.h: Removed unnneeed track private argument and initialized data members where they are defined. * platform/graphics/InbandTextTrackPrivateClient.h: Use Ref instead of PassRefPtr, initialize data members where they are defined, and removed the unneeded track private arguments from the client functions. * platform/graphics/SourceBufferPrivate.h: Fixed functions that were taking AtomicString to take a const& instead. Use Ref&& instead of PassRefPtr. * platform/graphics/SourceBufferPrivateClient.h: Removed unneded private pointer arguments from client functions. * platform/graphics/TrackPrivateBase.h: Removed unneeded private pointers from client functions. * platform/graphics/VideoTrackPrivate: Ditto. * platform/graphics/avfoundation/AudioTrackPrivateAVF.h: Use const AtomicString&. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): Updated for change to arguments. (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Ditto. (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): Ditto. * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto. (WebCore::InbandTextTrackPrivateAVF::resetCueValues): Ditto. (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Ditto. * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: (WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC): Moved initialization of data memebrs to where they are defined. (WebCore::AudioTrackPrivateMediaSourceAVFObjC::enabled): Deleted. No longer needed. (WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled): Changed to use the enabled flag from the base class instead of a separate m_enabled in this class. * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Removed the enabled function and the m_enabled data member. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Marked functions final instead of override and updated arguemnts. * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset): Updated for change to arguments. (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Ditto. (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): Ditto. (WebCore::SourceBufferPrivateAVFObjC::hasVideo): Ditto. (WebCore::SourceBufferPrivateAVFObjC::hasAudio): Ditto. (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Ditto. (WebCore::SourceBufferPrivateAVFObjC::flush): Ditto. (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto. (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime): Ditto. (WebCore::SourceBufferPrivateAVFObjC::seekToTime): Ditto. (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: Updated for changes to arguments. * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample): Ditto. * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Ditto. * platform/graphics/gstreamer/mse/AppendPipeline.cpp: (WebCore::AppendPipeline::appsinkNewSample): Ditto. * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::append): Ditto. (WebCore::SourceBufferPrivateGStreamer::flush): Ditto. (WebCore::SourceBufferPrivateGStreamer::enqueueSample): Ditto. (WebCore::SourceBufferPrivateGStreamer::isReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateGStreamer::notifyReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Ditto. (WebCore::SourceBufferPrivateGStreamer::notifyClientWhenReadyForMoreSamples): Ditto. (WebCore::SourceBufferPrivateGStreamer::didReceiveInitializationSegment): Ditto. (WebCore::SourceBufferPrivateGStreamer::didReceiveSample): Ditto. (WebCore::SourceBufferPrivateGStreamer::didReceiveAllPendingSamples): Ditto. * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h: Ditto. * platform/mock/mediasource/MockSourceBufferPrivate.cpp: (WebCore::MockSourceBufferPrivate::append): Ditto. (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment): Ditto. (WebCore::MockSourceBufferPrivate::didReceiveSample): Ditto. (WebCore::MockSourceBufferPrivate::enqueuedSamplesForTrackID): Ditto. (WebCore::MockSourceBufferPrivate::enqueueSample): Ditto. (WebCore::MockSourceBufferPrivate::hasVideo): Ditto. (WebCore::MockSourceBufferPrivate::hasAudio): Ditto. (WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime): Ditto. (WebCore::MockSourceBufferPrivate::seekToTime): Ditto. * platform/mock/mediasource/MockSourceBufferPrivate.h: Ditto. * rendering/RenderSnapshottedPlugIn.cpp: (WebCore::RenderSnapshottedPlugIn::updateSnapshot): Take raw pointer instead of PassRefPtr. * rendering/RenderSnapshottedPlugIn.h: Updated for above change. * svg/SVGScriptElement.h: Added using to resolve the ambiguity with the ref/deref from SVGElement and from ScriptElement. * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::notifyFinished): Updated to simplify since the pending script now has a script element. * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::startElementNs): Use isSciprtElement instead of toScriptElementIfPossible. (WebCore::XMLDocumentParser::endElementNs): Ditto. Also use downcastScriptElement. Source/WebKit/mac: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::loadIconForFiles): Take a reference instead of a pointer. Source/WebKit/win: * WebCoreSupport/WebChromeClient.cpp: (WebChromeClient::loadIconForFiles): Take a reference instead of a pointer. * WebCoreSupport/WebChromeClient.h: Updated for the above. Source/WebKit2: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::loadIconForFiles): Take a reference instead of a pointer. * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto. Source/WTF: * wtf/RefPtr.h: (WTF::makeRefPtr): Added. Canonical link: https://commits.webkit.org/183856@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-01-05 06:45:48 +00:00
void addDataCue(const MediaTime& start, const MediaTime& end, const void*, unsigned) final;
[Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebCore: Tests: http/tests/media/track-in-band-hls-metadata.html media/track/track-datacue-value.html * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate. * CMakeLists.txt: Add JSDataCueCustom.cpp. * bindings/js/JSBindingsAllInOne.cpp: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/JSDataCueCustom.cpp: Added. (WebCore::JSDataCue::value): (WebCore::JSDataCue::setValue): (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate events when paused, don't call sort on an Vector that can't be sorted. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Initialize m_type. (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary. (WebCore::DataCue::data): Ask the platform value for data if non-null. (WebCore::DataCue::setData): Clear m_platformValue and m_value. (WebCore::DataCue::isEqual): New. (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed to the constructor/set by script. (WebCore::DataCue::setValue): Set m_value. * html/track/DataCue.h: * html/track/DataCue.idl: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once. (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration. (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue. (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead of VTTCue. * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::isEqual): New, test base class equality. * html/track/TextTrackCue.h: * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first. * html/track/TextTrackCueGeneric.h: * html/track/VTTCue.cpp: (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first. * html/track/VTTCue.h: * platform/SerializedPlatformRepresentation.h: Added. (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation): (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation): * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added. (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto. (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted. Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::currentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack): (WebCore::AVFWrapper::setCurrentTextTrack): (WebCore::AVFWrapper::AVFWrapper): (WebCore::AVFWrapper::processCue): (WebCore::AVFWrapper::currentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted. (WebCore::AVFWrapper::setCurrentTrack): Deleted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New. (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack. (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type. (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata. (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted. Create a JSValue representation from an AVMetadataItem. * platform/mac/SerializedPlatformRepresentationMac.h: Added. (WebCore::SerializedPlatformRepresentationMac::platformType): (WebCore::SerializedPlatformRepresentationMac::nativeValue): * platform/mac/SerializedPlatformRepresentationMac.mm: Added. (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::create): (WebCore::SerializedPlatformRepresentationMac::data): (WebCore::SerializedPlatformRepresentationMac::deserialize): (WebCore::SerializedPlatformRepresentationMac::isEqual): (WebCore::toSerializedPlatformRepresentationMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebKit2: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WTF: * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. LayoutTests: * http/tests/media/resources/hls: Added. * http/tests/media/resources/hls/metadata: Added. * http/tests/media/resources/hls/metadata/fileSequence0.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence1.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence2.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence3.ts: Added. * http/tests/media/resources/hls/metadata/prog_index.m3u8: Added. * http/tests/media/track-in-band-hls-metadata-expected.txt: Added. * http/tests/media/track-in-band-hls-metadata.html: Added. * media/track/track-datacue-value-expected.txt: Added. * media/track/track-datacue-value.html: Added. * platform/efl/TestExpectations: Skip the new tests. * platform/gtk/TestExpectations: Ditto. * platform/mac/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on Mountain Lion. * platform/win/TestExpectations: Skip the new tests. Canonical link: https://commits.webkit.org/150050@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-21 23:18:23 +00:00
Allow text tracks to purge cues outside of the buffered range https://bugs.webkit.org/show_bug.cgi?id=224489 Reviewed by Jer Noble. TextTrackCues associated in-band tracks live "forever" - until the video element is deleted or reloaded. This is fine for relatively short files, but not so good for long lived files (eg. a very long live stream), or for timed metadata where the "cue" size can be much larger than a text sample. Allow text tracks to opt in to purging cues who's time range does not intersect with the `buffered` range, where audio and video data is also not available. Only AVFoundation backed in-band tracks opt in at this time, because AVFoundation will redeliver cues if a time range is played again. Tested manually as the only way to test this currently would be with an HLS stream that would have to play too long for a layout test, or with an MSE text track but we won't support text tracks in MSE yet. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged): Allow tracks that support purging cues to do so. * html/HTMLMediaElement.h: * html/track/InbandDataTextTrack.h: Return true for shouldPurgeCuesFromUnbufferedRanges(); * html/track/InbandGenericTextTrack.h: Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::removeCuesNotInTimeRanges): Remove all cues who's time range does not intersect with the buffered range. * html/track/TextTrack.h: (WebCore::TextTrack::shouldPurgeCuesFromUnbufferedRanges const): Canonical link: https://commits.webkit.org/236509@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-14 16:53:26 +00:00
bool shouldPurgeCuesFromUnbufferedRanges() const final { return true; }
Switch text tracks to release logging https://bugs.webkit.org/show_bug.cgi?id=176809 <rdar://problem/34397605> Reviewed by Jer Noble. Source/WebCore: Make all track objects use the same logger and log identifier as the media element they "belong" to. Convert all track logging from debug-only to release logging. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): * html/HTMLMediaElement.h: * html/track/AudioTrack.cpp: (WebCore::AudioTrack::AudioTrack): (WebCore::AudioTrack::setPrivate): (WebCore::AudioTrack::setMediaElement): * html/track/AudioTrack.h: * html/track/DataCue.cpp: (WebCore::DataCue::toString const): * html/track/DataCue.h: (PAL::LogArgument<WebCore::DataCue>::toString): * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): (WebCore::InbandGenericTextTrack::removeGenericCue): (WebCore::InbandGenericTextTrack::newCuesParsed): (WebCore::InbandGenericTextTrack::fileFailedToParse): * html/track/InbandGenericTextTrack.h: * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::InbandTextTrack): (WebCore::InbandTextTrack::setMediaElement): * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): (WebCore::InbandWebVTTTextTrack::fileFailedToParse): * html/track/InbandWebVTTTextTrack.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::newCuesAvailable): (WebCore::LoadableTextTrack::cueLoadingCompleted): * html/track/LoadableTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): (WebCore::TextTrack::removeCue): (WebCore::TextTrack::setLanguage): * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::toString const): * html/track/TextTrackCue.h: (PAL::LogArgument<WebCore::TextTrackCue>::toString): * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::setFontSize): (WebCore::TextTrackCueGeneric::toString const): * html/track/TextTrackCueGeneric.h: (PAL::LogArgument<WebCore::TextTrackCueGeneric>::toString): * html/track/TrackBase.cpp: (WebCore::nextLogIdentifier): (WebCore::nullLogger): (WebCore::TrackBase::TrackBase): (WebCore::TrackBase::setMediaElement): (WebCore::TrackBase::logChannel const): (WebCore::TrackBase::~TrackBase): Deleted. * html/track/TrackBase.h: (WebCore::TrackBase::setMediaElement): Deleted. * html/track/VTTCue.cpp: (WebCore::VTTCue::setFontSize): (WebCore::VTTCue::toString const): * html/track/VTTCue.h: (PAL::LogArgument<WebCore::VTTCue>::toString): * html/track/VideoTrack.cpp: (WebCore::VideoTrack::VideoTrack): (WebCore::VideoTrack::setPrivate): (WebCore::VideoTrack::setMediaElement): * html/track/VideoTrack.h: * platform/graphics/AudioTrackPrivate.h: * platform/graphics/InbandTextTrackPrivate.h: (WebCore::InbandTextTrackPrivate::setClient): * platform/graphics/InbandTextTrackPrivateClient.h: (WebCore::GenericCueData::toString const): (PAL::LogArgument<WebCore::GenericCueData>::toString): * platform/graphics/TrackPrivateBase.cpp: Added. (WebCore::TrackPrivateBase::setLogger): (WebCore::TrackPrivateBase::logChannel const): * platform/graphics/TrackPrivateBase.h: * platform/graphics/VideoTrackPrivate.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): (WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): (WebCore::InbandTextTrackPrivateAVF::resetCueValues): (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp: (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit): * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h: Source/WebCore/PAL: * pal/Logger.h: (PAL::LogArgument::toString): (PAL::Logger::willLog const): Canonical link: https://commits.webkit.org/193413@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-15 16:20:07 +00:00
#if !RELEASE_LOG_DISABLED
const char* logClassName() const final { return "DataCue"; }
#endif
[Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebCore: Tests: http/tests/media/track-in-band-hls-metadata.html media/track/track-datacue-value.html * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate. * CMakeLists.txt: Add JSDataCueCustom.cpp. * bindings/js/JSBindingsAllInOne.cpp: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/JSDataCueCustom.cpp: Added. (WebCore::JSDataCue::value): (WebCore::JSDataCue::setValue): (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate events when paused, don't call sort on an Vector that can't be sorted. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Initialize m_type. (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary. (WebCore::DataCue::data): Ask the platform value for data if non-null. (WebCore::DataCue::setData): Clear m_platformValue and m_value. (WebCore::DataCue::isEqual): New. (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed to the constructor/set by script. (WebCore::DataCue::setValue): Set m_value. * html/track/DataCue.h: * html/track/DataCue.idl: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once. (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration. (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue. (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead of VTTCue. * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::isEqual): New, test base class equality. * html/track/TextTrackCue.h: * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first. * html/track/TextTrackCueGeneric.h: * html/track/VTTCue.cpp: (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first. * html/track/VTTCue.h: * platform/SerializedPlatformRepresentation.h: Added. (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation): (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation): * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added. (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto. (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted. Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::currentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack): (WebCore::AVFWrapper::setCurrentTextTrack): (WebCore::AVFWrapper::AVFWrapper): (WebCore::AVFWrapper::processCue): (WebCore::AVFWrapper::currentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted. (WebCore::AVFWrapper::setCurrentTrack): Deleted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New. (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack. (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type. (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata. (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted. Create a JSValue representation from an AVMetadataItem. * platform/mac/SerializedPlatformRepresentationMac.h: Added. (WebCore::SerializedPlatformRepresentationMac::platformType): (WebCore::SerializedPlatformRepresentationMac::nativeValue): * platform/mac/SerializedPlatformRepresentationMac.mm: Added. (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::create): (WebCore::SerializedPlatformRepresentationMac::data): (WebCore::SerializedPlatformRepresentationMac::deserialize): (WebCore::SerializedPlatformRepresentationMac::isEqual): (WebCore::toSerializedPlatformRepresentationMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebKit2: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WTF: * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. LayoutTests: * http/tests/media/resources/hls: Added. * http/tests/media/resources/hls/metadata: Added. * http/tests/media/resources/hls/metadata/fileSequence0.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence1.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence2.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence3.ts: Added. * http/tests/media/resources/hls/metadata/prog_index.m3u8: Added. * http/tests/media/track-in-band-hls-metadata-expected.txt: Added. * http/tests/media/track-in-band-hls-metadata.html: Added. * media/track/track-datacue-value-expected.txt: Added. * media/track/track-datacue-value.html: Added. * platform/efl/TestExpectations: Skip the new tests. * platform/gtk/TestExpectations: Ditto. * platform/mac/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on Mountain Lion. * platform/win/TestExpectations: Skip the new tests. Canonical link: https://commits.webkit.org/150050@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-21 23:18:23 +00:00
#if ENABLE(DATACUE_VALUE)
Rename SerializedPlatformRepresentation to SerializedPlatformDataCue https://bugs.webkit.org/show_bug.cgi?id=207695 <rdar://problem/59422673> Reviewed by Youenn Fablet. No new tests, no functional change. * SourcesCocoa.txt: * WebCore.xcodeproj/project.pbxproj: * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): (WebCore::DataCue::cueContentsMatch const): * html/track/DataCue.h: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): (WebCore::InbandDataTextTrack::removeCue): * html/track/InbandDataTextTrack.h: * html/track/InbandTextTrack.h: * platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h. * platform/graphics/InbandTextTrackPrivateClient.h: * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): * platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h. (WebCore::SerializedPlatformDataCueMac::nativeValue const): * platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm. (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::create): (WebCore::SerializedPlatformDataCueMac::data const): (WebCore::SerializedPlatformDataCueMac::deserialize const): (WebCore::SerializedPlatformDataCueMac::isEqual const): (WebCore::toSerializedPlatformDataCueMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Canonical link: https://commits.webkit.org/220683@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-13 21:40:08 +00:00
void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) final;
void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final;
void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final;
ExceptionOr<void> removeCue(TextTrackCue&) final;
[Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebCore: Tests: http/tests/media/track-in-band-hls-metadata.html media/track/track-datacue-value.html * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate. * CMakeLists.txt: Add JSDataCueCustom.cpp. * bindings/js/JSBindingsAllInOne.cpp: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/JSDataCueCustom.cpp: Added. (WebCore::JSDataCue::value): (WebCore::JSDataCue::setValue): (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate events when paused, don't call sort on an Vector that can't be sorted. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Initialize m_type. (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary. (WebCore::DataCue::data): Ask the platform value for data if non-null. (WebCore::DataCue::setData): Clear m_platformValue and m_value. (WebCore::DataCue::isEqual): New. (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed to the constructor/set by script. (WebCore::DataCue::setValue): Set m_value. * html/track/DataCue.h: * html/track/DataCue.idl: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once. (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration. (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue. (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead of VTTCue. * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::isEqual): New, test base class equality. * html/track/TextTrackCue.h: * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first. * html/track/TextTrackCueGeneric.h: * html/track/VTTCue.cpp: (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first. * html/track/VTTCue.h: * platform/SerializedPlatformRepresentation.h: Added. (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation): (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation): * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added. (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto. (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted. Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::currentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack): (WebCore::AVFWrapper::setCurrentTextTrack): (WebCore::AVFWrapper::AVFWrapper): (WebCore::AVFWrapper::processCue): (WebCore::AVFWrapper::currentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted. (WebCore::AVFWrapper::setCurrentTrack): Deleted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New. (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack. (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type. (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata. (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted. Create a JSValue representation from an AVMetadataItem. * platform/mac/SerializedPlatformRepresentationMac.h: Added. (WebCore::SerializedPlatformRepresentationMac::platformType): (WebCore::SerializedPlatformRepresentationMac::nativeValue): * platform/mac/SerializedPlatformRepresentationMac.mm: Added. (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::create): (WebCore::SerializedPlatformRepresentationMac::data): (WebCore::SerializedPlatformRepresentationMac::deserialize): (WebCore::SerializedPlatformRepresentationMac::isEqual): (WebCore::toSerializedPlatformRepresentationMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebKit2: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WTF: * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. LayoutTests: * http/tests/media/resources/hls: Added. * http/tests/media/resources/hls/metadata: Added. * http/tests/media/resources/hls/metadata/fileSequence0.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence1.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence2.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence3.ts: Added. * http/tests/media/resources/hls/metadata/prog_index.m3u8: Added. * http/tests/media/track-in-band-hls-metadata-expected.txt: Added. * http/tests/media/track-in-band-hls-metadata.html: Added. * media/track/track-datacue-value-expected.txt: Added. * media/track/track-datacue-value.html: Added. * platform/efl/TestExpectations: Skip the new tests. * platform/gtk/TestExpectations: Ditto. * platform/mac/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on Mountain Lion. * platform/win/TestExpectations: Skip the new tests. Canonical link: https://commits.webkit.org/150050@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-21 23:18:23 +00:00
Support in-band metadata cues when loading media in the GPU Process https://bugs.webkit.org/show_bug.cgi?id=207904 <rdar://problem/59561647> Reviewed by Dean Jackson. Source/WebCore: No new tests, unskipped existing tests. * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): (WebCore::HTMLMediaElement::play): (WebCore::HTMLMediaElement::mediaEngineWasUpdated): (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): (WebCore::InbandDataTextTrack::findIncompleteCue): (WebCore::InbandDataTextTrack::updateDataCue): (WebCore::InbandDataTextTrack::removeDataCue): (WebCore::InbandDataTextTrack::removeCue): * html/track/InbandDataTextTrack.h: * html/track/TextTrack.cpp: (WebCore::TextTrack::addCue): * html/track/TextTrack.h: (WebCore::TextTrack::cuesInternal const): * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::cueIndex const): * platform/SerializedPlatformDataCue.h: (WebCore::SerializedPlatformDataCue::deserialize const): (WebCore::SerializedPlatformDataCue::data const): (WebCore::SerializedPlatformDataCue::isEqual const): (WebCore::SerializedPlatformDataCue::platformType const): (WebCore::SerializedPlatformDataCue::encodingRequiresPlatformData const): (WebCore::SerializedPlatformDataCue::encodableValue const): * platform/graphics/MediaPlayer.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): * platform/mac/SerializedPlatformDataCueMac.h: * platform/mac/SerializedPlatformDataCueMac.mm: (WebCore::SerializedPlatformDataCue::create): (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::isEqual const): (WebCore::toSerializedPlatformDataCueMac): (WebCore::SerializedPlatformDataCueMac::allowedClassesForNativeValues): (WebCore::SerializedPlatformDataCueMac::encodableValue const): (WebCore::jsValueWithAVMetadataItemInContext): (WebCore::NSDictionaryWithAVMetadataItem): (WebCore::SerializedPlatformDataCueMac::create): Deleted. Source/WebKit: * GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in: * GPUProcess/media/RemoteTextTrackProxy.cpp: (WebKit::RemoteTextTrackProxy::addDataCue): (WebKit::RemoteTextTrackProxy::updateDataCue): (WebKit::RemoteTextTrackProxy::removeDataCue): * Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encode): (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::decode): * Shared/WebCoreArgumentCoders.h: * Shared/mac/WebCoreArgumentCodersMac.mm: (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::encodePlatformData): (IPC::ArgumentCoder<WebCore::SerializedPlatformDataCueValue>::decodePlatformData): * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote): (WebKit::MediaPlayerPrivateRemote::setConfiguration): (WebKit::MediaPlayerPrivateRemote::addDataCue): (WebKit::MediaPlayerPrivateRemote::addDataCueWithType): (WebKit::MediaPlayerPrivateRemote::updateDataCue): (WebKit::MediaPlayerPrivateRemote::removeDataCue): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in: * WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer): * WebProcess/GPU/media/RemoteMediaPlayerManager.h: * WebProcess/GPU/media/TextTrackPrivateRemote.cpp: (WebKit::TextTrackPrivateRemote::addGenericCue): (WebKit::TextTrackPrivateRemote::updateGenericCue): (WebKit::TextTrackPrivateRemote::removeGenericCue): (WebKit::TextTrackPrivateRemote::parseWebVTTFileHeader): (WebKit::TextTrackPrivateRemote::parseWebVTTCueData): (WebKit::TextTrackPrivateRemote::parseWebVTTCueDataStruct): (WebKit::TextTrackPrivateRemote::addDataCue): (WebKit::TextTrackPrivateRemote::addDataCueWithType): (WebKit::TextTrackPrivateRemote::updateDataCue): (WebKit::TextTrackPrivateRemote::removeDataCue): * WebProcess/GPU/media/TextTrackPrivateRemote.h: LayoutTests: * gpu-process/TestExpectations: Canonical link: https://commits.webkit.org/221012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-21 03:35:50 +00:00
RefPtr<DataCue> findIncompleteCue(const SerializedPlatformDataCue&);
Vector<RefPtr<DataCue>> m_incompleteCueMap;
[Mac] implement WebKitDataCue https://bugs.webkit.org/show_bug.cgi?id=131799 Reviewed by Dean Jackson. Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebCore: Tests: http/tests/media/track-in-band-hls-metadata.html media/track/track-datacue-value.html * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. * DerivedSources.make: Add ENABLE_DATACUE_VALUE to HTML_FLAGS when appropriate. * CMakeLists.txt: Add JSDataCueCustom.cpp. * bindings/js/JSBindingsAllInOne.cpp: * WebCore.xcodeproj/project.pbxproj: Add new files. * bindings/js/JSDataCueCustom.cpp: Added. (WebCore::JSDataCue::value): (WebCore::JSDataCue::setValue): (WebCore::JSDataCueConstructor::constructJSDataCue): Custom constructor. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by fixes: don't schedule timeupdate events when paused, don't call sort on an Vector that can't be sorted. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Initialize m_type. (WebCore::DataCue::~DataCue): Unprotect the JSValue if necessary. (WebCore::DataCue::data): Ask the platform value for data if non-null. (WebCore::DataCue::setData): Clear m_platformValue and m_value. (WebCore::DataCue::isEqual): New. (WebCore::DataCue::value): Return a JSValue from the platform value, or the value passed to the constructor/set by script. (WebCore::DataCue::setValue): Set m_value. * html/track/DataCue.h: * html/track/DataCue.idl: * html/track/InbandDataTextTrack.cpp: (WebCore::InbandDataTextTrack::addDataCue): Don't add the same cue more than once. (WebCore::InbandDataTextTrack::updateDataCue): Update a cue's duration. (WebCore::InbandDataTextTrack::removeDataCue): Remove an incomplete cue. (WebCore::InbandDataTextTrack::removeCue): Remove a cue from the incomplete cue map if necessary. * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.cpp: (WebCore::InbandGenericTextTrack::addGenericCue): CueMatchRules is now in TextTrackCue instead of VTTCue. * html/track/InbandTextTrack.h: * html/track/InbandWebVTTTextTrack.cpp: (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::hasCue): Ditto. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::isEqual): New, test base class equality. * html/track/TextTrackCue.h: * html/track/TextTrackCueGeneric.cpp: (WebCore::TextTrackCueGeneric::isEqual): Call TextTrackCue::isEqual first. * html/track/TextTrackCueGeneric.h: * html/track/VTTCue.cpp: (WebCore::VTTCue::isEqual): Call TextTrackCue::isEqual first. * html/track/VTTCue.h: * platform/SerializedPlatformRepresentation.h: Added. (WebCore::SerializedPlatformRepresentation::~SerializedPlatformRepresentation): (WebCore::SerializedPlatformRepresentation::SerializedPlatformRepresentation): * platform/graphics/InbandTextTrackPrivateClient.h: Add methods for DataCue with SerializedPlatformRepresentation. * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Added. (WebCore::InbandMetadataTextTrackPrivateAVF::create): (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::~InbandMetadataTextTrackPrivateAVF): (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue): (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues): * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h: Added. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto. (WebCore::MediaPlayerPrivateAVFoundation::configureInbandTracks): Ditto. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundation::setCurrentTrack): Deleted. Renamed currentTrack and setCurrentTrack to currentTextTrack and setCurrentTextTrack. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::AVFWrapper::currentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTextTrack): (WebCore::MediaPlayerPrivateAVFoundationCF::currentTextTrack): (WebCore::AVFWrapper::setCurrentTextTrack): (WebCore::AVFWrapper::AVFWrapper): (WebCore::AVFWrapper::processCue): (WebCore::AVFWrapper::currentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Deleted. (WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Deleted. (WebCore::AVFWrapper::setCurrentTrack): Deleted. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): currentTrack -> currentTextTrack (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): currentTrack -> currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): New. (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue): m_currentTrack -> m_currentTextTrack. (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): Ditto. (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack): Renamed from setCurrentTextTrack. (WebCore::metadataType): Map an AVFoundation metadata key space to a metadata cue type. (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Process new metadata. (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deleted. Create a JSValue representation from an AVMetadataItem. * platform/mac/SerializedPlatformRepresentationMac.h: Added. (WebCore::SerializedPlatformRepresentationMac::platformType): (WebCore::SerializedPlatformRepresentationMac::nativeValue): * platform/mac/SerializedPlatformRepresentationMac.mm: Added. (WebCore::SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac): (WebCore::SerializedPlatformRepresentationMac::create): (WebCore::SerializedPlatformRepresentationMac::data): (WebCore::SerializedPlatformRepresentationMac::deserialize): (WebCore::SerializedPlatformRepresentationMac::isEqual): (WebCore::toSerializedPlatformRepresentationMac): (WebCore::jsValueWithValueInContext): (WebCore::jsValueWithDataInContext): (WebCore::jsValueWithArrayInContext): (WebCore::jsValueWithDictionaryInContext): (WebCore::jsValueWithAVMetadataItemInContext): Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WebKit2: * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE. Source/WTF: * wtf/FeatureDefines.h: Define ENABLE_DATACUE_VALUE. LayoutTests: * http/tests/media/resources/hls: Added. * http/tests/media/resources/hls/metadata: Added. * http/tests/media/resources/hls/metadata/fileSequence0.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence1.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence2.ts: Added. * http/tests/media/resources/hls/metadata/fileSequence3.ts: Added. * http/tests/media/resources/hls/metadata/prog_index.m3u8: Added. * http/tests/media/track-in-band-hls-metadata-expected.txt: Added. * http/tests/media/track-in-band-hls-metadata.html: Added. * media/track/track-datacue-value-expected.txt: Added. * media/track/track-datacue-value.html: Added. * platform/efl/TestExpectations: Skip the new tests. * platform/gtk/TestExpectations: Ditto. * platform/mac/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: Update. * platform/mac/TestExpectations: Skip DataCue test on all Mac versions. Skip HLS test on Mountain Lion. * platform/win/TestExpectations: Skip the new tests. Canonical link: https://commits.webkit.org/150050@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-21 23:18:23 +00:00
#endif
[GStreamer] Expose MPEG-TS metadata https://bugs.webkit.org/show_bug.cgi?id=122001 Reviewed by Eric Carlson. .: * Source/cmake/FindGStreamer.cmake: Look for gstreamer-mpegts >= 1.3.0. * Source/cmake/OptionsEfl.cmake: Same. * Source/cmake/OptionsGTK.cmake: Same. Source/WebCore: Test: media/track/in-band/track-in-band-mpegts-metadata.html * CMakeLists.txt: Add InbandDataTextTrack. * PlatformGTK.cmake: Look for gstreamer-mpegts and use it if available. * WebCore.vcxproj/WebCore.vcxproj: Add InbandDataTextTrack. * WebCore.vcxproj/WebCore.vcxproj.filters: Same. * WebCore.xcodeproj/project.pbxproj: Same. * html/track/DataCue.cpp: (WebCore::DataCue::DataCue): Add a constructor using raw data. * html/track/DataCue.h: (WebCore::DataCue::create): Same. * html/track/InbandDataTextTrack.cpp: Added, InbandTextTrack which implements addDataCue(). * html/track/InbandDataTextTrack.h: * html/track/InbandGenericTextTrack.h: Move unimplemented methods to InbandTextTrack. * html/track/InbandWebVTTTextTrack.h: Same. * html/track/InbandTextTrack.h: Same, and add inBandMetadataTrackDispatchType. * html/track/InbandTextTrack.cpp: (WebCore::InbandTextTrack::create): Add constructor for InbandDataTextTrack. (WebCore::InbandTextTrack::inBandMetadataTrackDispatchType): Added. * html/track/TextTrack.h: (WebCore::TextTrack::inBandMetadataTrackDispatchType): Added (empty). * html/track/TextTrack.idl: Add inBandMetadataTrackDispatchType. * platform/graphics/InbandTextTrackPrivate.h: Add inBandMetadataTrackDispatchType and Data format. (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType): * platform/graphics/InbandTextTrackPrivateClient.h: Add addDataCue() method. * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: (WebCore::InbandMetadataTextTrackPrivateGStreamer::create): Allow specifying the cue format and id. (WebCore::InbandMetadataTextTrackPrivateGStreamer::InbandMetadataTextTrackPrivateGStreamer): Same. (WebCore::InbandMetadataTextTrackPrivateGStreamer::setInBandMetadataTrackDispatchType): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue): Added. (WebCore::InbandMetadataTextTrackPrivateGStreamer::addGenericCue): Added. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Check for MPEG-TS sections. (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Add MPEG-TS section metadata, and get inBandMetadataTrackDispatchType from the PMT. (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Explicitly use Generic CueFormat. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: LayoutTests: * media/content/user-private-streams.ts: Added. * media/track/in-band/track-in-band-mpegts-metadata-expected.txt: Added. * media/track/in-band/track-in-band-mpegts-metadata.html: Added. Canonical link: https://commits.webkit.org/149510@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-04-09 18:43:40 +00:00
};
} // namespace WebCore
#endif