videoplayerapp/videoplayerengine/src/videoserviceplay.cpp
author hgs
Fri, 30 Apr 2010 09:52:11 +0300
changeset 37 4eb2df7f7cbe
parent 36 8aed59de29f9
child 24 7d93ee07fb27
permissions -rw-r--r--
201017
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  Implementation of VideoServicePlay
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
36
hgs
parents: 30
diff changeset
    18
// Version : %version: %
30
hgs
parents:
diff changeset
    19
36
hgs
parents: 30
diff changeset
    20
#include "videoservices.h"
30
hgs
parents:
diff changeset
    21
#include "videoserviceplay.h"
hgs
parents:
diff changeset
    22
#include "videoplayerengine.h"
36
hgs
parents: 30
diff changeset
    23
#include "mpxvideo_debug.h"
30
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
36
hgs
parents: 30
diff changeset
    26
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    27
// VideoServicePlay()
hgs
parents: 30
diff changeset
    28
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    29
// 
30
hgs
parents:
diff changeset
    30
VideoServicePlay::VideoServicePlay( VideoServices* parent, QVideoPlayerEngine* engine )
36
hgs
parents: 30
diff changeset
    31
    : XQServiceProvider( QLatin1String("com.nokia.Videos.IVideoView"), parent )
hgs
parents: 30
diff changeset
    32
    , mEngine( engine )
hgs
parents: 30
diff changeset
    33
    , mServiceApp( parent )
30
hgs
parents:
diff changeset
    34
{
36
hgs
parents: 30
diff changeset
    35
    MPX_ENTER_EXIT(_L("VideoServicePlay::VideoServicePlay()"));
30
hgs
parents:
diff changeset
    36
    publishAll();
hgs
parents:
diff changeset
    37
}
hgs
parents:
diff changeset
    38
36
hgs
parents: 30
diff changeset
    39
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    40
// ~VideoServicePlay()
hgs
parents: 30
diff changeset
    41
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    42
// 
30
hgs
parents:
diff changeset
    43
VideoServicePlay::~VideoServicePlay()
hgs
parents:
diff changeset
    44
{
36
hgs
parents: 30
diff changeset
    45
    MPX_DEBUG(_L("VideoServicePlay::~VideoServicePlay()"));
30
hgs
parents:
diff changeset
    46
}
hgs
parents:
diff changeset
    47
36
hgs
parents: 30
diff changeset
    48
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    49
// setEngine()
hgs
parents: 30
diff changeset
    50
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    51
// 
30
hgs
parents:
diff changeset
    52
void VideoServicePlay::setEngine( QVideoPlayerEngine* engine )
hgs
parents:
diff changeset
    53
{
36
hgs
parents: 30
diff changeset
    54
    MPX_DEBUG(_L("VideoServicePlay::setEngine()"));
hgs
parents: 30
diff changeset
    55
    mEngine = engine;
30
hgs
parents:
diff changeset
    56
}
hgs
parents:
diff changeset
    57
36
hgs
parents: 30
diff changeset
    58
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    59
// playMedia()
hgs
parents: 30
diff changeset
    60
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    61
// 
30
hgs
parents:
diff changeset
    62
void VideoServicePlay::playMedia( QString filePath )
hgs
parents:
diff changeset
    63
{
36
hgs
parents: 30
diff changeset
    64
    MPX_ENTER_EXIT(_L("VideoServicePlay::playMedia()"),
hgs
parents: 30
diff changeset
    65
                   _L("filePath = %s"), filePath.data() );  
hgs
parents: 30
diff changeset
    66
                     
hgs
parents: 30
diff changeset
    67
    if ( mEngine )
30
hgs
parents:
diff changeset
    68
    {
36
hgs
parents: 30
diff changeset
    69
    	mServiceApp->setCurrentService( VideoServices::EPlayback );
30
hgs
parents:
diff changeset
    70
    	mEngine->playMedia( filePath );
hgs
parents:
diff changeset
    71
    }
hgs
parents:
diff changeset
    72
}
hgs
parents:
diff changeset
    73
36
hgs
parents: 30
diff changeset
    74
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    75
// playPDLMedia()
hgs
parents: 30
diff changeset
    76
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    77
// 
30
hgs
parents:
diff changeset
    78
void VideoServicePlay::playPDLMedia( QString filePath, int downloadID  )
hgs
parents:
diff changeset
    79
{
36
hgs
parents: 30
diff changeset
    80
    MPX_DEBUG(_L("VideoServicePlay::playPDLMedia()"));
hgs
parents: 30
diff changeset
    81
    Q_UNUSED( filePath );
hgs
parents: 30
diff changeset
    82
    Q_UNUSED( downloadID );
30
hgs
parents:
diff changeset
    83
}
hgs
parents:
diff changeset
    84
36
hgs
parents: 30
diff changeset
    85
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    86
// closePlayer()
hgs
parents: 30
diff changeset
    87
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    88
// 
30
hgs
parents:
diff changeset
    89
void VideoServicePlay::closePlayer()
hgs
parents:
diff changeset
    90
{
36
hgs
parents: 30
diff changeset
    91
    MPX_DEBUG(_L("VideoServicePlay::closePlayer()"));
30
hgs
parents:
diff changeset
    92
}
hgs
parents:
diff changeset
    93