examples/SFExamples/oggvorbiscodec94/inc/VorbisInfo.h

00001 // VorbisInfo.h
00002 //
00003 // Copyright (c) Symbian Software Ltd 2005-2006.  All rights reserved.
00004 //
00005 
00006 
00007 #ifndef VORBISINFO_H
00008 #define VORBISINFO_H
00009 
00010 class CVorbisComment;  //declared here
00016 NONSHARABLE_CLASS(CVorbisComment) : public CBase
00017     {
00018 public:
00019     // construct from a name and value
00020     static CVorbisComment* NewL(TDesC& aName, TDesC& aValue);
00021     // construct from 8-bit string of the form NAME=value
00022     static CVorbisComment* NewL(char* aComment, int aLength);
00023 
00024     ~CVorbisComment();
00025     
00026     IMPORT_C TDesC& Name();
00027     IMPORT_C TDesC& Value();
00028 private:
00029     CVorbisComment();
00030     void ConstructL(TDesC& aName, TDesC& aValue);
00031     void ConstructL(char* aComment, int aLength);
00032 private:
00033     HBufC* iName;
00034     HBufC* iValue;
00035     };
00036 
00037 class CVorbisInfo;
00043 NONSHARABLE_CLASS(CVorbisInfo) : public CBase
00044     {
00045 public:
00046     IMPORT_C static CVorbisInfo* NewL();
00047     
00048     // initialise the info from the first 3 packets in an ogg vorbis file - used during playing
00049     IMPORT_C void InitializeL(const TOggPacket& aPckt1, 
00050                               const TOggPacket& aPckt2, 
00051                               const TOggPacket& aPckt3);
00052     
00053     // initialise the vorbis info from three packets, one at a time - used during playing
00054     IMPORT_C void InitializeL(const TOggPacket& aNextPacket);
00055     //initialize vorbis info with the samplerate, bitrate and number of channels - used during recording
00056     IMPORT_C void InitializeL(TUint aSampleRate, TUint aBitRate, TUint aNumChannels);
00057     IMPORT_C TInt SampleRate();
00058     IMPORT_C TInt Channels();
00059     
00060     IMPORT_C TDesC& Vendor();
00061     IMPORT_C TInt Comments();
00062     IMPORT_C CVorbisComment& GetComment(TInt aIndex);
00063     
00064     IMPORT_C TInt BitRateNominal();
00065     IMPORT_C TInt BitRateUpper();
00066     IMPORT_C TInt BitRateLower();
00067         IMPORT_C void SetSampleRate(TUint aSampleRate);
00068         IMPORT_C void SetBitRate(TUint aBitRate);
00069         IMPORT_C void SetChannels(TUint aChannels);
00070     ~CVorbisInfo();
00071 private:
00072     CVorbisInfo();
00073     void ConstructL();
00074     
00075 private:
00076     class CBody;
00077     CBody* iBody;
00078     };
00079     
00080 #endif

Generated by  doxygen 1.6.2