annotate loader/dshow/allocator.h @ 11619:179138947307

This patch contains bugfixes for the esd audio output driver that I uncovered while trying to send sound to a remote esd server over a wireless (11 mbs, just enough to handle to sound) link. First, the sound was full "ticking" sounds. I found a bug that prevented the "send the remainder of this block" code from ever being called - so large chunks of audio were simply being ignored. Fixing this bug removed the "ticking" from audio streams. Fixing this bug, however, uncovered another problem - when the socket buffer was full, doing a blocking write to finish the buffer would take far too long and would turn video into a chunky mess. I'd imagine this blocking write would be fine for an audio-only stream, but it turns out to hold up the video far too much. The solution in this patch is to write as much data as possible to the socket, and then return as soon as possible, reporting the number of bytes actually written accurately back to mplayer. I've tested it on both local and remote esd servers, and it works well. Patch by Benjamin Osheroff <ben@gimbo.net>
author attila
date Wed, 10 Dec 2003 12:19:13 +0000
parents 9533c26c0806
children 2c8cdb9123b8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 713
diff changeset
1 #ifndef DS_ALLOCATOR_H
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 713
diff changeset
2 #define DS_ALLOCATOR_H
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
3
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
4 #include "interfaces.h"
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
5 #include "cmediasample.h"
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 713
diff changeset
6
7386
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3130
diff changeset
7 typedef struct _avm_list_t avm_list_t;
174e2a58b4cd avifile sync - 95% cosmetics 5% bug
arpi
parents: 3130
diff changeset
8 typedef struct _MemAllocator MemAllocator;
713
9355b2ae634e avifile-0.6-CVS merge
arpi_esp
parents: 168
diff changeset
9
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
10 struct _MemAllocator
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
11 {
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
12 IMemAllocator_vt* vt;
3130
623cdb771e97 avifile sync. seems to some bugs fixed...
arpi
parents: 3056
diff changeset
13 DECLARE_IUNKNOWN();
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
14 ALLOCATOR_PROPERTIES props;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
15 avm_list_t* used_list;
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
16 avm_list_t* free_list;
713
9355b2ae634e avifile-0.6-CVS merge
arpi_esp
parents: 168
diff changeset
17 char* new_pointer;
9355b2ae634e avifile-0.6-CVS merge
arpi_esp
parents: 168
diff changeset
18 CMediaSample* modified_sample;
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
19 GUID interfaces[2];
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 713
diff changeset
20
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
21 void ( *SetPointer )(MemAllocator* This, char* pointer);
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
22 void ( *ResetPointer )(MemAllocator* This);
168
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
23 };
bdc4a8fc04d8 Initial revision
arpi_esp
parents:
diff changeset
24
8292
9533c26c0806 avifile sync (mostly cosmetics)
arpi
parents: 7386
diff changeset
25 MemAllocator* MemAllocatorCreate(void);
3056
213b35f84cf3 C++ -> C (import from avifile cvs)
arpi
parents: 1545
diff changeset
26
1545
da26060c81ef big avifile sync - from now we have common code
arpi
parents: 713
diff changeset
27 #endif /* DS_ALLOCATOR_H */