VS查看C++头文件(.h文件)的函数列表

14 篇文章 1 订阅
11 篇文章 0 订阅

这里使用的是VS2019举例

如下图查看Actor.h文件中的函数列表

设置步骤如下图

  • 10
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是使用 Visual Studio 将 MP4 转换为 H264 的步骤: 1. 下载 FFmpeg 并解压缩。 2. 打开 Visual Studio 并创建一个新的控制台应用程序项目。 3. 在解决方案资源管理器中,右键单击项目并选择“属性”。 4. 在属性对话框中,选择“VC++目录”并添加包含目录和库目录,分别指向 FFmpeg 的 include 和 lib 目录。 5. 在“属性”对话框中,选择“链接器”>“输入”并添加以下库文件: avcodec.lib avdevice.lib avfilter.lib avformat.lib avutil.lib postproc.lib swresample.lib swscale.lib 6. 在“源文件文件夹中,右键单击并选择“添加现有项”并添加 ffmpeg.c 文件。 7. 在文件中,找到以下代码: ``` av_register_all(); ``` 并将其替换为以下代码: ``` avcodec_register_all(); av_register_all(); ``` 8. 在文件中,找到以下代码: ``` if ((err = avformat_open_input(&format_ctx, input_file, NULL, NULL)) < 0) ``` 并在其后添加以下代码: ``` format_ctx->probesize = 100 * 1024; ``` 9. 在文件中,找到以下代码: ``` if ((err = avformat_find_stream_info(format_ctx, NULL)) < 0) ``` 并在其后添加以下代码: ``` av_dump_format(format_ctx, 0, input_file, 0); ``` 10. 在文件中,找到以下代码: ``` if ((err = avformat_open_input(&format_ctx, input_file, NULL, NULL)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avformat_open_input(&format_ctx, input_file, NULL, NULL)) < 0) { printf("Error: Could not open input file '%s'\n", input_file); return -1; } if ((err = avformat_find_stream_info(format_ctx, NULL)) < 0) { printf("Error: Could not find stream information\n"); avformat_close_input(&format_ctx); return -1; } av_dump_format(format_ctx, 0, input_file, 0); ``` 11. 在文件中,找到以下代码: ``` if ((err = avformat_find_stream_info(format_ctx, NULL)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avformat_find_stream_info(format_ctx, NULL)) < 0) { printf("Error: Could not find stream information\n"); avformat_close_input(&format_ctx); return -1; } ``` 12. 在文件中,找到以下代码: ``` if ((err = avcodec_open2(codec_ctx, codec, NULL)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avcodec_open2(codec_ctx, codec, NULL)) < 0) { printf("Error: Could not open codec\n"); avformat_close_input(&format_ctx); return -1; } ``` 13. 在文件中,找到以下代码: ``` if ((err = avcodec_open2(codec_ctx, codec, NULL)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avcodec_open2(codec_ctx, codec, NULL)) < 0) { printf("Error: Could not open codec\n"); avformat_close_input(&format_ctx); return -1; } ``` 14. 在文件中,找到以下代码: ``` if ((err = av_write_header(format_ctx)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avformat_write_header(format_ctx, NULL)) < 0) { printf("Error: Could not write header\n"); avformat_close_input(&format_ctx); return -1; } ``` 15. 在文件中,找到以下代码: ``` if ((err = av_write_trailer(format_ctx)) < 0) ``` 并将其替换为以下代码: ``` if ((err = av_write_trailer(format_ctx)) < 0) { printf("Error: Could not write trailer\n"); avformat_close_input(&format_ctx); return -1; } ``` 16. 在文件中,找到以下代码: ``` if ((err = avio_open(&format_ctx->pb, output_file, AVIO_FLAG_WRITE)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avio_open(&format_ctx->pb, output_file, AVIO_FLAG_WRITE)) < 0) { printf("Error: Could not open output file '%s'\n", output_file); avformat_close_input(&format_ctx); return -1; } ``` 17. 在文件中,找到以下代码: ``` if ((err = av_interleaved_write_frame(format_ctx, &pkt)) < 0) ``` 并将其替换为以下代码: ``` if ((err = av_interleaved_write_frame(format_ctx, &pkt)) < 0) { printf("Error: Could not write frame\n"); avformat_close_input(&format_ctx); return -1; } ``` 18. 在文件中,找到以下代码: ``` if ((err = avformat_close_input(&format_ctx)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avformat_close_input(&format_ctx)) < 0) { printf("Error: Could not close input file\n"); return -1; } ``` 19. 在文件中,找到以下代码: ``` if ((err = avcodec_close(codec_ctx)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avcodec_close(codec_ctx)) < 0) { printf("Error: Could not close codec\n"); return -1; } ``` 20. 在文件中,找到以下代码: ``` if ((err = avformat_free_context(format_ctx)) < 0) ``` 并将其替换为以下代码: ``` if ((err = avformat_free_context(format_ctx)) < 0) { printf("Error: Could not free format context\n"); return -1; } ``` 21. 在文件中,找到以下代码: ``` avcodec_register_all(); av_register_all(); ``` 并在其下面添加以下代码: ``` avformat_network_init(); ``` 22. 在文件中,找到以下代码: ``` const char* input_file = "input.mp4"; const char* output_file = "output.h264"; ``` 并将其替换为以下代码: ``` const char* input_file = "path\\to\\input.mp4"; const char* output_file = "path\\to\\output.h264"; ``` 23. 在 Visual Studio 中,单击“生成”>“生成解决方案”以构建应用程序。 24. 打开命令提示符并导航到应用程序的 Debug 目录。 25. 输入以下命令以运行应用程序: ``` ffmpeg.exe ``` 26. 程序将开始转换 MP4 文件并将其保存为 H264 文件。 请注意,这只是一个基本的示例。根据您的需求和输入文件的格式,您可能需要进行其他修改才能使其正常工作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值