sys/osxaudio/: Fix the build on macosx.

Original commit message from CVS:
* sys/osxaudio/gstosxaudiosink.c:
(gst_osx_audio_sink_select_device):
* sys/osxaudio/gstosxaudiosrc.c:
(gst_osx_audio_src_create_ringbuffer),
(gst_osx_audio_src_select_device):
* sys/osxaudio/gstosxringbuffer.c: (gst_osx_ring_buffer_acquire):
Fix the build on macosx.
This commit is contained in:
Edward Hervey 2008-08-27 16:12:39 +00:00
parent 2664bb269e
commit d92f63d3ab
4 changed files with 26 additions and 14 deletions

View file

@ -1,3 +1,13 @@
2008-08-27 Edward Hervey <edward.hervey@collabora.co.uk>
* sys/osxaudio/gstosxaudiosink.c:
(gst_osx_audio_sink_select_device):
* sys/osxaudio/gstosxaudiosrc.c:
(gst_osx_audio_src_create_ringbuffer),
(gst_osx_audio_src_select_device):
* sys/osxaudio/gstosxringbuffer.c: (gst_osx_ring_buffer_acquire):
Fix the build on macosx.
2008-08-27 Tim-Philipp Müller <tim.muller at collabora co uk> 2008-08-27 Tim-Philipp Müller <tim.muller at collabora co uk>
* gst/icydemux/gsticydemux.c: * gst/icydemux/gsticydemux.c:

View file

@ -425,7 +425,8 @@ gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink)
GST_DEBUG_OBJECT (osxsink, GST_DEBUG_OBJECT (osxsink,
"Getting available streamids from %d (%d bytes)", "Getting available streamids from %d (%d bytes)",
(int) (propertySize / sizeof (AudioStreamID)), propertySize); (int) (propertySize / sizeof (AudioStreamID)),
(unsigned int) propertySize);
streams = g_malloc (propertySize); streams = g_malloc (propertySize);
status = AudioDeviceGetProperty (osxsink->device_id, 0, /* Master channel */ status = AudioDeviceGetProperty (osxsink->device_id, 0, /* Master channel */
FALSE, /* isInput */ FALSE, /* isInput */
@ -439,7 +440,8 @@ gst_osx_audio_sink_select_device (GstOsxAudioSink * osxsink)
} }
GST_DEBUG_OBJECT (osxsink, "Getting streamid from %d (%d bytes)", GST_DEBUG_OBJECT (osxsink, "Getting streamid from %d (%d bytes)",
(int) (propertySize / sizeof (AudioStreamID)), propertySize); (int) (propertySize / sizeof (AudioStreamID)),
(unsigned int) propertySize);
if (propertySize >= sizeof (AudioStreamID)) { if (propertySize >= sizeof (AudioStreamID)) {
osxsink->stream_id = streams[0]; osxsink->stream_id = streams[0];

View file

@ -227,8 +227,6 @@ static GstRingBuffer *
gst_osx_audio_src_create_ringbuffer (GstBaseAudioSrc * src) gst_osx_audio_src_create_ringbuffer (GstBaseAudioSrc * src)
{ {
GstOsxAudioSrc *osxsrc; GstOsxAudioSrc *osxsrc;
OSStatus status;
UInt32 propertySize;
GstOsxRingBuffer *ringbuffer; GstOsxRingBuffer *ringbuffer;
osxsrc = GST_OSX_AUDIO_SRC (src); osxsrc = GST_OSX_AUDIO_SRC (src);
@ -327,7 +325,8 @@ gst_osx_audio_src_select_device (GstOsxAudioSrc * osxsrc)
GST_DEBUG_OBJECT (osxsrc, GST_DEBUG_OBJECT (osxsrc,
"Getting available streamids from %d (%d bytes)", "Getting available streamids from %d (%d bytes)",
(int) (propertySize / sizeof (AudioStreamID)), propertySize); (int) (propertySize / sizeof (AudioStreamID)),
(unsigned int) propertySize);
streams = g_malloc (propertySize); streams = g_malloc (propertySize);
status = AudioDeviceGetProperty (osxsrc->device_id, 0, /* Master channel */ status = AudioDeviceGetProperty (osxsrc->device_id, 0, /* Master channel */
FALSE, /* isInput */ FALSE, /* isInput */
@ -341,7 +340,8 @@ gst_osx_audio_src_select_device (GstOsxAudioSrc * osxsrc)
} }
GST_DEBUG_OBJECT (osxsrc, "Getting streamid from %d (%d bytes)", GST_DEBUG_OBJECT (osxsrc, "Getting streamid from %d (%d bytes)",
(int) (propertySize / sizeof (AudioStreamID)), propertySize); (int) (propertySize / sizeof (AudioStreamID)),
(unsigned int) propertySize);
if (propertySize >= sizeof (AudioStreamID)) { if (propertySize >= sizeof (AudioStreamID)) {
osxsrc->stream_id = streams[0]; osxsrc->stream_id = streams[0];

View file

@ -172,7 +172,6 @@ gst_osx_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
/* Configure the output stream and allocate ringbuffer memory */ /* Configure the output stream and allocate ringbuffer memory */
GstOsxRingBuffer *osxbuf; GstOsxRingBuffer *osxbuf;
AudioStreamBasicDescription asbd; AudioStreamBasicDescription asbd;
AudioStreamBasicDescription asbd2;
OSStatus status; OSStatus status;
UInt32 buffer_len; UInt32 buffer_len;
UInt32 propertySize; UInt32 propertySize;
@ -190,14 +189,15 @@ gst_osx_ring_buffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
asbd.mFramesPerPacket = 1; asbd.mFramesPerPacket = 1;
asbd.mReserved = 0; asbd.mReserved = 0;
GST_LOG_OBJECT (osxbuf, "Format: %x, %f, %d, %x, %d, %d, %d, %d, %d", GST_LOG_OBJECT (osxbuf, "Format: %x, %f, %u, %x, %d, %d, %d, %d, %d",
asbd.mFormatID, (unsigned int) asbd.mFormatID,
asbd.mSampleRate, asbd.mSampleRate,
asbd.mChannelsPerFrame, (unsigned int) asbd.mChannelsPerFrame,
asbd.mFormatFlags, (unsigned int) asbd.mFormatFlags,
asbd.mBytesPerFrame, (unsigned int) asbd.mBytesPerFrame,
asbd.mBitsPerChannel, (unsigned int) asbd.mBitsPerChannel,
asbd.mBytesPerPacket, asbd.mFramesPerPacket, asbd.mReserved); (unsigned int) asbd.mBytesPerPacket,
(unsigned int) asbd.mFramesPerPacket, (unsigned int) asbd.mReserved);
GST_DEBUG_OBJECT (osxbuf, "Using stream_id %d, setting output format", GST_DEBUG_OBJECT (osxbuf, "Using stream_id %d, setting output format",
(int) osxbuf->stream_id); (int) osxbuf->stream_id);