Changeset 256536 in webkit


Ignore:
Timestamp:
Feb 13, 2020 1:40:08 PM (4 years ago)
Author:
eric.carlson@apple.com
Message:

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):

Location:
trunk/Source
Files:
19 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r256531 r256536  
     12020-02-13  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Rename SerializedPlatformRepresentation to SerializedPlatformDataCue
     4        https://bugs.webkit.org/show_bug.cgi?id=207695
     5        <rdar://problem/59422673>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        No new tests, no functional change.
     10
     11        * SourcesCocoa.txt:
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * html/track/DataCue.cpp:
     14        (WebCore::DataCue::DataCue):
     15        (WebCore::DataCue::cueContentsMatch const):
     16        * html/track/DataCue.h:
     17        * html/track/InbandDataTextTrack.cpp:
     18        (WebCore::InbandDataTextTrack::addDataCue):
     19        (WebCore::InbandDataTextTrack::updateDataCue):
     20        (WebCore::InbandDataTextTrack::removeDataCue):
     21        (WebCore::InbandDataTextTrack::removeCue):
     22        * html/track/InbandDataTextTrack.h:
     23        * html/track/InbandTextTrack.h:
     24        * platform/SerializedPlatformDataCue.h: Renamed from Source/WebCore/platform/SerializedPlatformRepresentation.h.
     25        * platform/graphics/InbandTextTrackPrivateClient.h:
     26        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
     27        (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
     28        * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
     29        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     30        (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
     31        * platform/mac/SerializedPlatformDataCueMac.h: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.h.
     32        (WebCore::SerializedPlatformDataCueMac::nativeValue const):
     33        * platform/mac/SerializedPlatformDataCueMac.mm: Renamed from Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm.
     34        (WebCore::SerializedPlatformDataCueMac::SerializedPlatformDataCueMac):
     35        (WebCore::SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac):
     36        (WebCore::SerializedPlatformDataCueMac::create):
     37        (WebCore::SerializedPlatformDataCueMac::data const):
     38        (WebCore::SerializedPlatformDataCueMac::deserialize const):
     39        (WebCore::SerializedPlatformDataCueMac::isEqual const):
     40        (WebCore::toSerializedPlatformDataCueMac):
     41        (WebCore::jsValueWithValueInContext):
     42        (WebCore::jsValueWithDataInContext):
     43        (WebCore::jsValueWithArrayInContext):
     44        (WebCore::jsValueWithDictionaryInContext):
     45        (WebCore::jsValueWithAVMetadataItemInContext):
     46
    1472020-02-13  Per Arne Vollan  <pvollan@apple.com>
    248
  • trunk/Source/WebCore/Headers.cmake

    r256512 r256536  
    995995    platform/ScrollbarThemeComposite.h
    996996    platform/SearchPopupMenu.h
    997     platform/SerializedPlatformRepresentation.h
     997    platform/SerializedPlatformDataCue.h
    998998    platform/SharedBuffer.h
    999999    platform/SharedStringHash.h
  • trunk/Source/WebCore/PlatformMac.cmake

    r256007 r256536  
    382382    platform/mac/ScrollViewMac.mm
    383383    platform/mac/ScrollbarThemeMac.mm
    384     platform/mac/SerializedPlatformRepresentationMac.mm
     384    platform/mac/SerializedPlatformDataCueMac.mm
    385385    platform/mac/StringUtilities.mm
    386386    platform/mac/SuddenTermination.mm
  • trunk/Source/WebCore/SourcesCocoa.txt

    r256424 r256536  
    464464platform/mac/ScrollViewMac.mm
    465465platform/mac/ScrollbarThemeMac.mm @no-unify
    466 platform/mac/SerializedPlatformRepresentationMac.mm
     466platform/mac/SerializedPlatformDataCueMac.mm
    467467platform/mac/StringUtilities.mm
    468468platform/mac/SuddenTermination.mm
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r256512 r256536  
    138138                076F0D0E12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 076F0D0A12B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.h */; };
    139139                077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */ = {isa = PBXBuildFile; fileRef = 077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */; };
    140                 077AF14018F4AE400001ED61 /* SerializedPlatformRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */; settings = {ATTRIBUTES = (Private, ); }; };
    141                 077AF14318F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */; };
     140                077AF14018F4AE400001ED61 /* SerializedPlatformDataCue.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */; settings = {ATTRIBUTES = (Private, ); }; };
     141                077AF14318F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */; };
    142142                077B64131B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 077B64111B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h */; settings = {ATTRIBUTES = (Private, ); }; };
    143143                077B64171B95F703003E9AD5 /* MediaPlaybackTargetMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 077B64151B95F703003E9AD5 /* MediaPlaybackTargetMock.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    54765476                077664FA183E6B5C00133B92 /* JSQuickTimePluginReplacement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSQuickTimePluginReplacement.cpp; sourceTree = "<group>"; };
    54775477                077664FB183E6B5C00133B92 /* JSQuickTimePluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSQuickTimePluginReplacement.h; sourceTree = "<group>"; };
    5478                 077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentation.h; sourceTree = "<group>"; };
    5479                 077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformRepresentationMac.h; sourceTree = "<group>"; };
    5480                 077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformRepresentationMac.mm; sourceTree = "<group>"; };
     5478                077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformDataCue.h; sourceTree = "<group>"; };
     5479                077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SerializedPlatformDataCueMac.h; sourceTree = "<group>"; };
     5480                077AF14218F4B1BB0001ED61 /* SerializedPlatformDataCueMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SerializedPlatformDataCueMac.mm; sourceTree = "<group>"; };
    54815481                077B64101B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaPlaybackTargetPickerMock.cpp; sourceTree = "<group>"; };
    54825482                077B64111B94F12E003E9AD5 /* MediaPlaybackTargetPickerMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlaybackTargetPickerMock.h; sourceTree = "<group>"; };
     
    2046520465                                BCEF869E0E844E9D00A85CD5 /* ScrollbarThemeMac.mm */,
    2046620466                                9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */,
    20467                                 077AF14118F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h */,
    20468                                 077AF14218F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.mm */,
     20467                                077AF14118F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h */,
     20468                                077AF14218F4B1BB0001ED61 /* SerializedPlatformDataCueMac.mm */,
    2046920469                                84B2B24F056BF15F00D2B771 /* SSLKeyGeneratorMac.mm */,
    2047020470                                ECA680C61E67724500731D20 /* StringUtilities.h */,
     
    2596125961                                BC6D6E2509AF943500F59759 /* ScrollView.h */,
    2596225962                                AB7170880B3118080017123E /* SearchPopupMenu.h */,
    25963                                 077AF13E18F4AE400001ED61 /* SerializedPlatformRepresentation.h */,
     25963                                077AF13E18F4AE400001ED61 /* SerializedPlatformDataCue.h */,
    2596425964                                1A4A954B0B4EDCCB002D8C3C /* SharedBuffer.cpp */,
    2596525965                                1A4A954C0B4EDCCB002D8C3C /* SharedBuffer.h */,
     
    3221632216                                F4D43D662188038B00ECECAC /* SerializedAttachmentData.h in Headers */,
    3221732217                                E18DF33518AAF12C00773E59 /* SerializedCryptoKeyWrap.h in Headers */,
    32218                                 077AF14018F4AE400001ED61 /* SerializedPlatformRepresentation.h in Headers */,
    32219                                 077AF14318F4B1BB0001ED61 /* SerializedPlatformRepresentationMac.h in Headers */,
     32218                                077AF14018F4AE400001ED61 /* SerializedPlatformDataCue.h in Headers */,
     32219                                077AF14318F4B1BB0001ED61 /* SerializedPlatformDataCueMac.h in Headers */,
    3222032220                                A75E497610752ACB00C9B896 /* SerializedScriptValue.h in Headers */,
    3222132221                                516F7F6D1C31E39A00F111DC /* ServerOpenDBRequest.h in Headers */,
  • trunk/Source/WebCore/html/track/DataCue.cpp

    r251425 r256536  
    5555}
    5656
    57 DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformRepresentation>&& platformValue, const String& type)
     57DataCue::DataCue(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&& platformValue, const String& type)
    5858    : TextTrackCue(context, start, end)
    5959    , m_type(type)
     
    117117        return false;
    118118
    119     const SerializedPlatformRepresentation* otherPlatformValue = dataCue->platformValue();
     119    auto otherPlatformValue = dataCue->platformValue();
    120120    if ((otherPlatformValue && !m_platformValue) || (!otherPlatformValue && m_platformValue))
    121121        return false;
  • trunk/Source/WebCore/html/track/DataCue.h

    r251425 r256536  
    2929#if ENABLE(VIDEO_TRACK)
    3030
    31 #include "SerializedPlatformRepresentation.h"
     31#include "SerializedPlatformDataCue.h"
    3232#include "TextTrackCue.h"
    3333#include <JavaScriptCore/ArrayBuffer.h>
     
    5858    }
    5959
    60     static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformRepresentation>&& platformValue, const String& type)
     60    static Ref<DataCue> create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&& platformValue, const String& type)
    6161    {
    6262        return adoptRef(*new DataCue(context, start, end, WTFMove(platformValue), type));
     
    7878    void setData(JSC::ArrayBuffer&);
    7979
    80     const SerializedPlatformRepresentation* platformValue() const { return m_platformValue.get(); }
     80    const SerializedPlatformDataCue* platformValue() const { return m_platformValue.get(); }
    8181
    8282    JSC::JSValue value(JSC::JSGlobalObject&) const;
     
    9595    DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, ArrayBuffer&, const String&);
    9696    DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, const void*, unsigned);
    97     DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformRepresentation>&&, const String&);
     97    DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, RefPtr<SerializedPlatformDataCue>&&, const String&);
    9898    DataCue(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, JSC::JSValue, const String&);
    9999
     
    102102    RefPtr<ArrayBuffer> m_data;
    103103    String m_type;
    104     RefPtr<SerializedPlatformRepresentation> m_platformValue;
     104    RefPtr<SerializedPlatformDataCue> m_platformValue;
    105105    // FIXME: The following use of JSC::Strong is incorrect and can lead to storage leaks
    106106    // due to reference cycles; we should use JSValueInWrappedObject instead.
  • trunk/Source/WebCore/html/track/InbandDataTextTrack.cpp

    r243887 r256536  
    5858#if ENABLE(DATACUE_VALUE)
    5959
    60 void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&& platformValue, const String& type)
     60void InbandDataTextTrack::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&& platformValue, const String& type)
    6161{
    6262    if (m_incompleteCueMap.contains(platformValue.ptr()))
     
    7979}
    8080
    81 void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime& inEnd, SerializedPlatformRepresentation& platformValue)
     81void InbandDataTextTrack::updateDataCue(const MediaTime& start, const MediaTime& inEnd, SerializedPlatformDataCue& platformValue)
    8282{
    8383    RefPtr<DataCue> cue = m_incompleteCueMap.get(&platformValue);
     
    101101}
    102102
    103 void InbandDataTextTrack::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation& platformValue)
     103void InbandDataTextTrack::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue& platformValue)
    104104{
    105105    if (auto cue = m_incompleteCueMap.take(&platformValue)) {
     
    113113    ASSERT(cue.cueType() == TextTrackCue::Data);
    114114
    115     m_incompleteCueMap.remove(const_cast<SerializedPlatformRepresentation*>(toDataCue(&cue)->platformValue()));
     115    m_incompleteCueMap.remove(const_cast<SerializedPlatformDataCue*>(toDataCue(&cue)->platformValue()));
    116116
    117117    return InbandTextTrack::removeCue(cue);
  • trunk/Source/WebCore/html/track/InbandDataTextTrack.h

    r243887 r256536  
    5151
    5252#if ENABLE(DATACUE_VALUE)
    53     void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&) final;
    54     void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) final;
    55     void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) final;
     53    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) final;
     54    void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final;
     55    void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) final;
    5656    ExceptionOr<void> removeCue(TextTrackCue&) final;
    5757
    58     HashMap<RefPtr<SerializedPlatformRepresentation>, RefPtr<DataCue>> m_incompleteCueMap;
     58    HashMap<RefPtr<SerializedPlatformDataCue>, RefPtr<DataCue>> m_incompleteCueMap;
    5959#endif
    6060};
  • trunk/Source/WebCore/html/track/InbandTextTrack.h

    r256353 r256536  
    7373
    7474#if ENABLE(DATACUE_VALUE)
    75     void addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformRepresentation>&&, const String&) override { ASSERT_NOT_REACHED(); }
    76     void updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&) override  { ASSERT_NOT_REACHED(); }
    77     void removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&) override  { ASSERT_NOT_REACHED(); }
     75    void addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformDataCue>&&, const String&) override { ASSERT_NOT_REACHED(); }
     76    void updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) override  { ASSERT_NOT_REACHED(); }
     77    void removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&) override  { ASSERT_NOT_REACHED(); }
    7878#endif
    7979
  • trunk/Source/WebCore/platform/SerializedPlatformDataCue.h

    r256535 r256536  
    11/*
    2  * Copyright (C) 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3333namespace WebCore {
    3434
    35 class SerializedPlatformRepresentation : public RefCounted<SerializedPlatformRepresentation> {
     35class SerializedPlatformDataCue : public RefCounted<SerializedPlatformDataCue> {
    3636public:
    37     virtual ~SerializedPlatformRepresentation() = default;
     37    virtual ~SerializedPlatformDataCue() = default;
    3838
    3939    virtual JSC::JSValue deserialize(JSC::JSGlobalObject*) const = 0;
    4040    virtual RefPtr<JSC::ArrayBuffer> data() const = 0;
    41     virtual bool isEqual(const SerializedPlatformRepresentation&) const = 0;
     41    virtual bool isEqual(const SerializedPlatformDataCue&) const = 0;
    4242
    4343    enum PlatformType {
     
    4747
    4848protected:
    49     SerializedPlatformRepresentation() = default;
     49    SerializedPlatformDataCue() = default;
    5050};
    5151
  • trunk/Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h

    r256353 r256536  
    3434
    3535#if ENABLE(DATACUE_VALUE)
    36 #include "SerializedPlatformRepresentation.h"
     36#include "SerializedPlatformDataCue.h"
    3737#endif
    3838
     
    230230
    231231#if ENABLE(DATACUE_VALUE)
    232     virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&) = 0;
    233     virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) = 0;
    234     virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&) = 0;
     232    virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&) = 0;
     233    virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) = 0;
     234    virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&) = 0;
    235235#endif
    236236
  • trunk/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp

    r256353 r256536  
    5555#if ENABLE(DATACUE_VALUE)
    5656
    57 void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&& cueData, const String& type)
     57void InbandMetadataTextTrackPrivateAVF::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&& cueData, const String& type)
    5858{
    5959    ASSERT(cueFormat() == CueFormat::Data);
  • trunk/Source/WebCore/platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h

    r246490 r256536  
    3535#if ENABLE(DATACUE_VALUE)
    3636struct IncompleteMetaDataCue {
    37     RefPtr<SerializedPlatformRepresentation> cueData;
     37    RefPtr<SerializedPlatformDataCue> cueData;
    3838    MediaTime startTime;
    3939};
     
    5252
    5353#if ENABLE(DATACUE_VALUE)
    54     void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&);
     54    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&);
    5555    void updatePendingCueEndTimes(const MediaTime&);
    5656#endif
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r256424 r256536  
    5656#import "PlatformTimeRanges.h"
    5757#import "SecurityOrigin.h"
    58 #import "SerializedPlatformRepresentationMac.h"
     58#import "SerializedPlatformDataCueMac.h"
    5959#import "SharedBuffer.h"
    6060#import "TextEncoding.h"
     
    30743074            type = metadataType(item.keySpace);
    30753075
    3076         m_metadataTrack->addDataCue(start, end, SerializedPlatformRepresentationMac::create(item), type);
     3076        m_metadataTrack->addDataCue(start, end, SerializedPlatformDataCueMac::create(item), type);
    30773077    }
    30783078#endif
  • trunk/Source/WebCore/platform/mac/SerializedPlatformDataCueMac.h

    r256535 r256536  
    11/*
    2  * Copyright (C) 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef SerializedPlatformRepresentationMac_h
    27 #define SerializedPlatformRepresentationMac_h
     26#pragma once
    2827
    2928#if ENABLE(VIDEO_TRACK) && ENABLE(DATACUE_VALUE)
    3029
    31 #include "SerializedPlatformRepresentation.h"
     30#include "SerializedPlatformDataCue.h"
    3231
    3332#if USE(FOUNDATION) && !defined(__OBJC__)
     
    3736namespace WebCore {
    3837
    39 class SerializedPlatformRepresentationMac : public SerializedPlatformRepresentation {
     38class SerializedPlatformDataCueMac final : public SerializedPlatformDataCue {
    4039public:
    41     virtual ~SerializedPlatformRepresentationMac();
    42     static Ref<SerializedPlatformRepresentation> create(id);
     40    virtual ~SerializedPlatformDataCueMac();
     41    static Ref<SerializedPlatformDataCue> create(id);
    4342
    44     JSC::JSValue deserialize(JSC::JSGlobalObject*) const override;
    45     RefPtr<ArrayBuffer> data() const override;
     43    JSC::JSValue deserialize(JSC::JSGlobalObject*) const final;
     44    RefPtr<ArrayBuffer> data() const final;
    4645
    47     bool isEqual(const SerializedPlatformRepresentation&) const override;
     46    bool isEqual(const SerializedPlatformDataCue&) const final;
    4847
    49     PlatformType platformType() const override { return SerializedPlatformRepresentation::ObjC; }
     48    PlatformType platformType() const final { return SerializedPlatformDataCue::ObjC; }
    5049
    5150    id nativeValue() const { return m_nativeValue.get(); }
    5251
    5352private:
    54     SerializedPlatformRepresentationMac(id nativeValue);
     53    explicit SerializedPlatformDataCueMac(id nativeValue);
    5554
    5655    RetainPtr<id> m_nativeValue;
    5756};
    5857
    59 SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(SerializedPlatformRepresentation*);
    60 const SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(const SerializedPlatformRepresentation*);
     58SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(SerializedPlatformDataCue*);
     59const SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(const SerializedPlatformDataCue*);
    6160
    6261} // namespace WebCore
    6362
    6463#endif
    65 #endif // SerializedPlatformRepresentationMac_h
  • trunk/Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm

    r256535 r256536  
    11/*
    2  * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2525
    2626#include "config.h"
     27#include "SerializedPlatformDataCueMac.h"
    2728
    2829#if ENABLE(VIDEO_TRACK) && ENABLE(DATACUE_VALUE)
    29 #include "SerializedPlatformRepresentationMac.h"
    3030
    3131#import "JSDOMConvertBufferSource.h"
     
    3939#import <JavaScriptCore/JavaScriptCore.h>
    4040#import <objc/runtime.h>
    41 #import <wtf/text/Base64.h>
    42 
    4341#import <pal/cocoa/AVFoundationSoftLink.h>
    4442
     
    5351#endif
    5452
    55 SerializedPlatformRepresentationMac::SerializedPlatformRepresentationMac(id nativeValue)
    56     : SerializedPlatformRepresentation()
     53SerializedPlatformDataCueMac::SerializedPlatformDataCueMac(id nativeValue)
     54    : SerializedPlatformDataCue()
    5755    , m_nativeValue(nativeValue)
    5856{
    5957}
    6058
    61 SerializedPlatformRepresentationMac::~SerializedPlatformRepresentationMac()
    62 {
    63 }
    64 
    65 Ref<SerializedPlatformRepresentation> SerializedPlatformRepresentationMac::create(id nativeValue)
    66 {
    67     return adoptRef(*new SerializedPlatformRepresentationMac(nativeValue));
    68 }
    69 
    70 RefPtr<ArrayBuffer> SerializedPlatformRepresentationMac::data() const
     59SerializedPlatformDataCueMac::~SerializedPlatformDataCueMac()
     60{
     61}
     62
     63Ref<SerializedPlatformDataCue> SerializedPlatformDataCueMac::create(id nativeValue)
     64{
     65    return adoptRef(*new SerializedPlatformDataCueMac(nativeValue));
     66}
     67
     68RefPtr<ArrayBuffer> SerializedPlatformDataCueMac::data() const
    7169{
    7270    return nullptr;
    7371}
    7472
    75 JSC::JSValue SerializedPlatformRepresentationMac::deserialize(JSC::JSGlobalObject* lexicalGlobalObject) const
     73JSC::JSValue SerializedPlatformDataCueMac::deserialize(JSC::JSGlobalObject* lexicalGlobalObject) const
    7674{
    7775#if JSC_OBJC_API_ENABLED
     
    9088}
    9189
    92 bool SerializedPlatformRepresentationMac::isEqual(const SerializedPlatformRepresentation& other) const
    93 {
    94     if (other.platformType() != SerializedPlatformRepresentation::ObjC)
     90bool SerializedPlatformDataCueMac::isEqual(const SerializedPlatformDataCue& other) const
     91{
     92    if (other.platformType() != SerializedPlatformDataCue::ObjC)
    9593        return false;
    9694
    97     const SerializedPlatformRepresentationMac* otherObjC = toSerializedPlatformRepresentationMac(&other);
     95    const SerializedPlatformDataCueMac* otherObjC = toSerializedPlatformDataCueMac(&other);
    9896
    9997    if (!m_nativeValue || !otherObjC->nativeValue())
     
    103101}
    104102
    105 SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(SerializedPlatformRepresentation* rep)
    106 {
    107     return const_cast<SerializedPlatformRepresentationMac*>(toSerializedPlatformRepresentationMac(const_cast<const SerializedPlatformRepresentation*>(rep)));
    108 }
    109 
    110 const SerializedPlatformRepresentationMac* toSerializedPlatformRepresentationMac(const SerializedPlatformRepresentation* rep)
    111 {
    112     ASSERT_WITH_SECURITY_IMPLICATION(rep->platformType() == SerializedPlatformRepresentation::ObjC);
    113     return static_cast<const SerializedPlatformRepresentationMac*>(rep);
     103SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(SerializedPlatformDataCue* rep)
     104{
     105    return const_cast<SerializedPlatformDataCueMac*>(toSerializedPlatformDataCueMac(const_cast<const SerializedPlatformDataCue*>(rep)));
     106}
     107
     108const SerializedPlatformDataCueMac* toSerializedPlatformDataCueMac(const SerializedPlatformDataCue* rep)
     109{
     110    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(rep->platformType() == SerializedPlatformDataCue::ObjC);
     111    return static_cast<const SerializedPlatformDataCueMac*>(rep);
    114112}
    115113
  • trunk/Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.cpp

    r256353 r256536  
    103103
    104104#if ENABLE(DATACUE_VALUE)
    105 void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformRepresentation>&&, const String&)
     105void RemoteTextTrackProxy::addDataCue(const MediaTime&, const MediaTime&, Ref<SerializedPlatformDataCue>&&, const String&)
    106106{
    107107    notImplemented();
    108108}
    109109
    110 void RemoteTextTrackProxy::updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&)
     110void RemoteTextTrackProxy::updateDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&)
    111111{
    112112    notImplemented();
    113113}
    114114
    115 void RemoteTextTrackProxy::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformRepresentation&)
     115void RemoteTextTrackProxy::removeDataCue(const MediaTime&, const MediaTime&, SerializedPlatformDataCue&)
    116116{
    117117    notImplemented();
  • trunk/Source/WebKit/GPUProcess/media/RemoteTextTrackProxy.h

    r256353 r256536  
    5757
    5858#if ENABLE(DATACUE_VALUE)
    59     virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&);
    60     virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
    61     virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
     59    virtual void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&);
     60    virtual void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
     61    virtual void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
    6262#endif
    6363
  • trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in

    r256353 r256536  
    5252
    5353    ## AddDataCue(MediaTime start, MediaTime end, IPC::DataReference data)
    54     ## AddDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformRepresentation data, String type)
    55     ## UpdateDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformRepresentation data)
    56     ## RemoveDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformRepresentation data)
     54    ## AddDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data, String type)
     55    ## UpdateDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data)
     56    ## RemoveDataCue(MediaTime start, MediaTime end, WebCore::SerializedPlatformDataCue data)
    5757
    5858    ## AddGenericCue(WebCore::GenericCueData cue)
  • trunk/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.cpp

    r256353 r256536  
    9595
    9696#if ENABLE(DATACUE_VALUE)
    97 void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&)
     97void TextTrackPrivateRemote::addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&)
    9898{
    9999    notImplemented();
    100100}
    101101
    102 void TextTrackPrivateRemote::updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&)
     102void TextTrackPrivateRemote::updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&)
    103103{
    104104    notImplemented();
    105105}
    106106
    107 void TextTrackPrivateRemote::removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&)
     107void TextTrackPrivateRemote::removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&)
    108108{
    109109    notImplemented();
  • trunk/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h

    r256353 r256536  
    4848
    4949#if ENABLE(DATACUE_VALUE)
    50     void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformRepresentation>&&, const String&);
    51     void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
    52     void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformRepresentation&);
     50    void addDataCue(const MediaTime& start, const MediaTime& end, Ref<SerializedPlatformDataCue>&&, const String&);
     51    void updateDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
     52    void removeDataCue(const MediaTime& start, const MediaTime& end, SerializedPlatformDataCue&);
    5353#endif
    5454
Note: See TracChangeset for help on using the changeset viewer.