Commit 1dfc3a43 authored by jer.noble@apple.com's avatar jer.noble@apple.com

[MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation,...

[MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation, MediaPlayerPrivateMediaSourceAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=123378

Reviewed by Eric Carlson.

Add an AVFoundation implementation of MediaPlayerPrivate which creates and uses
MediaSourcePrivate and SourceBufferPrivate subclasses.

Add the new media engine to the list of installed engines:
* platform/MediaSample.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines):
* platform/graphics/MediaPlayer.h:

Add the new files to the project:
* WebCore.xcodeproj/project.pbxproj:

Drive by fix for ports who implement seekDouble():
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekWithTolerance):

Add new Video and AudioTrackPrivate types which handle their own enable state:
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: Added
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::assetTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Added
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.cpp: Added.
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::assetTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::setSelected):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: Added.

Add a new MediaPlayerPrivate which can handle MediaSource objects:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Added.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareToPlay):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformMedia):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsScanning):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::networkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::readyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsAcceleratedRendering):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareForRendering):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::languageOfPrimaryAudioTrack):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::extraMemoryCost):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateDuration):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateStates):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):

Add a new MediaSourcePrivate implementation:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: Added.
(WebCore::MediaSourcePrivateAVFObjC::player):
(WebCore::MediaSourcePrivateAVFObjC::activeSourceBuffers):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Added.
(WebCore::MediaSourcePrivateAVFObjC::create):
(WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::duration):
(WebCore::MediaSourcePrivateAVFObjC::setDuration):
(WebCore::MediaSourcePrivateAVFObjC::markEndOfStream):
(WebCore::MediaSourcePrivateAVFObjC::unmarkEndOfStream):
(WebCore::MediaSourcePrivateAVFObjC::readyState):
(WebCore::MediaSourcePrivateAVFObjC::setReadyState):
(WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState):
(WebCore::MediaSourcePrivateAVFObjCHasAudio):
(WebCore::MediaSourcePrivateAVFObjC::hasAudio):
(WebCore::MediaSourcePrivateAVFObjCHasVideo):
(WebCore::MediaSourcePrivateAVFObjC::hasVideo):
(WebCore::MediaSourcePrivateAVFObjC::seekToTime):

Add a new SourceBufferPrivate implementation:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]):
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::~MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::platformSample):
(WebCore::CMSampleBufferIsRandomAccess):
(WebCore::MediaSampleAVFObjC::flags):
(WebCore::MediaDescriptionAVFObjC::create):
(WebCore::MediaDescriptionAVFObjC::~MediaDescriptionAVFObjC):
(WebCore::MediaDescriptionAVFObjC::MediaDescriptionAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
(WebCore::callProcessCodedFrameForEachSample):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::didReachEndOfTrackWithTrackID):
(WebCore::SourceBufferPrivateAVFObjC::setClient):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
(WebCore::SourceBufferPrivateAVFObjC::readyState):
(WebCore::SourceBufferPrivateAVFObjC::setReadyState):
(WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames):
(WebCore::SourceBufferPrivateAVFObjC::isFull):
(WebCore::SourceBufferPrivateAVFObjC::hasVideo):
(WebCore::SourceBufferPrivateAVFObjC::hasAudio):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::createNonDisplayingCopy):
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::setActive):
(WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
(WebCore::SourceBufferPrivateAVFObjC::seekToTime):
* platform/mac/PlatformClockCM.h:

Add a SOFT_LINK_CLASS_OPTIONAL macro:
* platform/mac/SoftLinking.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 49030778
2013-11-15 Jer Noble <jer.noble@apple.com>
[MSE][Mac] Add a new MSE-compatible MediaPlayerPrivate implementation, MediaPlayerPrivateMediaSourceAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=123378
Reviewed by Eric Carlson.
Add an AVFoundation implementation of MediaPlayerPrivate which creates and uses
MediaSourcePrivate and SourceBufferPrivate subclasses.
Add the new media engine to the list of installed engines:
* platform/MediaSample.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines):
* platform/graphics/MediaPlayer.h:
Add the new files to the project:
* WebCore.xcodeproj/project.pbxproj:
Drive by fix for ports who implement seekDouble():
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
Add new Video and AudioTrackPrivate types which handle their own enable state:
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: Added
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::assetTrack):
(WebCore::AudioTrackPrivateMediaSourceAVFObjC::setEnabled):
* platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: Added
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.cpp: Added.
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::VideoTrackPrivateMediaSourceAVFObjC):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::setAssetTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::assetTrack):
(WebCore::VideoTrackPrivateMediaSourceAVFObjC::setSelected):
* platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: Added.
Add a new MediaPlayerPrivate which can handle MediaSource objects:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Added.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::~MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareToPlay):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformMedia):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paused):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsScanning):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasVideo):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAudio):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::networkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::readyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setSize):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasAvailableVideoFrame):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsAcceleratedRendering):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::movieLoadType):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::prepareForRendering):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::engineDescription):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::languageOfPrimaryAudioTrack):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::extraMemoryCost):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateDuration):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateStates):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNetworkState):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
Add a new MediaSourcePrivate implementation:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: Added.
(WebCore::MediaSourcePrivateAVFObjC::player):
(WebCore::MediaSourcePrivateAVFObjC::activeSourceBuffers):
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Added.
(WebCore::MediaSourcePrivateAVFObjC::create):
(WebCore::MediaSourcePrivateAVFObjC::MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::~MediaSourcePrivateAVFObjC):
(WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer):
(WebCore::MediaSourcePrivateAVFObjC::duration):
(WebCore::MediaSourcePrivateAVFObjC::setDuration):
(WebCore::MediaSourcePrivateAVFObjC::markEndOfStream):
(WebCore::MediaSourcePrivateAVFObjC::unmarkEndOfStream):
(WebCore::MediaSourcePrivateAVFObjC::readyState):
(WebCore::MediaSourcePrivateAVFObjC::setReadyState):
(WebCore::MediaSourcePrivateAVFObjC::sourceBufferPrivateDidChangeActiveState):
(WebCore::MediaSourcePrivateAVFObjCHasAudio):
(WebCore::MediaSourcePrivateAVFObjC::hasAudio):
(WebCore::MediaSourcePrivateAVFObjCHasVideo):
(WebCore::MediaSourcePrivateAVFObjC::hasVideo):
(WebCore::MediaSourcePrivateAVFObjC::seekToTime):
Add a new SourceBufferPrivate implementation:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Added.
(-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]):
(-[WebAVStreamDataParserListener dealloc]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
(-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]):
(WebCore::MediaSampleAVFObjC::create):
(WebCore::MediaSampleAVFObjC::~MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::platformSample):
(WebCore::CMSampleBufferIsRandomAccess):
(WebCore::MediaSampleAVFObjC::flags):
(WebCore::MediaDescriptionAVFObjC::create):
(WebCore::MediaDescriptionAVFObjC::~MediaDescriptionAVFObjC):
(WebCore::MediaDescriptionAVFObjC::MediaDescriptionAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::create):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
(WebCore::SourceBufferPrivateAVFObjC::didFailToParseStreamDataWithError):
(WebCore::callProcessCodedFrameForEachSample):
(WebCore::SourceBufferPrivateAVFObjC::didProvideMediaDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
(WebCore::SourceBufferPrivateAVFObjC::didReachEndOfTrackWithTrackID):
(WebCore::SourceBufferPrivateAVFObjC::setClient):
(WebCore::SourceBufferPrivateAVFObjC::append):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource):
(WebCore::SourceBufferPrivateAVFObjC::readyState):
(WebCore::SourceBufferPrivateAVFObjC::setReadyState):
(WebCore::SourceBufferPrivateAVFObjC::evictCodedFrames):
(WebCore::SourceBufferPrivateAVFObjC::isFull):
(WebCore::SourceBufferPrivateAVFObjC::hasVideo):
(WebCore::SourceBufferPrivateAVFObjC::hasAudio):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::createNonDisplayingCopy):
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::setActive):
(WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
(WebCore::SourceBufferPrivateAVFObjC::seekToTime):
* platform/mac/PlatformClockCM.h:
Add a SOFT_LINK_CLASS_OPTIONAL macro:
* platform/mac/SoftLinking.h:
2013-12-06 Alexey Proskuryakov <ap@apple.com>
Remove some duplicate checks from SerializedScriptValue
......@@ -993,12 +993,12 @@ void SourceBuffer::sourceBufferPrivateDidReceiveSample(SourceBufferPrivate*, Pas
bool SourceBuffer::sourceBufferPrivateHasAudio(const SourceBufferPrivate*) const
{
return m_audioTracks->length();
return m_audioTracks && m_audioTracks->length();
}
bool SourceBuffer::sourceBufferPrivateHasVideo(const SourceBufferPrivate*) const
{
return m_videoTracks->length();
return m_videoTracks && m_videoTracks->length();
}
void SourceBuffer::videoTrackSelectedChanged(VideoTrack* track)
......
......@@ -5344,6 +5344,8 @@
CD4AC52A1496AE9A0087C4EF /* Composite.wav in Copy Audio Resources */ = {isa = PBXBuildFile; fileRef = CD4AC5281496AE2F0087C4EF /* Composite.wav */; };
CD5393D3175E018600C07123 /* JSMemoryInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */; };
CD5393D4175E018600C07123 /* JSMemoryInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5393D2175E018600C07123 /* JSMemoryInfo.h */; };
CD54A762180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54A760180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp */; };
CD54A763180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CD54A761180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h */; };
CD54DE4717468B6F005E5B36 /* AudioSessionManagerMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4517468B6F005E5B36 /* AudioSessionManagerMac.cpp */; };
CD54DE4B17469C6D005E5B36 /* AudioSessionMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */; };
CD61FE671794AADB004101EB /* MediaSourceRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B1A942E115B5CE2200D525D1 /* MediaSourceRegistry.cpp */; };
......@@ -5359,6 +5361,8 @@
CD82030D1395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD8203091395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.mm */; };
CD8203101395ACE700F956C6 /* WebWindowAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */; settings = {ATTRIBUTES = (Private, ); }; };
CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */; };
CD8B5A42180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD8B5A40180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.cpp */; };
CD8B5A43180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8B5A41180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h */; };
CD8B5A46180DFF4E008B8E65 /* VideoTrackMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8B5A45180DFF4E008B8E65 /* VideoTrackMediaSource.h */; };
CD8B5A49180E138B008B8E65 /* TextTrackMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8B5A48180E138B008B8E65 /* TextTrackMediaSource.h */; };
CD8B5A4C180E17C0008B8E65 /* AudioTrackMediaSource.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8B5A4B180E17C0008B8E65 /* AudioTrackMediaSource.h */; };
......@@ -5401,6 +5405,12 @@
CDC69DD71632026C007C38DF /* WebCoreFullScreenWarningView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC69DD51632026C007C38DF /* WebCoreFullScreenWarningView.mm */; };
CDC69DDA16371FD4007C38DF /* WebCoreFullScreenPlaceholderView.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC69DD816371FD3007C38DF /* WebCoreFullScreenPlaceholderView.h */; settings = {ATTRIBUTES = (Private, ); }; };
CDC69DDB16371FD4007C38DF /* WebCoreFullScreenPlaceholderView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC69DD916371FD3007C38DF /* WebCoreFullScreenPlaceholderView.mm */; };
CDC8B5A2180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC8B5A0180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.mm */; };
CDC8B5A3180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5A1180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.h */; };
CDC8B5A6180474F70016E685 /* MediaSourcePrivateAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC8B5A4180474F70016E685 /* MediaSourcePrivateAVFObjC.mm */; };
CDC8B5A7180474F70016E685 /* MediaSourcePrivateAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5A5180474F70016E685 /* MediaSourcePrivateAVFObjC.h */; };
CDC8B5AA18047FF10016E685 /* SourceBufferPrivateAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC8B5A818047FF10016E685 /* SourceBufferPrivateAVFObjC.mm */; };
CDC8B5AB18047FF10016E685 /* SourceBufferPrivateAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */; };
CDC8B5AD1804AE5D0016E685 /* SourceBufferPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */; };
CDD525D7145B6DD0008D204D /* JSHTMLMediaElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */; };
CDD7089618359F6F002B3DC6 /* SampleMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDD7089418359F6E002B3DC6 /* SampleMap.cpp */; };
......@@ -12429,6 +12439,8 @@
CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMemoryInfo.cpp; sourceTree = "<group>"; };
CD5393D2175E018600C07123 /* JSMemoryInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMemoryInfo.h; sourceTree = "<group>"; };
CD54A75E180F535000B076C9 /* MediaSourcePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourcePrivate.h; sourceTree = "<group>"; };
CD54A760180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioTrackPrivateMediaSourceAVFObjC.cpp; path = objc/AudioTrackPrivateMediaSourceAVFObjC.cpp; sourceTree = "<group>"; };
CD54A761180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioTrackPrivateMediaSourceAVFObjC.h; path = objc/AudioTrackPrivateMediaSourceAVFObjC.h; sourceTree = "<group>"; };
CD54DE4517468B6F005E5B36 /* AudioSessionManagerMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionManagerMac.cpp; sourceTree = "<group>"; };
CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionMac.cpp; sourceTree = "<group>"; };
CD641EB11818F5ED00EE4C41 /* MediaSourcePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaSourcePrivate.h; sourceTree = "<group>"; };
......@@ -12444,6 +12456,8 @@
CD8203091395AB6A00F956C6 /* WebVideoFullscreenHUDWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebVideoFullscreenHUDWindowController.mm; sourceTree = "<group>"; };
CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebWindowAnimation.h; sourceTree = "<group>"; };
CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebWindowAnimation.mm; sourceTree = "<group>"; };
CD8B5A40180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VideoTrackPrivateMediaSourceAVFObjC.cpp; path = objc/VideoTrackPrivateMediaSourceAVFObjC.cpp; sourceTree = "<group>"; };
CD8B5A41180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoTrackPrivateMediaSourceAVFObjC.h; path = objc/VideoTrackPrivateMediaSourceAVFObjC.h; sourceTree = "<group>"; };
CD8B5A44180DD8D6008B8E65 /* VideoTrackMediaSource.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = VideoTrackMediaSource.idl; sourceTree = "<group>"; };
CD8B5A45180DFF4E008B8E65 /* VideoTrackMediaSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoTrackMediaSource.h; sourceTree = "<group>"; };
CD8B5A47180E1361008B8E65 /* TextTrackMediaSource.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = TextTrackMediaSource.idl; sourceTree = "<group>"; };
......@@ -12516,6 +12530,12 @@
CDC69DD51632026C007C38DF /* WebCoreFullScreenWarningView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFullScreenWarningView.mm; sourceTree = "<group>"; };
CDC69DD816371FD3007C38DF /* WebCoreFullScreenPlaceholderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreFullScreenPlaceholderView.h; sourceTree = "<group>"; };
CDC69DD916371FD3007C38DF /* WebCoreFullScreenPlaceholderView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFullScreenPlaceholderView.mm; sourceTree = "<group>"; };
CDC8B5A0180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MediaPlayerPrivateMediaSourceAVFObjC.mm; path = objc/MediaPlayerPrivateMediaSourceAVFObjC.mm; sourceTree = "<group>"; };
CDC8B5A1180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaPlayerPrivateMediaSourceAVFObjC.h; path = objc/MediaPlayerPrivateMediaSourceAVFObjC.h; sourceTree = "<group>"; };
CDC8B5A4180474F70016E685 /* MediaSourcePrivateAVFObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MediaSourcePrivateAVFObjC.mm; path = objc/MediaSourcePrivateAVFObjC.mm; sourceTree = "<group>"; };
CDC8B5A5180474F70016E685 /* MediaSourcePrivateAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaSourcePrivateAVFObjC.h; path = objc/MediaSourcePrivateAVFObjC.h; sourceTree = "<group>"; };
CDC8B5A818047FF10016E685 /* SourceBufferPrivateAVFObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SourceBufferPrivateAVFObjC.mm; path = objc/SourceBufferPrivateAVFObjC.mm; sourceTree = "<group>"; };
CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceBufferPrivateAVFObjC.h; path = objc/SourceBufferPrivateAVFObjC.h; sourceTree = "<group>"; };
CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferPrivateClient.h; sourceTree = "<group>"; };
CDCE5CD014633BC900D47CCA /* EventTargetFactory.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventTargetFactory.in; sourceTree = "<group>"; };
CDD1E525167BA56400CE820B /* TextTrackRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentation.h; sourceTree = "<group>"; };
......@@ -20439,20 +20459,30 @@
DF9AFD6F13FC31B00015FEB7 /* objc */ = {
isa = PBXGroup;
children = (
CD336F5F17F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.mm */,
CD336F6017F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.h */,
CDE3A85517F6020400C5BE20 /* AudioTrackPrivateAVFObjC.mm */,
CDE3A85617F6020400C5BE20 /* AudioTrackPrivateAVFObjC.h */,
CDE3A85517F6020400C5BE20 /* AudioTrackPrivateAVFObjC.mm */,
CD54A760180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp */,
CD54A761180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h */,
CD336F6017F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.h */,
CD336F5F17F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.mm */,
07AA6B69166D019500D45671 /* InbandTextTrackPrivateAVFObjC.h */,
07AA6B6A166D019500D45671 /* InbandTextTrackPrivateAVFObjC.mm */,
07367DDD172CA67F00D861B9 /* InbandTextTrackPrivateLegacyAVFObjC.h */,
07367DDE172CA67F00D861B9 /* InbandTextTrackPrivateLegacyAVFObjC.mm */,
DF9AFD7013FC31D80015FEB7 /* MediaPlayerPrivateAVFoundationObjC.h */,
DF9AFD7113FC31D80015FEB7 /* MediaPlayerPrivateAVFoundationObjC.mm */,
CD7E05201651A84100C1201F /* WebCoreAVFResourceLoader.h */,
CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */,
CDC8B5A1180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.h */,
CDC8B5A0180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.mm */,
CDC8B5A5180474F70016E685 /* MediaSourcePrivateAVFObjC.h */,
CDC8B5A4180474F70016E685 /* MediaSourcePrivateAVFObjC.mm */,
CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */,
CDC8B5A818047FF10016E685 /* SourceBufferPrivateAVFObjC.mm */,
CD336F6517FA0AC600DDDCD0 /* VideoTrackPrivateAVFObjC.cpp */,
CD336F6617FA0AC600DDDCD0 /* VideoTrackPrivateAVFObjC.h */,
CD8B5A40180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.cpp */,
CD8B5A41180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h */,
CD7E05201651A84100C1201F /* WebCoreAVFResourceLoader.h */,
CD7E05211651A84100C1201F /* WebCoreAVFResourceLoader.mm */,
);
name = objc;
sourceTree = "<group>";
......@@ -22695,6 +22725,7 @@
85BCBC130ABBA87D00381160 /* DOMHTMLDocument.h in Headers */,
85E711A60AC5D5350053270F /* DOMHTMLDocumentInternal.h in Headers */,
85DF2EED0AA387CB00AD64C5 /* DOMHTMLElement.h in Headers */,
CDC8B5A7180474F70016E685 /* MediaSourcePrivateAVFObjC.h in Headers */,
85E711A70AC5D5350053270F /* DOMHTMLElementInternal.h in Headers */,
8540756A0AD6CBF900620C57 /* DOMHTMLEmbedElement.h in Headers */,
855247D00AD850B80012093B /* DOMHTMLEmbedElementInternal.h in Headers */,
......@@ -22963,6 +22994,7 @@
85031B420A44EFC700F992E0 /* Event.h in Headers */,
4138D3351244054800323D33 /* EventContext.h in Headers */,
CDAB6D2917C7DE6C00C60B34 /* MediaControlsHost.h in Headers */,
CDC8B5A3180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.h in Headers */,
418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */,
BC60D90C0D2A17CE00B9918F /* EventException.h in Headers */,
97665013144FAA4200F6BB51 /* EventFactory.h in Headers */,
......@@ -23944,6 +23976,7 @@
078E091517D14D1C00420AA1 /* MediaStream.h in Headers */,
0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */,
77EF62F412F9DB7400C77BD2 /* JSWebGLVertexArrayObjectOES.h in Headers */,
CDC8B5AB18047FF10016E685 /* SourceBufferPrivateAVFObjC.h in Headers */,
31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */,
A2E8AE3816A49840006BB3AA /* JSWebKitCSSFilterRule.h in Headers */,
310603751432819C00ABF4BA /* JSWebKitCSSFilterValue.h in Headers */,
......@@ -24611,6 +24644,7 @@
E4AFD00C0DAF335400F5F55C /* SMILTime.h in Headers */,
E4AFD00E0DAF335500F5F55C /* SMILTimeContainer.h in Headers */,
51ABAE1B103C18FF008C5260 /* SocketStreamError.h in Headers */,
CD54A763180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h in Headers */,
510D4A34103165EE0049EA54 /* SocketStreamErrorBase.h in Headers */,
51ABAE1E103C1913008C5260 /* SocketStreamHandle.h in Headers */,
51D719BE181106E00016DC51 /* IDBCallbacks.h in Headers */,
......@@ -24667,6 +24701,7 @@
1A2E6E5A0CC55213004A2062 /* SQLValue.h in Headers */,
93F1996308245E59001E9ABC /* SSLKeyGenerator.h in Headers */,
BC7FA62D0D1F0EFF00DB22A9 /* StaticNodeList.h in Headers */,
CD8B5A43180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.h in Headers */,
A5AFB350115151A700B045CB /* StepRange.h in Headers */,
1AC2D845171734A100652FC0 /* Storage.h in Headers */,
51BE37E00DAEE00E001085FC /* StorageArea.h in Headers */,
......@@ -26246,6 +26281,7 @@
A7CFB3D10B7ED10A0070C32D /* DragImage.cpp in Sources */,
A7CFB3D50B7ED1180070C32D /* DragImageMac.mm in Sources */,
498770DB1242C535002226BA /* DrawingBuffer.cpp in Sources */,
CDC8B5A6180474F70016E685 /* MediaSourcePrivateAVFObjC.mm in Sources */,
498771531243F9FA002226BA /* DrawingBufferMac.mm in Sources */,
078E091217D14CEE00420AA1 /* UserMediaController.cpp in Sources */,
FD6ED2C7136B8E66003CF072 /* DynamicsCompressor.cpp in Sources */,
......@@ -26281,6 +26317,7 @@
07969DB917D14151007FF842 /* JSRTCPeerConnection.cpp in Sources */,
E0FEF372B27C53EAC1C1FBEE /* EventSource.cpp in Sources */,
E12EDBEA0B308E0B002704B6 /* EventTarget.cpp in Sources */,
CD8B5A42180D149A008B8E65 /* VideoTrackPrivateMediaSourceAVFObjC.cpp in Sources */,
BC60D8F20D2A11E000B9918F /* ExceptionBase.cpp in Sources */,
973DC63F145A9409002842C2 /* ExceptionCodeDescription.cpp in Sources */,
A7CACDB113CE875C00BBBE3F /* ExceptionCodePlaceholder.cpp in Sources */,
......@@ -26379,6 +26416,7 @@
F50664F7157F52DC00AC226F /* FormController.cpp in Sources */,
514C766F0CE923A1007EF3CD /* FormData.cpp in Sources */,
085B92BA0EFDE73D00E6123C /* FormDataBuilder.cpp in Sources */,
CDC8B5AA18047FF10016E685 /* SourceBufferPrivateAVFObjC.mm in Sources */,
A8136D390973A8E700D74463 /* FormDataList.cpp in Sources */,
7EE6846612D26E3800E79415 /* FormDataStreamCFNet.cpp in Sources */,
514C764F0CE9234E007EF3CD /* FormDataStreamMac.mm in Sources */,
......@@ -26799,6 +26837,7 @@
65DF31F909D1CC60000BE325 /* JSElement.cpp in Sources */,
BC2ED5550C6B9BD300920BFF /* JSElementCustom.cpp in Sources */,
65DF322F09D1DDBC000BE325 /* JSEntity.cpp in Sources */,
CD54A762180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp in Sources */,
93F9B7740BA5FDDC00854064 /* JSEntityReference.cpp in Sources */,
2ECF7ADC10162B3800427DE7 /* JSErrorEvent.cpp in Sources */,
F3D461481161D53200CA0D09 /* JSErrorHandler.cpp in Sources */,
......@@ -28088,6 +28127,7 @@
B2227A560D00BF220071B782 /* SVGParserUtilities.cpp in Sources */,
84C6784C1214814700A92902 /* SVGPathBlender.cpp in Sources */,
8476C9EA11DF6A2900555B02 /* SVGPathBuilder.cpp in Sources */,
CDC8B5A2180463470016E685 /* MediaPlayerPrivateMediaSourceAVFObjC.mm in Sources */,
8419D2A8120D92D000141F8F /* SVGPathByteStreamBuilder.cpp in Sources */,
8419D2AC120D92FC00141F8F /* SVGPathByteStreamSource.cpp in Sources */,
B2227A580D00BF220071B782 /* SVGPathElement.cpp in Sources */,
......@@ -33,14 +33,17 @@
namespace WebCore {
class MockSampleBox;
typedef struct opaqueCMSampleBuffer *CMSampleBufferRef;
struct PlatformSample {
enum {
None,
MockSampleBoxType,
CMSampleBufferType,
} type;
union {
MockSampleBox* mockSampleBox;
CMSampleBufferRef cmSampleBuffer;
} sample;
};
......@@ -56,6 +59,7 @@ public:
enum SampleFlags {
None = 0,
IsSync = 1 << 0,
NonDisplaying = 1 << 1,
};
virtual SampleFlags flags() const = 0;
virtual PlatformSample platformSample() = 0;
......
......@@ -57,6 +57,9 @@
#include "MediaPlayerPrivateQTKit.h"
#if USE(AVFOUNDATION)
#include "MediaPlayerPrivateAVFoundationObjC.h"
#if ENABLE(MEDIA_SOURCE)
#include "MediaPlayerPrivateMediaSourceAVFObjC.h"
#endif
#endif
#elif OS(WINCE)
#include "MediaPlayerPrivateWinCE.h"
......@@ -213,6 +216,9 @@ static Vector<MediaPlayerFactory*>& installedMediaEngines(RequeryEngineOptions r
if (Settings::isAVFoundationEnabled()) {
#if PLATFORM(MAC) || PLATFORM(IOS)
MediaPlayerPrivateAVFoundationObjC::registerMediaEngine(addMediaEngine);
#if ENABLE(MEDIA_SOURCE)
MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine(addMediaEngine);
#endif
#elif PLATFORM(WIN)
MediaPlayerPrivateAVFoundationCF::registerMediaEngine(addMediaEngine);
#endif
......
......@@ -43,8 +43,9 @@
#include <runtime/Uint8Array.h>
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
#include <wtf/MediaTime.h>
#include <wtf/Noncopyable.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/text/StringHash.h>
......@@ -56,6 +57,7 @@
#include "PlatformTextTrackMenu.h"
#endif
OBJC_CLASS AVAsset;
OBJC_CLASS AVPlayer;
OBJC_CLASS QTMovie;
......@@ -86,7 +88,8 @@ struct PlatformMedia {
ChromiumMediaPlayerType,
QtMediaPlayerType,
AVFoundationMediaPlayerType,
AVFoundationCFMediaPlayerType
AVFoundationCFMediaPlayerType,
AVFoundationAssetType,
} type;
union {
......@@ -97,6 +100,7 @@ struct PlatformMedia {
MediaPlayerPrivateInterface* qtMediaPlayer;
AVPlayer* avfMediaPlayer;
AVCFPlayer* avcfMediaPlayer;
AVAsset* avfAsset;
} media;
};
......
......@@ -79,7 +79,7 @@ public:
virtual void seek(float) { }
virtual void seekDouble(double time) { seek(time); }
virtual void seekWithTolerance(double time, double, double) { seek(time); }
virtual void seekWithTolerance(double time, double, double) { seekDouble(time); }
virtual bool seeking() const = 0;
......
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* 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.
*/
#include "config.h"
#include "AudioTrackPrivateMediaSourceAVFObjC.h"
#if ENABLE(MEDIA_SOURCE) && ENABLE(VIDEO_TRACK)
#include "AVTrackPrivateAVFObjCImpl.h"
#include "SourceBufferPrivateAVFObjC.h"
namespace WebCore {
AudioTrackPrivateMediaSourceAVFObjC::AudioTrackPrivateMediaSourceAVFObjC(AVAssetTrack* track, SourceBufferPrivateAVFObjC* parent)
: m_impl(std::make_unique<AVTrackPrivateAVFObjCImpl>(track))
, m_parent(parent)
, m_trackID(-1)
, m_enabled(false)
{
resetPropertiesFromTrack();
}
void AudioTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack()
{
m_trackID = m_impl->trackID();
setKind(m_impl->audioKind());
setId(m_impl->id());
setLabel(m_impl->label());
setLanguage(m_impl->language());
}
void AudioTrackPrivateMediaSourceAVFObjC::setAssetTrack(AVAssetTrack *track)
{
m_impl = std::make_unique<AVTrackPrivateAVFObjCImpl>(track);
resetPropertiesFromTrack();
}
AVAssetTrack* AudioTrackPrivateMediaSourceAVFObjC::assetTrack()
{
return m_impl->assetTrack();
}
bool AudioTrackPrivateMediaSourceAVFObjC::enabled() const
{
return m_enabled;
}
void AudioTrackPrivateMediaSourceAVFObjC::setEnabled(bool enabled)
{
if (m_enabled == enabled)
return;
m_enabled = enabled;
m_parent->trackDidChangeEnabled(this);
}
}
#endif
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* 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.
*/
#ifndef AudioTrackPrivateMediaSourceAVFObjC_h
#define AudioTrackPrivateMediaSourceAVFObjC_h
#include "AudioTrackPrivateAVF.h"
#if ENABLE(MEDIA_SOURCE) && ENABLE(VIDEO_TRACK)
OBJC_CLASS AVAssetTrack;
OBJC_CLASS AVPlayerItemTrack;
namespace WebCore {
class AVTrackPrivateAVFObjCImpl;
class SourceBufferPrivateAVFObjC;
class AudioTrackPrivateMediaSourceAVFObjC FINAL : public AudioTrackPrivateAVF {
WTF_MAKE_NONCOPYABLE(AudioTrackPrivateMediaSourceAVFObjC)
public:
static RefPtr<AudioTrackPrivateMediaSourceAVFObjC> create(AVAssetTrack* track, SourceBufferPrivateAVFObjC* parent)
{
return adoptRef(new AudioTrackPrivateMediaSourceAVFObjC(track, parent));
}
virtual bool enabled() const OVERRIDE;
virtual void setEnabled(bool) OVERRIDE;
void setAssetTrack(AVAssetTrack*);
AVAssetTrack* assetTrack();
int trackID() { return m_trackID; }
private:
explicit AudioTrackPrivateMediaSourceAVFObjC(AVAssetTrack*, SourceBufferPrivateAVFObjC* parent);
void resetPropertiesFromTrack();
std::unique_ptr<AVTrackPrivateAVFObjCImpl> m_impl;
SourceBufferPrivateAVFObjC* m_parent;
int m_trackID;
bool m_enabled;
};
}
#endif // ENABLE(MEDIA_SOURCE) && ENABLE(VIDEO_TRACK)
#endif
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* 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
<