add do not sleep wait state
notice: #170 should be merged before merging this PR.
I added State.wait which doesn't call sleep.
There are cases in State.wait where it is not necessary to call Thread.sleep .
For example https://github.com/natario1/Transcoder/blob/main/lib/src/main/java/com/otaliastudios/transcoder/internal/codec/Decoder.kt#L120
Call Thread.sleep in State.wait slows down the process when trimming the beginning
ref: #169
Thanks @jumperson , I like the idea but how are you deciding when to use Wait(false) or Wait(true)? I don't see a pattern. Also I wonder if some of these Wait(false) could just be Retry.
@natario1 Thanks for reply.
I think the default behavior is Wait(false) . This is because even in the case of Wait, MediaExtractor.advance () is called and the state changes.
I think to call Thread.sleep is good only for if the document can read that Sleep is needed, such as INFO_TRY_AGAIN_LATER.