• Advertisement
Sign in to follow this  

Playing a movie using DirectShow from memory?

This topic is 4144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Sure; just create a source filter that's not a file, but is a memory stream. I think there's even a sample in the SDK that does something like that.

Share this post


Link to post
Share on other sites
Great. Thing is I'm using Managed DirectShow Lib called TS or something very similar, have you used it yourself?
And I currently use the function RenderFile to establish the filters used to playback. Am I right in thinking I can use renderfile to create it, then simply change the input filter?

Or would I have to supliment the C# code with a C++ dll?

Here's my code currently, if you could just point me in the right direction(Even more so than you have already :) ) i'd be grateful.
Thanks.


public void BuildFromFile(string file,IntPtr handle)
{
int hr = 0;
graphBuilder.
hr = this.graphBuilder.RenderFile(file, null);
DsError.ThrowExceptionForHR(hr);
SyncInterfaces();
CheckVisibility();

hr = this.mediaEventEx.SetNotifyWindow(handle, WMGraphNotify, IntPtr.Zero);
DsError.ThrowExceptionForHR(hr);
}

Share this post


Link to post
Share on other sites
Ok just realised that is not possible since RenderFile works only on a string. (Unless there's a C++ one that works from memory not exposed in the C# lib I'm using?)

So I guess my question now is, how do I manually determine which filters etc I need to use to render a file?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement