Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++无法调用数据推送模式 #133

Open
x850044053wwt opened this issue Oct 15, 2024 · 2 comments
Open

C++无法调用数据推送模式 #133

x850044053wwt opened this issue Oct 15, 2024 · 2 comments

Comments

@x850044053wwt
Copy link

x850044053wwt commented Oct 15, 2024

GraphMode中没有数据推送模式枚举。源码中添加对应枚举后,c++没有对应python中的Graph::run_wo_block。执行Graph::run()之后,线程阻塞,无法继续调用FillPacket

@JackLau1222
Copy link
Contributor

may you provide the cpp demo code?

@x850044053wwt
Copy link
Author

nlohmann::json graph_para = { {"dump_graph", 1} }; auto graph = bmf::builder::Graph(bmf::builder::PushdataMode, JsonParam(graph_para)); auto video_stream = graph.InputStream("blob_video", "", ""); nlohmann::json option = { { "video_codec", "h264" }, { "video_time_base", "1,30000" }, { "push_raw_stream", 1 } }; auto decode_stream = video_stream.Decode(JsonParam(option)); option = { { "output_path", "D:/output.mp4" }, { "video_params", { { "codec", "h264" }, { "width", 640 }, { "height", 480 }, { "crf", "23" }, { "preset", "veryfast" } } } }; decode_stream.EncodeAsVideo(JsonParam(option)); graph.Start();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants