BabitMF / bmf

Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
https://babitmf.github.io/
Apache License 2.0
816 stars 71 forks source link

运行中的graph,如何取消 #77

Open lukewongis163 opened 12 months ago

lukewongis163 commented 12 months ago

1.构建graph; 2.graph.run();

graph在运行过程中,如何取消,比如发送eof?

sfeiwong commented 12 months ago

参考一下test/dynamical_graph/dynamical_graph.py

  1. 构建graph
  2. graph/stream.run_wo_block()
  3. graph.force_close()
lukewongis163 commented 12 months ago

好的, 谢谢! force_close在bmf::builder::Graph中没有接口,我增加了一个接口。

sfeiwong commented 11 months ago

好的, 谢谢! force_close在bmf::builder::Graph中没有接口,我增加了一个接口。

欢迎提patch

zhangsong1234 commented 10 months ago

graph.force_close()是不是不会把ffmpeg运行的线程杀死,使用graph.force_close()后进程出现了异常,Ctrl+c 杀不死脚本进程了

sfeiwong commented 10 months ago

graph.force_close()是不是不会把ffmpeg运行的线程杀死,使用graph.force_close()后进程出现了异常,Ctrl+c 杀不死脚本进程了

对,目前force close会强制结束各个模块,但由于并行调度,有些模块比如调用ffmpeg lib的可能会出异常。