int main( void ) { FILE * fp; uint_32 total; fp = fopen( "dwabinfo.gh", "w" ); if( fp == NULL ) { fprintf( stderr, "unable to open dwabinfo.gh for writing: %s", strerror( errno ) ); return( 1 ); } fprintf( fp, "/* this file created by dwmakeab.c */\n" ); emitEncodings( fp ); total = emitInfo( fp ); fclose( fp ); fp = fopen( "dwabenum.gh", "w" ); if( fp == NULL ) { fprintf( stderr, "unable to open dwabenum.gh for writing: %s", strerror( errno ) ); return( 1 ); } fprintf( fp, "/* this file created by dwmakeab.c */\n" ); /* we need this value for determining the size of the dw_client struct */ fprintf( fp, "\n#define AB_LAST_CODE 0x%08lx\n\n", (unsigned long)total ); fprintf( fp, "\n#define AB_BITVECT_SIZE 0x%08lx\n\n", (unsigned long)( ( total + 7 ) / 8 ) ); emitEnum( fp ); fprintf( fp, "\n" ); fclose( fp ); return( 0 ); }
bool DemuxerThr::load(bool canEmitInfo) { playC.loadMutex.lock(); emit load(demuxer.rawPtr()); //to wykonuje się w głównym wątku playC.loadMutex.lock(); //i czeka na koniec wykonywania playC.loadMutex.unlock(); if (canEmitInfo) emitInfo(); return playC.audioStream >= 0 || playC.videoStream >= 0; }