15ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen/* 25ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * Copyright (C) 2010 Igalia S.L 35ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * Copyright (C) 2010 Samsung Electronics 45ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * 55ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * This library is free software; you can redistribute it and/or 65ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * modify it under the terms of the GNU Library General Public 75ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * License as published by the Free Software Foundation; either 85ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * version 2 of the License, or (at your option) any later version. 95ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * 105ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * This library is distributed in the hope that it will be useful, 115ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * but WITHOUT ANY WARRANTY; without even the implied warranty of 125ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 135ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * Library General Public License for more details. 145ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * 155ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * You should have received a copy of the GNU Library General Public License 165ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * along with this library; see the file COPYING.LIB. If not, write to 175ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 185ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen * Boston, MA 02110-1301, USA. 195ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen */ 205ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 215ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#include "config.h" 225ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 235ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#if ENABLE(VIDEO) 245ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 255ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#include "FullscreenVideoControllerEfl.h" 265ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 275ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#include "MediaPlayer.h" 285ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#include "NotImplemented.h" 295ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 305ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#include <gst/gst.h> 315ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 325ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenusing namespace std; 335ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenusing namespace WebCore; 345ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 355ddde30071f639962dd557c453f2ad01f8f0fd00Kristian MonsenFullscreenVideoController::FullscreenVideoController() 365ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen : m_hudTimeoutId(0) 375ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen , m_progressBarUpdateId(0) 385ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen , m_seekLock(false) 395ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen , m_window(0) 405ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen , m_hudWindow(0) 415ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 425ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 435ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 445ddde30071f639962dd557c453f2ad01f8f0fd00Kristian MonsenFullscreenVideoController::~FullscreenVideoController() 455ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 465ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen exitFullscreen(); 475ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 485ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 495ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement) 505ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 515ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen if (mediaElement == m_mediaElement) 525ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return; 535ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 545ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen m_mediaElement = mediaElement; 555ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen if (!m_mediaElement) { 565ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen // Can't do full-screen, just get out 575ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen exitFullscreen(); 585ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen } 595ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 605ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 615ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::showHud(bool autoHide) 625ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 635ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 645ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 655ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 665ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::hideHud() 675ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 685ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 695ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 705ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 715ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::enterFullscreen() 725ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 735ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 745ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 755ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 765ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::updateHudPosition() 775ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 785ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 795ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 805ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 815ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::exitOnUserRequest() 825ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 835ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 845ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 855ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 865ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::exitFullscreen() 875ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 885ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 895ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 905ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 915ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenbool FullscreenVideoController::canPlay() const 925ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 935ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 94a94275402997c11dd2e778633dacf4b7e630a35dBen Murdoch return false; 955ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 965ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 975ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::play() 985ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 995ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1005ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1015ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1025ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::pause() 1035ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1045ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1055ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1065ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1075ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::playStateChanged() 1085ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1095ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1105ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1115ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1125ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::togglePlay() 1135ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1145ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1155ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1165ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1175ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenfloat FullscreenVideoController::volume() const 1185ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1195ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1205ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return 0; 1215ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1225ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1235ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenbool FullscreenVideoController::muted() const 1245ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1255ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1265ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return false; 1275ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1285ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1295ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::setVolume(float volume) 1305ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1315ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1325ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1335ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1345ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::volumeChanged() 1355ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1365ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1375ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1385ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1395ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::muteChanged() 1405ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1415ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1425ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1435ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1445ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenfloat FullscreenVideoController::currentTime() const 1455ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1465ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1475ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return 0; 1485ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1495ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1505ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::setCurrentTime(float value) 1515ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1525ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1535ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1545ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1555ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenfloat FullscreenVideoController::duration() const 1565ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1575ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1585ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return 0; 1595ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1605ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1615ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenfloat FullscreenVideoController::percentLoaded() const 1625ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1635ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1645ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return 0; 1655ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1665ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1675ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::beginSeek() 1685ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1695ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1705ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1715ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1725ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::doSeek() 1735ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1745ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1755ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1765ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1775ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::endSeek() 1785ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1795ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1805ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1815ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1825ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenbool FullscreenVideoController::updateHudProgressBar() 1835ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1845ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1855ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen return false; 1865ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1875ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1885ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsenvoid FullscreenVideoController::createHud() 1895ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen{ 1905ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen notImplemented(); 1915ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen} 1925ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen 1935ddde30071f639962dd557c453f2ad01f8f0fd00Kristian Monsen#endif 194