mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 03:44:06 +08:00
server/Mac: fixes to build without xcode
This commit is contained in:
parent
d188658468
commit
73adcd6b88
@ -48,6 +48,7 @@ void (^streamHandler)(CGDisplayStreamFrameStatus, uint64_t, IOSurfaceRef, CGDisp
|
||||
RFX_RECT rect;
|
||||
unsigned long offset_beg;
|
||||
unsigned long stride;
|
||||
int i;
|
||||
|
||||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
@ -64,7 +65,7 @@ void (^streamHandler)(CGDisplayStreamFrameStatus, uint64_t, IOSurfaceRef, CGDisp
|
||||
|
||||
stride = IOSurfaceGetBytesPerRow(frameSurface);
|
||||
//memcpy(localBuf, baseAddress + offset_beg, surflen);
|
||||
for(int i = 0; i < rect.height; i++)
|
||||
for(i = 0; i < rect.height; i++)
|
||||
{
|
||||
offset_beg = (stride * (rect.y + i) + (rect.x * 4));
|
||||
memcpy(localBuf + offset_beg,
|
||||
@ -232,7 +233,7 @@ int mf_mlion_get_dirty_region(RFX_RECT* invalid)
|
||||
|
||||
int mf_mlion_peek_dirty_region(RFX_RECT* invalid)
|
||||
{
|
||||
size_t num_rects;
|
||||
size_t num_rects, i;
|
||||
CGRect dirtyRegion;
|
||||
|
||||
const CGRect * rects = CGDisplayStreamUpdateGetRects(lastUpdate, kCGDisplayStreamUpdateDirtyRects, &num_rects);
|
||||
@ -242,7 +243,7 @@ int mf_mlion_peek_dirty_region(RFX_RECT* invalid)
|
||||
}
|
||||
|
||||
dirtyRegion = *rects;
|
||||
for (size_t i = 0; i < num_rects; i++)
|
||||
for (i = 0; i < num_rects; i++)
|
||||
{
|
||||
dirtyRegion = CGRectUnion(dirtyRegion, *(rects+i));
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ static void mf_peer_rdpsnd_activated(rdpsnd_server_context* context)
|
||||
{
|
||||
|
||||
OSStatus status;
|
||||
int i;
|
||||
|
||||
recorderState.dataFormat.mSampleRate = 44100.0;
|
||||
recorderState.dataFormat.mFormatID = kAudioFormatLinearPCM;
|
||||
@ -83,7 +84,7 @@ static void mf_peer_rdpsnd_activated(rdpsnd_server_context* context)
|
||||
mf_rdpsnd_derive_buffer_size(recorderState.queue, &recorderState.dataFormat, 0.05, &recorderState.bufferByteSize);
|
||||
|
||||
|
||||
for (int i = 0; i < snd_numBuffers; ++i)
|
||||
for (i = 0; i < SND_NUMBUFFERS; ++i)
|
||||
{
|
||||
AudioQueueAllocateBuffer(recorderState.queue,
|
||||
recorderState.bufferByteSize,
|
||||
|
@ -43,12 +43,12 @@ void mf_peer_rdpsnd_input_callback (void *inUserD
|
||||
const AudioStreamPacketDescription *inPacketDescs);
|
||||
|
||||
|
||||
static const int snd_numBuffers = 3;
|
||||
#define SND_NUMBUFFERS 3
|
||||
struct _AQRecorderState
|
||||
{
|
||||
AudioStreamBasicDescription dataFormat;
|
||||
AudioQueueRef queue;
|
||||
AudioQueueBufferRef buffers[snd_numBuffers];
|
||||
AudioQueueBufferRef buffers[SND_NUMBUFFERS];
|
||||
AudioFileID audioFile;
|
||||
UInt32 bufferByteSize;
|
||||
SInt64 currentPacket;
|
||||
|
Loading…
Reference in New Issue
Block a user