Changeset 246489 in webkit
- Timestamp:
- Jun 16, 2019, 6:38:51 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/MediaTime.h (modified) (1 diff)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/MediaPlayer.h (modified) (1 diff)
-
WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r246395 r246489 1 2019-06-16 Eric Carlson <eric.carlson@apple.com> 2 3 [MediaStream] Avoid roundoff error when setting AVCapture min/max frame rate 4 https://bugs.webkit.org/show_bug.cgi?id=198875 5 <rdar://problem/51768374> 6 7 Reviewed by Youenn Fablet. 8 9 * wtf/MediaTime.h: 10 (WTF::LogArgument<MediaTime>::toString): 11 (WTF::LogArgument<MediaTimeRange>::toString): 12 1 13 2019-06-12 Antoine Quint <graouts@apple.com> 2 14 -
trunk/Source/WTF/wtf/MediaTime.h
r241148 r246489 175 175 } 176 176 177 template<typename Type> 178 struct LogArgument; 179 180 template <> 181 struct LogArgument<MediaTime> { 182 static String toString(const MediaTime& time) 183 { 184 return time.toJSONString(); 185 } 186 }; 187 188 template <> 189 struct LogArgument<MediaTimeRange> { 190 static String toString(const MediaTimeRange& range) 191 { 192 return range.toJSONString(); 193 } 194 }; 195 177 196 } 178 197 -
trunk/Source/WebCore/ChangeLog
r246488 r246489 1 2019-06-16 Eric Carlson <eric.carlson@apple.com> 2 3 [MediaStream] Avoid roundoff error when setting AVCapture min/max frame rate 4 https://bugs.webkit.org/show_bug.cgi?id=198875 5 <rdar://problem/51768374> 6 7 Reviewed by Youenn Fablet. 8 9 * platform/graphics/MediaPlayer.h: 10 (WTF::LogArgument<MediaTime>::toString): Deleted, moved to MediaTime.h. 11 (WTF::LogArgument<MediaTimeRange>::toString): Deleted, moved to MediaTime.h. 12 13 * platform/mediastream/mac/AVVideoCaptureSource.mm: 14 (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate): Avoid roundoff error. 15 1 16 2019-06-16 Simon Fraser <simon.fraser@apple.com> 2 17 -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r245039 r246489 633 633 } // namespace WebCore 634 634 635 namespace WTF {636 637 template<typename Type>638 struct LogArgument;639 640 template <>641 struct LogArgument<MediaTime> {642 static String toString(const MediaTime& time)643 {644 return time.toJSONString();645 }646 };647 648 template <>649 struct LogArgument<MediaTimeRange> {650 static String toString(const MediaTimeRange& range)651 {652 return range.toJSONString();653 }654 };655 656 }657 658 635 #endif // ENABLE(VIDEO) -
trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
r245948 r246489 328 328 m_currentFrameRate = clampTo(m_currentFrameRate, frameRateRange.minFrameRate, frameRateRange.maxFrameRate); 329 329 330 ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", m_currentFrameRate); 331 [device() setActiveVideoMinFrameDuration: CMTimeMake(1, m_currentFrameRate)]; 332 [device() setActiveVideoMaxFrameDuration: CMTimeMake(1, m_currentFrameRate)]; 330 auto frameDuration = CMTimeMake(1, m_currentFrameRate); 331 if (CMTimeCompare(frameDuration, frameRateRange.minFrameDuration) < 0) 332 frameDuration = frameRateRange.minFrameDuration; 333 else if (CMTimeCompare(frameDuration, frameRateRange.maxFrameDuration) > 0) 334 frameDuration = frameRateRange.maxFrameDuration; 335 336 ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", m_currentFrameRate, ", duration ", PAL::toMediaTime(frameDuration)); 337 338 [device() setActiveVideoMinFrameDuration: frameDuration]; 339 [device() setActiveVideoMaxFrameDuration: frameDuration]; 333 340 } else 334 341 ERROR_LOG_IF(loggerPtr(), LOGIDENTIFIER, "cannot find proper frame rate range for the selected preset\n");
Note:
See TracChangeset
for help on using the changeset viewer.