Changeset 122187 in webkit
- Timestamp:
- Jul 9, 2012 7:38:21 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122185 r122187 1 2012-07-07 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] cache video dimensions 4 https://bugs.webkit.org/show_bug.cgi?id=90733 5 6 Reviewed by Martin Robinson. 7 8 Invalidate the cached video dimensions whenever the video-sink sink pad caps 9 change and let ::naturalSize() lazily recalculate them. 10 11 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 12 (WebCore::MediaPlayerPrivateGStreamer::naturalSize): 13 (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): 14 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 15 (MediaPlayerPrivateGStreamer): 16 1 17 2012-07-09 Eric Penner <epenner@google.com> 2 18 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r121707 r122187 496 496 return IntSize(); 497 497 498 if (!m_videoSize.isEmpty()) 499 return m_videoSize; 500 498 501 GstCaps* caps = webkitGstGetPadCaps(m_videoSinkPad.get()); 499 502 if (!caps) … … 543 546 544 547 LOG_VERBOSE(Media, "Natural size: %" G_GUINT64_FORMAT "x%" G_GUINT64_FORMAT, width, height); 545 return IntSize(static_cast<int>(width), static_cast<int>(height)); 548 m_videoSize = IntSize(static_cast<int>(width), static_cast<int>(height)); 549 return m_videoSize; 546 550 } 547 551 … … 562 566 563 567 m_hasVideo = videoTracks > 0; 568 569 m_videoSize = IntSize(); 570 564 571 m_player->mediaPlayerClient()->mediaPlayerEngineUpdated(m_player); 565 572 } -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r121053 r122187 195 195 GRefPtr<GstElement> m_webkitAudioSink; 196 196 GRefPtr<GstPad> m_videoSinkPad; 197 mutable IntSize m_videoSize; 197 198 }; 198 199 }
Note: See TracChangeset
for help on using the changeset viewer.