1.1 --- a/epoc32/include/mmf/common/mmfutilities.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mmf/common/mmfutilities.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,73 @@
1.4 -mmfutilities.inl
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// include\mmf\common\mmfutilities.inl
1.19 +//
1.20 +//
1.21 +
1.22 +
1.23 +
1.24 +/**
1.25 +
1.26 + Constructs the class with the supplied arguments.
1.27 +
1.28 + This constructor is used when there are multiple streams of the same media type on the same
1.29 + MDataSource.
1.30 +
1.31 + @param aMediaType
1.32 + The media type (video, audio etc.).
1.33 + @param aStreamId
1.34 + Identifies a specific stream when there are multiple streams of the same media type on
1.35 + the same MDataSource.
1.36 +*/
1.37 +inline TMediaId::TMediaId(TUid aMediaType, TUint aStreamId) : iMediaType(aMediaType), iStreamId(aStreamId), iReserved1(0), iReserved2(0), iReserved3(0)
1.38 + {
1.39 + }
1.40 +
1.41 +/**
1.42 +Constructs the class with the supplied argument.
1.43 +
1.44 +This constructor is used when there is a single stream of the same media type on the same
1.45 +MDataSource.
1.46 +
1.47 +@param aMediaType
1.48 + The media type (video, audio etc.).
1.49 +*/
1.50 +inline TMediaId::TMediaId(TUid aMediaType) : iMediaType(aMediaType), iStreamId(0), iReserved1(0), iReserved2(0), iReserved3(0)
1.51 + {
1.52 + }
1.53 +
1.54 +/**
1.55 +Default constructor.
1.56 +*/
1.57 +inline TMediaId::TMediaId() : iMediaType(KNullUid), iStreamId(0), iReserved1(0), iReserved2(0), iReserved3(0)
1.58 + {
1.59 + }
1.60 +
1.61 +/**
1.62 +Unpacks the FourCC code in little-endian format into the space provided by the argument.
1.63 +
1.64 +The argument must be a pointer to a buffer of 4 bytes or greater.
1.65 +
1.66 +@param aDes
1.67 + A buffer to hold the unpacked FourCC code.
1.68 +*/
1.69 +inline void TFourCC::FourCC( TPtr8* aDes ) const
1.70 + {
1.71 + TUint8 char1 = TUint8( iFourCC ) ;
1.72 + TUint8 char2 = TUint8( iFourCC >> 8 ) ;
1.73 + TUint8 char3 = TUint8( iFourCC >> 16 ) ;
1.74 + TUint8 char4 = TUint8( iFourCC >> 24 ) ;
1.75 +
1.76 + aDes->Format( _L8("%1c%1c%1c%1c"), char1, char2, char3, char4 ) ;
1.77 + }