我可以在Delphi2010中使用TFilterGraph和TVideoWindow从文件系统呈现视频。我想从一个MemoryStream而不是直接从文件系统渲染视频。以下是一个概念:
如何告诉FilterGraph使用MemoryStream而不是文件?
发布于 2013-01-06 20:47:47
在Ciuly的网页角落上发布了一个工作演示,回答了您问题的最后一部分:http://www.ciuly.com/delphi/multimedia/using-directshow-with-dspack-play-multimedia-content-from-stream/
至于其他两个部分,加载和读取数据库blob字段:
//add a file stream to a blob field
MemoryStream:= TMemoryStream.Create;
try
MemoryStream.LoadFromFile(VideoFileName);
MemoryStream.Position:= 0;
ClientDataSet1.Edit;
ClientDataSet1YOURBLOBFIELD.LoadFromStream(MemoryStream);
ClientDataSet1.Post;
finally
MemoryStream.Free;
end;
//read a memory stream from a blob field
MemoryStream:= TMemoryStream.Create;
try
ClientDataSet1YOURBLOBFIELD.SaveToStream(MemoryStream);
MemoryStream.Position:= 0;
//do your magic with the memory stream here
finally
MemoryStream.Free;
end; https://stackoverflow.com/questions/14183497
复制相似问题