读取视频流并将其写入缓冲区
我正在使用 DirectShow API 用 C++ 编写一个程序,以加速视频编码部分。该程序应该从视频采集卡读取视频流,并将其传递给编码器,而不需要通常传递的中间原始数据文件。
但encoder不是我的软件,实际上是买来的。 该编码器用于接受原始数据文件及其详细信息,并提供编码文件作为输出。因此,我决定从视频捕获卡读取视频流,将其保存到某个缓冲区,然后当缓冲区的大小合适时(在编码器中指定合适的大小)将其传递给编码器。
但我对 DirectShow 以及整个多媒体编程都很陌生,所以我要问的是有关用于读取流的函数的建议,或有关整体解决方案的建议,或任何有用的链接。
提前感谢
编辑1:我所说的加速的意思是直接读取编码器中的视频流,而不是创建中间YUV文件并使编码器读取YUV文件。
I'm writing a program in C++ using DirectShow API in order to accelerate video encoding part. This program should read video stream from Video Capture Card, and pass it to the encoder, without intermediate raw data file which is usually passed.
But encoder is not my software, in fact, it was bought.
This encoder used to accept a raw data file with it's details and give an encoded file as an output. So I've decided to read video stream from Video Capture Card, save it to some buffer, and when the size of a buffer is appropriate (appropriate is specified in encoder) pass it to encoder.
But I'm new to DirectShow as well as to a whole multimedia programming, so what I'm asking is an advise about a function to use to read a stream, or about total solution, or any useful links.
Thanks in Advance
EDIT 1: What I meant by Accelerate is to read video stream in encoder directly, instead of creating intermediate YUV file and making encoder to read YUV file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论