From Tanguy Fautre,

Clean up of the FFmpeg plugin's class API/AudioStream API. 
Implementation of isImageTransparent().
Implementation of Image:g/setPixelAspectRatio()
This commit is contained in:
Robert Osfield
2009-03-11 15:12:46 +00:00
parent 998cfec137
commit b6bffdd02f
11 changed files with 44 additions and 58 deletions

View File

@@ -59,7 +59,6 @@ class OSG_EXPORT AudioStream : public osg::Object
virtual void consumeAudioBuffer(void * const buffer, const size_t size) = 0;
virtual bool audioStream() const = 0;
virtual int audioFrequency() const = 0;
virtual int audioNbChannels() const = 0;

View File

@@ -185,6 +185,9 @@ class OSG_EXPORT Image : public Object
void setPacking(unsigned int packing) { _packing = packing; }
inline unsigned int getPacking() const { return _packing; }
inline void setPixelAspectRatio(float pixelAspectRatio) { _pixelAspectRatio = pixelAspectRatio; }
inline float getPixelAspectRatio() const { return _pixelAspectRatio; }
/** Return the number of bits required for each pixel. */
inline unsigned int getPixelSizeInBits() const { return computePixelSizeInBits(_pixelFormat,_dataType); }
@@ -346,6 +349,7 @@ class OSG_EXPORT Image : public Object
GLenum _pixelFormat;
GLenum _dataType;
unsigned int _packing;
float _pixelAspectRatio;
AllocationMode _allocationMode;
unsigned char* _data;

View File

@@ -78,7 +78,8 @@ class OSG_EXPORT ImageStream : public Image
virtual double getLength() const { return 0.0; }
virtual double getFrameRate() const { return 0.0; }
virtual void setReferenceTime(double) {}
virtual double getReferenceTime() const { return 0.0; }
@@ -88,7 +89,6 @@ class OSG_EXPORT ImageStream : public Image
virtual void setVolume(float) {}
virtual float getVolume() const { return 0.0f; }
typedef std::vector< osg::ref_ptr<osg::AudioStream> > AudioStreams;
void setAudioStreams(const AudioStreams& asl) { _audioStreams = asl; }
AudioStreams& getAudioStreams() { return _audioStreams; }