examples/sfexamples/oggvorbiscodec/src/OggVorbisUtil/OggUtilBody.h

00001 // OggUtilBody.h
00002 //
00003 // Copyright (c) Symbian Software Ltd 2005-2006.  All rights reserved.
00004 //
00005 
00006 #ifndef OGGUTILBODY_H
00007 #define OGGUTILBODY_H
00008 
00009 #ifdef SYMBIAN_CODEC_FLOAT_POINT
00010         #include "vorbis/codec.h" //main libvorbis header
00011 #else
00012         #include "ivorbiscodec.h" //main tremor header
00013 #endif
00014 
00015 class OggUtil;
00021 NONSHARABLE_CLASS(OggUtil)
00022     {
00023 public:
00024     // from TOggPage to ogg_page:
00025     static void Make_ogg_page(const TOggPage& aSrc, ogg_page& aDest);
00026     // from TOggPacket to ogg_packet:
00027     static void Make_ogg_packet(const TOggPacket& aSrc, ogg_packet& aDst);
00028     // from ogg_page to TOggPage:
00029     static void MakeOggPage(const ogg_page& aSrc, TOggPage& aDest);
00030     // from ogg_packet to TOggPacket:
00031     static void MakeOggPacket(const ogg_packet& aSrc, TOggPacket& aDest);
00032     };
00033 
00039 NONSHARABLE_CLASS(COggPager::CBody) : public CBase
00040     {
00041 friend class COggPager;
00042 private:
00043     CBody();
00044     void ConstructL();
00045     ~CBody();
00046 
00047     void Reset();
00048     TInt GetBuffer(TPtr8& aBuf, TInt aSize);
00049     TInt DataWritten(const TDes8& aBuf);
00050     TInt NextPage(TOggPage& aPage);
00051 private:
00052 #ifdef SYMBIAN_CODEC_FLOAT_POINT
00053         ogg_sync_state iOggSyncState;
00054 #endif
00055     ogg_sync_state* iSyncState;
00056     TPtr8 iBuf;
00057     };
00058 
00064 NONSHARABLE_CLASS(COggStream::CBody) : public CBase
00065     {
00066 friend class COggStream;
00067 private:
00068     CBody();
00069     void ConstructL();
00070     ~CBody();
00071         TInt PageIn(TOggPage& aPage);
00072     TInt PacketOut(TOggPacket& aDst);
00073     void Reset();
00074     TInt GetSerialNo();
00075 private:
00076     TBool iStreamLocked;//used to indicate that the stream is initialized.
00077 #ifdef SYMBIAN_CODEC_FLOAT_POINT
00078         ogg_stream_state iOggStreamState;
00079 #endif
00080     ogg_stream_state* iStreamState;
00081     ogg_page iPage;
00082     ogg_packet iPacket;
00083     };
00084 
00085 #endif
00086 

Generated by  doxygen 1.6.2