1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
diff -wbBur OpenSceneGraph-2.8.3/include/osg/AudioStream OpenSceneGraph-2.8.3.my/include/osg/AudioStream
--- OpenSceneGraph-2.8.3/include/osg/AudioStream 2010-03-19 09:14:12.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/include/osg/AudioStream 2011-02-01 10:50:20.000000000 +0000
@@ -68,7 +68,7 @@
virtual int audioFrequency() const = 0;
virtual int audioNbChannels() const = 0;
- enum SampleFormat
+ enum XSampleFormat
{
SAMPLE_FORMAT_U8,
SAMPLE_FORMAT_S16,
@@ -76,8 +76,7 @@
SAMPLE_FORMAT_S32,
SAMPLE_FORMAT_F32
};
-
- virtual SampleFormat audioSampleFormat() const = 0;
+ virtual XSampleFormat audioSampleFormat() const = 0;
};
} // namespace
diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp
--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp 2010-03-19 08:48:34.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.cpp 2011-02-01 10:52:42.000000000 +0000
@@ -1,3 +1,10 @@
+#include <stdint.h>
+
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
#include "FFmpegAudioStream.hpp"
@@ -66,7 +71,7 @@
-osg::AudioStream::SampleFormat FFmpegAudioStream::audioSampleFormat() const
+osg::AudioStream::XSampleFormat FFmpegAudioStream::audioSampleFormat() const
{
return m_decoder->audio_decoder().sampleFormat();
}
diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp
--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp 2010-03-19 08:48:36.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegAudioStream.hpp 2011-02-01 10:52:33.000000000 +0000
@@ -23,7 +23,7 @@
int audioFrequency() const;
int audioNbChannels() const;
- osg::AudioStream::SampleFormat audioSampleFormat() const;
+ osg::AudioStream::XSampleFormat audioSampleFormat() const;
double duration() const;
diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp
--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2010-03-19 09:14:34.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.cpp 2011-02-01 10:52:12.000000000 +0000
@@ -80,7 +79,7 @@
m_frequency = m_context->sample_rate;
m_nb_channels = m_context->channels;
- m_sample_format = osg::AudioStream::SampleFormat(m_context->sample_fmt);
+ m_sample_format = osg::AudioStream::XSampleFormat(m_context->sample_fmt);
// Check stream sanity
if (m_context->codec_id == CODEC_ID_NONE)
diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp
--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp 2010-03-19 09:14:18.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegDecoderAudio.hpp 2011-02-01 10:51:34.000000000 +0000
@@ -13,8 +13,7 @@
#include "BoundedMessageQueue.hpp"
-
-
+#include <libavcore/samplefmt.h>
namespace osgFFmpeg {
@@ -45,7 +42,7 @@
bool validContext() const;
int frequency() const;
int nbChannels() const;
- osg::AudioStream::SampleFormat sampleFormat() const;
+ osg::AudioStream::XSampleFormat sampleFormat() const;
private:
@@ -71,7 +68,7 @@
int m_frequency;
int m_nb_channels;
- osg::AudioStream::SampleFormat m_sample_format;
+ osg::AudioStream::XSampleFormat m_sample_format;
SinkPtr m_audio_sink;
@@ -104,7 +101,7 @@
}
-inline osg::AudioStream::SampleFormat FFmpegDecoderAudio::sampleFormat() const
+inline osg::AudioStream::XSampleFormat FFmpegDecoderAudio::sampleFormat() const
{
return m_sample_format;
}
diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp
--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp 2010-03-19 09:14:18.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp 2011-01-31 18:04:48.000000000 +0000
@@ -1,3 +1,10 @@
+#include <stdint.h>
+
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
#include "FFmpegImageStream.hpp"
#include "FFmpegAudioStream.hpp"
diff -wbBur OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
--- OpenSceneGraph-2.8.3/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2010-03-19 09:04:40.000000000 +0000
+++ OpenSceneGraph-2.8.3.my/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp 2011-01-31 17:52:59.000000000 +0000
@@ -1,3 +1,10 @@
+#include <stdint.h>
+
+# if __WORDSIZE == 64
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
|