bytedeco/javacv

AVFormatContext call_back()?

Open

#463 aberto em 25 de jul. de 2016

Ver no GitHub
 (9 comments) (0 reactions) (0 assignees)Java (1.583 forks)batch import
help wantedquestion

Métricas do repositório

Stars
 (6.985 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

i want to stop the av_read_frame(), but i do not know how to call the call_back() to interrupt, here is my code, but it don't work...

AVFormatContext pFormatCtx = new AVFormatContext(null);

 AVIOInterruptCB avioInterruptCB = pFormatCtx.interrupt_callback();
        avioInterruptCB.callback(new AVIOInterruptCB.Callback_Pointer() {
            public int call(Pointer p) {

                 try {
                    TimeUnit.SECONDS.sleep(10);
                }catch (Exception e) {
                    logger.info("TimeUnit Exception: {}" , e);
                }
               return 1;
             }
         });

Guia do colaborador