android/ringlibsdl/project/jni/smpeg2-2.0.0/MPEGring.cpp
Uint8 *
MPEG_ring:: NextWriteBuffer( void )
{
    Uint8 *buffer;

    buffer = 0;
    if ( ring->active ) {
	//printf("Waiting for write buffer (%d available)\n", SDL_SemValue(ring->writewait));
        SDL_SemWait(ring->writewait);
	//printf("Finished waiting for write buffer\n");
	if ( ring->active ) {
            buffer = ring->write + sizeof(Uint32);
        }
    }
    return buffer;
}
/*
  Returns free buffer of ring->bufSize to be filled with data.
  Zero is returned if there is no free buffer.
*/
Returns free buffer of ring->bufSize to be filled with data.
Zero is returned if there is no free buffer.
Returns free buffer of ring - > bufSize to be filled with data . Zero is returned if there is no free buffer .
Uint8 *
MPEG_ring:: NextWriteBuffer( void )
{
    Uint8 *buffer;
    buffer = 0;
    if ( ring->active ) {
        SDL_SemWait(ring->writewait);
	if ( ring->active ) {
            buffer = ring->write + sizeof(Uint32);
        }
    }
    return buffer;
}
Uint8 * MPEG_ring :: NextWriteBuffer ( void ) { Uint8 * buffer ; buffer = 0 ; if ( ring -> active ) { SDL_SemWait ( ring -> writewait ) ; if ( ring -> active ) { buffer = ring -> write + sizeof ( Uint32 ) ; } } return buffer ; }
Returns free buffer of ring->bufSize to be filled with data.
Returns free buffer of ring - > bufSize to be filled with data .
//printf("Waiting for write buffer (%d available)\n", SDL_SemValue(ring->writewait)); //printf("Finished waiting for write buffer\n");