Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

CascadeAudioCodec.h

Go to the documentation of this file.
00001 //
00002 // CascadeAudioCodec.h - header file for class CascadeAudioCodec
00003 //
00004 // Copyright (c) 2004, Roku, LLC.  All rights reserved.
00005 //
00008 
00009 #ifndef _ROKU_INCLUDE_CASCADE_AV_CASCADEAUDIOCODEC_H
00010 #define _ROKU_INCLUDE_CASCADE_AV_CASCADEAUDIOCODEC_H
00011 
00012 #include <cascade/av/CascadeCodec.h>
00013 
00024 class CascadeAudioCodec : public CascadeCodec, public CascadeStream
00025 {
00026 public:
00027         CascadeAudioCodec();
00031         virtual ~CascadeAudioCodec();
00035 
00036 public: // overrides from CascadeCodec
00037     virtual CascadeStream * GetOutputStream() { return this; };
00045 
00046 public: // overrides from CascadeStream
00047     virtual u64 GetSize()                           { return 0; }
00048     virtual u64 GetPosition()                       { return 0; }
00049     virtual bool SeekToPosition(u64 nPosition)      { return false; }
00050         // even though an audio codec is a stream, generally speaking
00051         // the size is not known a-priori and streams are not seekable
00052         
00053 public:
00054     enum SamplePolarity     { kSigned = 0, kUnsigned = 1 };
00055     enum SampleEndianness   { kLittleEndian = 0, kBigEndian = 1 };
00056     enum SampleOrder        { kLeftRight = 0, kRightLeft = 1 };
00057     
00058     virtual u32 GetSampleRate() = 0;
00059         // returns 0 if unknown
00060     virtual u32 GetNumChannels() = 0;
00061         // returns 0 if unknown
00062     virtual u32 GetBitsPerSample() = 0;
00063         // returns 0 if unknown
00064     virtual u32 GetDurationInMilliseconds() = 0;
00065         // returns 0 if unknown
00066     virtual SamplePolarity GetSamplePolarity() = 0;
00067         // returns the sample polarity, signed or unsigned
00068     virtual SampleEndianness GetSampleEndianness() = 0;
00069         // returns the sample endianness (not relevant with 8 bits per sample)
00070     virtual SampleOrder GetSampleOrder() = 0;
00071         // returns the sample order (only valid for stereo samples)
00072 };
00073 
00074 #endif // #ifndef _ROKU_INCLUDE_CASCADE_AV_CASCADEAUDIOCODEC_H
00075 
00077 //  LOG
00079 //  03-Mar-04   dwoodward       created
00080 //  03-May-04   dwoodward   added polarity, endianness, and order
00081 

Generated on Sun Jul 24 14:27:17 2005 for Cascade Library by  doxygen 1.4.1