javauis/mmapi_qt/audiostreaming/inc/cmmaaudiostreamratecontrol.h
changeset 23 98ccebc37403
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This class implements RateControl for HTTP stream audio player.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMMAAUDIOSTREAMRATECONTROL_H
       
    20 #define CMMAAUDIOSTREAMRATECONTROL_H
       
    21 
       
    22 //  INTERNAL INCLUDES
       
    23 #include "cmmaratecontrol.h" // base class
       
    24 #include "cmmaaudiostreamplayer.h"
       
    25 
       
    26 //  CLASS DECLARATION
       
    27 /**
       
    28 *   This class implements RateControl for http stream audio player.
       
    29 *
       
    30 */
       
    31 NONSHARABLE_CLASS(CMMAAudioStreamRateControl): public CMMARateControl,
       
    32         public MMMAPlayerStateListener
       
    33 {
       
    34 public:
       
    35 
       
    36     static CMMAAudioStreamRateControl* NewL(
       
    37         CMMAAudioStreamPlayer* aPlayer);
       
    38 
       
    39     /**
       
    40      * Destructor.
       
    41      */
       
    42     ~CMMAAudioStreamRateControl();
       
    43 
       
    44 protected:
       
    45 
       
    46     /**
       
    47      * Constructor.
       
    48      */
       
    49     CMMAAudioStreamRateControl(CMMAAudioStreamPlayer* aPlayer);
       
    50 
       
    51     void ConstructL();
       
    52 
       
    53 public: // from MMMAPlayerStateListener
       
    54     virtual void StateChanged(TInt aState);
       
    55 
       
    56 public: // New methods
       
    57     /**
       
    58      * @param aRate Rate to set in "milli-percentage"..
       
    59      * @return Actual rate set.
       
    60      */
       
    61     virtual TInt SetRateL(TInt aRate);
       
    62 
       
    63     /**
       
    64      * @return The current playback rate in "milli-percentage".
       
    65      */
       
    66     virtual TInt RateL();
       
    67 
       
    68 
       
    69 private: // Member data
       
    70 
       
    71     /**
       
    72      * Used to obtain RMMFController reference to stop/start
       
    73      * playback.
       
    74      */
       
    75     CMMAAudioStreamPlayer* iPlayer;
       
    76 
       
    77     /**
       
    78      * Hold current rate value.
       
    79      */
       
    80     TInt iCurrentRate;
       
    81 
       
    82 };
       
    83 
       
    84 #endif // CMMAAUDIOSTREAMRATECONTROL_H