Title: [148323] trunk/Source/WebCore
- Revision
- 148323
- Author
- roger_f...@apple.com
- Date
- 2013-04-12 17:33:41 -0700 (Fri, 12 Apr 2013)
Log Message
Update AVFoundationCF code following http://trac.webkit.org/changeset/148291.
https://bugs.webkit.org/show_bug.cgi?id=114548.
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
(WebCore):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
(MediaPlayerPrivateAVFoundationCF):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148322 => 148323)
--- trunk/Source/WebCore/ChangeLog 2013-04-13 00:15:58 UTC (rev 148322)
+++ trunk/Source/WebCore/ChangeLog 2013-04-13 00:33:41 UTC (rev 148323)
@@ -1,3 +1,18 @@
+2013-04-09 Roger Fong <roger_f...@apple.com>
+
+ Update AVFoundationCF code following http://trac.webkit.org/changeset/148291.
+ https://bugs.webkit.org/show_bug.cgi?id=114548.
+
+ Reviewed by Eric Carlson.
+
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+ (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
+ (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
+ (WebCore):
+ (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
+ (MediaPlayerPrivateAVFoundationCF):
+
2013-04-12 Simon Fraser <simon.fra...@apple.com>
Demystify some code in RenderLayer::updateScrollableAreaSet()
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (148322 => 148323)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2013-04-13 00:15:58 UTC (rev 148322)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2013-04-13 00:33:41 UTC (rev 148323)
@@ -3606,6 +3606,7 @@
<ClCompile Include="..\html\canvas\CanvasPathMethods.cpp" />
<ClCompile Include="..\html\parser\HTMLIdentifier.cpp" />
<ClCompile Include="..\html\track\TextTrackCueGeneric.cpp" />
+ <ClCompile Include="..\html\track\TrackListBase.cpp" />
<ClCompile Include="..\html\track\WebVTTElement.cpp" />
<ClCompile Include="..\inspector\TimelineTraceEventProcessor.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
@@ -11186,6 +11187,7 @@
<ClInclude Include="..\ForwardingHeaders\yarr\YarrJIT.h" />
<ClInclude Include="..\html\canvas\CanvasPathMethods.h" />
<ClInclude Include="..\html\track\TextTrackCueGeneric.h" />
+ <ClInclude Include="..\html\track\TrackListBase.h" />
<ClInclude Include="..\html\track\WebVTTElement.h" />
<ClInclude Include="..\inspector\TimelineTraceEventProcessor.h" />
<ClInclude Include="..\Modules\filesystem\AsyncFileWriter.h" />
@@ -13624,4 +13626,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (148322 => 148323)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2013-04-13 00:15:58 UTC (rev 148322)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2013-04-13 00:33:41 UTC (rev 148323)
@@ -2412,9 +2412,6 @@
<ClCompile Include="..\loader\cache\CachedRawResource.cpp">
<Filter>loader\cache</Filter>
</ClCompile>
- <ClCompile Include="..\loader\cache\CachedRawResourceClient.cpp">
- <Filter>loader\cache</Filter>
- </ClCompile>
<ClCompile Include="..\loader\cache\CachedResource.cpp">
<Filter>loader\cache</Filter>
</ClCompile>
@@ -6859,6 +6856,9 @@
<ClCompile Include="..\platform\graphics\cg\SubimageCacheWithTimer.cpp">
<Filter>platform\graphics\cg</Filter>
</ClCompile>
+ <ClCompile Include="..\html\track\TrackListBase.cpp">
+ <Filter>html\track</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\CSSGrammar.h">
@@ -14375,6 +14375,11 @@
<ClInclude Include="..\platform\graphics\cg\SubimageCacheWithTimer.h">
<Filter>platform\graphics\cg</Filter>
</ClInclude>
+ <ClInclude Include="..\loader\cache\CachedRawResourceClient.h" />
+ <ClInclude Include="..\platform\VisitedLinkStrategy.h" />
+ <ClInclude Include="..\html\track\TrackListBase.h">
+ <Filter>html\track</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\css\CSSGrammar.y.in">
@@ -15324,4 +15329,4 @@
<Filter>rendering</Filter>
</CustomBuildStep>
</ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (148322 => 148323)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-04-13 00:15:58 UTC (rev 148322)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-04-13 00:33:41 UTC (rev 148323)
@@ -489,7 +489,7 @@
return 0;
}
-void MediaPlayerPrivateAVFoundationCF::seekToTime(float time)
+void MediaPlayerPrivateAVFoundationCF::seekToTime(double time)
{
if (!m_avfWrapper)
return;
@@ -568,7 +568,31 @@
return timeRanges.release();
}
-float MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable() const
+double MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable() const
+{
+ RetainPtr<CFArrayRef> seekableRanges(AdoptCF, AVCFPlayerItemCopySeekableTimeRanges(avPlayerItem(m_avfWrapper)));
+ if (!seekableRanges)
+ return 0;
+
+ double minTimeSeekable = std::numeric_limits<double>::infinity();
+ bool hasValidRange = false;
+ CFIndex rangeCount = CFArrayGetCount(seekableRanges.get());
+ for (CFIndex i = 0; i < rangeCount; i++) {
+ CFDictionaryRef range = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(seekableRanges.get(), i));
+ CMTime start = CMTimeMakeFromDictionary(static_cast<CFDictionaryRef>(CFDictionaryGetValue(range, CMTimeRangeStartKey())));
+ CMTime duration = CMTimeMakeFromDictionary(static_cast<CFDictionaryRef>(CFDictionaryGetValue(range, CMTimeRangeDurationKey())));
+ if (!timeRangeIsValidAndNotEmpty(start, duration))
+ continue;
+
+ hasValidRange = true;
+ double startOfRange = CMTimeGetSeconds(start);
+ if (minTimeSeekable > startOfRange)
+ minTimeSeekable = startOfRange;
+ }
+ return hasValidRange ? minTimeSeekable : 0;
+}
+
+double MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable() const
{
if (!avPlayerItem(m_avfWrapper))
return 0;
@@ -577,7 +601,7 @@
if (!seekableRanges)
return 0;
- float maxTimeSeekable = 0;
+ double maxTimeSeekable = 0;
CFIndex rangeCount = CFArrayGetCount(seekableRanges.get());
for (CFIndex i = 0; i < rangeCount; i++) {
CFDictionaryRef range = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(seekableRanges.get(), i));
@@ -586,7 +610,7 @@
if (!timeRangeIsValidAndNotEmpty(start, duration))
continue;
- float endOfRange = narrowPrecisionToFloat(CMTimeGetSeconds(CMTimeAdd(start, duration)));
+ double endOfRange = CMTimeGetSeconds(CMTimeAdd(start, duration));
if (maxTimeSeekable < endOfRange)
maxTimeSeekable = endOfRange;
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h (148322 => 148323)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h 2013-04-13 00:15:58 UTC (rev 148322)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h 2013-04-13 00:33:41 UTC (rev 148323)
@@ -74,10 +74,11 @@
virtual void checkPlayability();
virtual void updateRate();
virtual float rate() const;
- virtual void seekToTime(float time);
+ virtual void seekToTime(double time);
virtual unsigned totalBytes() const;
virtual PassRefPtr<TimeRanges> platformBufferedTimeRanges() const;
- virtual float platformMaxTimeSeekable() const;
+ virtual double platformMinTimeSeekable() const;
+ virtual double platformMaxTimeSeekable() const;
virtual float platformDuration() const;
virtual float platformMaxTimeLoaded() const;
virtual void beginLoadingMetadata();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes