[Title] Set value of m_suspended false after resuming of mediaElement asynchronously.
[Problem] long horizontal video frame is displayed for while during resuming video.
[Cause] height of mediadocument is set 0 before resuming of video yet in calculateIntrinsicSize().
[Solution] Set value of m_suspended false after resuming of mediaElement asynchronously.
Change-Id: I26e0f9fe52d3a73388cae614c1f8f6a34d899650
renderer()->updateFromElement();
#if ENABLE(TIZEN_GSTREAMER_VIDEO)
- if (m_suspended) {
+ // Player will resume asynchronously.
+ // Set m_suspended to false in setSuspended().
+ if (m_suspended)
m_player->resume();
- m_suspended = false;
- }
#endif
}
return true;
#endif
}
+
+void HTMLMediaElement::setSuspended(bool suspended)
+{
+ m_suspended = suspended;
+}
#endif
}
virtual bool willRespondToMouseClickEvents() OVERRIDE;
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ bool suspended() { return m_suspended; }
+#endif
+
protected:
HTMLMediaElement(const QualifiedName&, Document*, bool);
virtual ~HTMLMediaElement();
virtual GraphicsDeviceAdapter* mediaPlayerGraphicsDeviceAdapter(const MediaPlayer*) const OVERRIDE;
#endif
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ virtual void setSuspended(bool);
+#endif
+
void loadTimerFired(Timer<HTMLMediaElement>*);
void progressEventTimerFired(Timer<HTMLMediaElement>*);
void playbackProgressTimerFired(Timer<HTMLMediaElement>*);
virtual bool mediaPlayerIsLooping() const { return false; }
virtual HostWindow* mediaPlayerHostWindow() { return 0; }
virtual IntRect mediaPlayerWindowClipRect() { return IntRect(); }
+
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ virtual void setSuspended(bool) { }
+#endif
+
};
class MediaPlayerSupportsTypeClient {
if (m_suspendTime > 0 && newState == GST_STATE_PAUSED) {
seek(m_suspendTime);
m_suspendTime = 0;
+ m_player->mediaPlayerClient()->setSuspended(false);
}
HTMLMediaElement* element = static_cast<HTMLMediaElement*>(player()->mediaPlayerClient());
if (size == intrinsicSize())
return;
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ // Do not update IntrinsicSize while videoElement is suspended.
+ if (videoElement()->suspended())
+ return;
+#endif
+
setIntrinsicSize(size);
setPreferredLogicalWidthsDirty(true);
setNeedsLayout(true);