android/ringlibsdl/project/jni/smpeg2-2.0.0/MPEGring.cpp
void
MPEG_ring:: ReadDone( void )
{
    if ( ring->active ) {
        ring->read += ring->bufSize + sizeof(Uint32);
        ring->timestamp_read++;
        if( ring->read >= ring->end )
        {
            ring->read = ring->begin;
            ring->timestamp_read = ring->timestamps;
        }
//printf("Finished read buffer, making available for writes (%d+1 available for writes)\n", SDL_SemValue(ring->writewait));
        SDL_SemPost(ring->writewait);
    }
}
/*
  Call this when the buffer returned from MPRing_nextReadBuffer() is no
  longer needed.  This assumes there is only one read thread and one write
  thread for a particular ring buffer.
*/
Call this when the buffer returned from MPRing_nextReadBuffer() is no
longer needed.  This assumes there is only one read thread and one write
thread for a particular ring buffer.
Call this when the buffer returned from MPRing_nextReadBuffer () is no longer needed . This assumes there is only one read thread and one write thread for a particular ring buffer .
void
MPEG_ring:: ReadDone( void )
{
    if ( ring->active ) {
        ring->read += ring->bufSize + sizeof(Uint32);
        ring->timestamp_read++;
        if( ring->read >= ring->end )
        {
            ring->read = ring->begin;
            ring->timestamp_read = ring->timestamps;
        }
        SDL_SemPost(ring->writewait);
    }
}
void MPEG_ring :: ReadDone ( void ) { if ( ring -> active ) { ring -> read += ring -> bufSize + sizeof ( Uint32 ) ; ring -> timestamp_read ++ ; if ( ring -> read >= ring -> end ) { ring -> read = ring -> begin ; ring -> timestamp_read = ring -> timestamps ; } SDL_SemPost ( ring -> writewait ) ; } }
Call this when the buffer returned from MPRing_nextReadBuffer() is no
longer needed.
Call this when the buffer returned from MPRing_nextReadBuffer () is no longer needed .
//printf("Finished read buffer, making available for writes (%d+1 available for writes)\n", SDL_SemValue(ring->writewait));