mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcevideostream.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2005 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCEVIDEOSTREAM_H
       
    20 #define MCEVIDEOSTREAM_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>  		
       
    24 #include "mcemediastream.h"
       
    25 
       
    26 // CONSTANTS
       
    27 const TMceMediaType KMceVideo = 2;
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CMceVideoCodec;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * Class for representing unidirectional video stream.
       
    36 *
       
    37 * It defines the used video codecs for the stream.
       
    38 * In order to be complete structure, at least one codec is required.
       
    39 *
       
    40 * @lib mceclient.lib
       
    41 */
       
    42 class CMceVideoStream : public CMceMediaStream
       
    43 	{
       
    44 	public: // Constructors and destructor
       
    45 
       
    46 	    /**
       
    47 	    * Two-phased constructor.
       
    48 	    */
       
    49 		IMPORT_C static CMceVideoStream* NewL();
       
    50 	   
       
    51 	    /**
       
    52 	    * Two-phased constructor.
       
    53 	    */
       
    54 		IMPORT_C static CMceVideoStream* NewLC();
       
    55 		
       
    56 	    /**
       
    57 	    * Destructor.
       
    58 	    */
       
    59 		IMPORT_C ~CMceVideoStream();
       
    60 
       
    61 	public: // Functions
       
    62 
       
    63 	    /**
       
    64 	    * Returns the codecs available to the session.
       
    65 	    * For CMceOutSession, array contains all codecs supported by
       
    66 	    * terminal in default. For CMceInSession, array contains codecs
       
    67 	    * that were offered by remote terminal, and supported by local terminal.
       
    68 	    * Codecs are in preference order in the array. 
       
    69 	    * Codec in the first element of the array has highest preference.
       
    70 	    * Adding, removing or replacing a codec or changing the preference
       
    71 	    * of a codec causes the returned array to be in invalid state.
       
    72 	    * @return codecs available for the session
       
    73 	    */
       
    74 		IMPORT_C const RPointerArray<CMceVideoCodec>& Codecs();
       
    75 
       
    76         /**
       
    77 	    * Adds codec to the stream. The codec contains preference value
       
    78 	    * which will define its preference when added to the stream.
       
    79 	    * Preference of codecs with the same preference value is determined
       
    80 	    * by order they were added to the stream. In case of bound streams,
       
    81 	    * codec is also automatically added to the opposite direction stream.
       
    82 	    * After adding a codec an array of codecs received with a call
       
    83         * to Codecs() is not valid. 
       
    84 	    * @param aCodec codec added to the stream; ownership is transferred
       
    85 	    */
       
    86 		IMPORT_C void AddCodecL( CMceVideoCodec* aCodec );
       
    87 
       
    88 	    /**
       
    89 	    * Removes codec from the stream. In case of bound streams, codec is
       
    90 	    * also automatically removed from the opposite direction stream.
       
    91 	    * After removing a codec an array of codecs previously received with 
       
    92 	    * a call to Codecs() is not valid. 
       
    93 	    * @param aCodec codec removed from stream
       
    94 	    */
       
    95 		IMPORT_C void RemoveCodecL( CMceVideoCodec& aCodec );
       
    96 		
       
    97 		/**
       
    98 	    * Replaces codecs of the stream. Preference values of codecs will define
       
    99 	    * the preference order. In case of bound streams, codecs are
       
   100 	    * also automatically added to the opposite direction stream.
       
   101 	    * After replacing codecs an array of codecs received with a call
       
   102         * to Codecs() is not valid. 
       
   103 	    * @param aCodecs array of codecs which will replace existing codecs; 
       
   104 	    *        ownership is transferred
       
   105 	    */
       
   106 		IMPORT_C void ReplaceCodecsL( RPointerArray<CMceVideoCodec>* aCodecs );
       
   107 
       
   108 	    /**
       
   109 	    * Gets supported video codecs of the current stream configuration.
       
   110 	    * Supported codecs for this video stream is affected by attached
       
   111 	    * sinks and sources.
       
   112 	    * @return supported video codecs of the current stream configuration
       
   113 	    */
       
   114 	    IMPORT_C const RPointerArray<const CMceVideoCodec>& 
       
   115 	                    SupportedVideoCodecs() const;	
       
   116 	                    
       
   117 	    
       
   118 	public: // From CMceMediaStream
       
   119 		
       
   120 	    /**
       
   121 	    * Initializes the stream. 
       
   122 	    * @param aParent the parent
       
   123 	    */
       
   124 	    void InitializeL( CMceSession& aParent );
       
   125 
       
   126 	    /**
       
   127 	    * Initializes the stream.
       
   128 	    * @param aManager the manager; ownership is not transferred
       
   129 	    */
       
   130 	   void InitializeL( CMceManager* aManager );
       
   131 	   
       
   132 	
       
   133 	protected: // From CMceMediaStream
       
   134 	
       
   135 	    /**
       
   136 	    * Determine whether current combination of source and sinks
       
   137 	    * is allowed for spesific stream type.
       
   138 	    * @return ETrue is combination is allowed; otherwise EFalse
       
   139 	    */
       
   140 	    virtual TBool IsAllowedCombination();	
       
   141 
       
   142 	private:
       
   143 
       
   144 	    /**
       
   145 	    * C++ default constructor.
       
   146 	    */
       
   147 		CMceVideoStream();
       
   148 
       
   149 	    /**
       
   150 	    * Second-phase constructor.
       
   151 	    */
       
   152 		void ConstructL();
       
   153 	    		
       
   154 
       
   155 	private: // Owned data
       
   156 
       
   157 	    /**
       
   158 	    * Codecs.
       
   159 	    */
       
   160 		RPointerArray<CMceVideoCodec> iCodecs;
       
   161 
       
   162         /**
       
   163 	    * Supported video codecs.
       
   164 	    */
       
   165 	    RPointerArray<const CMceVideoCodec> iSupportedVideoCodecs;
       
   166 
       
   167     private: // Reserved for future use
       
   168     
       
   169         TAny* iReserved;       
       
   170 
       
   171 
       
   172     public: // Stub data	
       
   173     
       
   174 	};
       
   175 
       
   176 #endif