@ Override public void write ( RtpPacket packet , RTPFormat format ) { // checking format if ( format == null ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "No format specified. Packet dropped!" ) ; } return ; } boolean locked = false ; try { locked = this . lock . tryLock ( ) || this . lock . tryLock ( 5 , TimeUnit . MILLISECONDS ) ; if ( locked ) { safeWrite ( packet , format ) ; } } catch ( InterruptedException e ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Could not aquire write lock for jitter buffer. Dropped packet." ) ; } } finally { if ( locked ) { this . lock . unlock ( ) ; } } }
Accepts specified packet