videoplayerapp/videoplayerengine/src/videoserviceplay.cpp
author hgs
Thu, 08 Jul 2010 13:05:19 +0300
changeset 44 518105d52e45
parent 38 ff53afa8ad05
permissions -rw-r--r--
201027
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
44
hgs
parents: 38
diff changeset
    18
// Version : %version: da1mmcf#6 %
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
// 
38
hgs
parents: 36
diff changeset
    30
VideoServicePlay::VideoServicePlay( VideoServices* parent, 
44
hgs
parents: 38
diff changeset
    31
                                    VideoPlayerEngine* engine, 
38
hgs
parents: 36
diff changeset
    32
                                    QLatin1String service )
hgs
parents: 36
diff changeset
    33
    : XQServiceProvider( service, parent )
36
hgs
parents: 30
diff changeset
    34
    , mEngine( engine )
hgs
parents: 30
diff changeset
    35
    , mServiceApp( parent )
30
hgs
parents:
diff changeset
    36
{
36
hgs
parents: 30
diff changeset
    37
    MPX_ENTER_EXIT(_L("VideoServicePlay::VideoServicePlay()"));
30
hgs
parents:
diff changeset
    38
    publishAll();
hgs
parents:
diff changeset
    39
}
hgs
parents:
diff changeset
    40
36
hgs
parents: 30
diff changeset
    41
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    42
// ~VideoServicePlay()
hgs
parents: 30
diff changeset
    43
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    44
// 
30
hgs
parents:
diff changeset
    45
VideoServicePlay::~VideoServicePlay()
hgs
parents:
diff changeset
    46
{
36
hgs
parents: 30
diff changeset
    47
    MPX_DEBUG(_L("VideoServicePlay::~VideoServicePlay()"));
30
hgs
parents:
diff changeset
    48
}
hgs
parents:
diff changeset
    49
36
hgs
parents: 30
diff changeset
    50
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    51
// setEngine()
hgs
parents: 30
diff changeset
    52
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    53
// 
44
hgs
parents: 38
diff changeset
    54
void VideoServicePlay::setEngine( VideoPlayerEngine* engine )
30
hgs
parents:
diff changeset
    55
{
36
hgs
parents: 30
diff changeset
    56
    MPX_DEBUG(_L("VideoServicePlay::setEngine()"));
hgs
parents: 30
diff changeset
    57
    mEngine = engine;
30
hgs
parents:
diff changeset
    58
}
hgs
parents:
diff changeset
    59
36
hgs
parents: 30
diff changeset
    60
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    61
// playMedia()
hgs
parents: 30
diff changeset
    62
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    63
// 
30
hgs
parents:
diff changeset
    64
void VideoServicePlay::playMedia( QString filePath )
hgs
parents:
diff changeset
    65
{
36
hgs
parents: 30
diff changeset
    66
    MPX_ENTER_EXIT(_L("VideoServicePlay::playMedia()"),
hgs
parents: 30
diff changeset
    67
                   _L("filePath = %s"), filePath.data() );  
hgs
parents: 30
diff changeset
    68
                     
hgs
parents: 30
diff changeset
    69
    if ( mEngine )
30
hgs
parents:
diff changeset
    70
    {
36
hgs
parents: 30
diff changeset
    71
    	mServiceApp->setCurrentService( VideoServices::EPlayback );
30
hgs
parents:
diff changeset
    72
    	mEngine->playMedia( filePath );
hgs
parents:
diff changeset
    73
    }
hgs
parents:
diff changeset
    74
}
hgs
parents:
diff changeset
    75
36
hgs
parents: 30
diff changeset
    76
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    77
// playPDLMedia()
hgs
parents: 30
diff changeset
    78
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    79
// 
30
hgs
parents:
diff changeset
    80
void VideoServicePlay::playPDLMedia( QString filePath, int downloadID  )
hgs
parents:
diff changeset
    81
{
36
hgs
parents: 30
diff changeset
    82
    MPX_DEBUG(_L("VideoServicePlay::playPDLMedia()"));
hgs
parents: 30
diff changeset
    83
    Q_UNUSED( filePath );
hgs
parents: 30
diff changeset
    84
    Q_UNUSED( downloadID );
30
hgs
parents:
diff changeset
    85
}
hgs
parents:
diff changeset
    86
36
hgs
parents: 30
diff changeset
    87
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    88
// closePlayer()
hgs
parents: 30
diff changeset
    89
// -------------------------------------------------------------------------------------------------
hgs
parents: 30
diff changeset
    90
// 
30
hgs
parents:
diff changeset
    91
void VideoServicePlay::closePlayer()
hgs
parents:
diff changeset
    92
{
36
hgs
parents: 30
diff changeset
    93
    MPX_DEBUG(_L("VideoServicePlay::closePlayer()"));
30
hgs
parents:
diff changeset
    94
}
hgs
parents:
diff changeset
    95