#include "TizenExtensibleAPI.h"
#endif
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+#include <power.h>
+#endif
+
using namespace std;
namespace WebCore {
HTMLElement::insertedInto(insertionPoint);
if (insertionPoint->inDocument() && !getAttribute(srcAttr).isEmpty() && m_networkState == NETWORK_EMPTY)
scheduleLoad(MediaResource);
+
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ resume();
+#endif
configureMediaControls();
return InsertionDone;
}
LOG(Media, "HTMLMediaElement::removedFromDocument");
configureMediaControls();
if (m_networkState > NETWORK_EMPTY)
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ suspend(PageWillBeSuspended);
+#else
pause();
+#endif
if (m_isFullscreen)
exitFullscreen();
}
if (!autoplay())
m_player->setPreload(m_preload);
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ else {
+ if (isVideo())
+ power_lock_state(POWER_STATE_NORMAL, 0);
+ }
+#endif
m_player->setPreservesPitch(m_webkitPreservesPitch);
#if !ENABLE(TIZEN_GSTREAMER_AUDIO)
// 6 - Abort the overall resource selection algorithm.
m_currentSourceNode = 0;
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ if (isVideo())
+ power_unlock_state(POWER_STATE_NORMAL);
+#endif
}
void HTMLMediaElement::cancelPendingEventsAndCallbacks()
if (document()->page() && document()->page()->settings()->diagnosticLoggingEnabled())
document()->page()->chrome()->client()->logDiagnosticMessage(DiagnosticLoggingKeys::mediaLoadingFailedKey(), stringForNetworkState(error), DiagnosticLoggingKeys::failKey());
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ if (isVideo())
+ power_unlock_state(POWER_STATE_NORMAL);
+#endif
}
void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
return;
}
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ if (isVideo())
+ power_lock_state(POWER_STATE_NORMAL, 0);
+#endif
playInternal();
}
if (userGestureRequiredForRateChange() && !ScriptController::processingUserGesture())
return;
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ if (isVideo())
+ power_unlock_state(POWER_STATE_NORMAL);
+#endif
pauseInternal();
}
stopPeriodicTimers();
cancelPendingEventsAndCallbacks();
+#if ENABLE(TIZEN_GSTREAMER_VIDEO)
+ if (isVideo())
+ power_unlock_state(POWER_STATE_NORMAL);
+#endif
}
void HTMLMediaElement::suspend(ReasonForSuspension why)
if (!m_player)
return false;
- if (isVideo())
+ if (isVideo() || hasVideo())
return true;
#if ENABLE(TIZEN_EXTENSIBLE_API)