Sign in to follow this  

ID3D10Device::OpenSharedResource - Is this a working feature of DX10 or not?

This topic is 3723 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

I know that DX10 is new, but the following quote from MSDN leaves me cold... ID3D10Device::OpenSharedResource
Quote:
The unique handle of the resource is obtained differently depending on the type of device that originally created the resource. * D3D10 device - call ID3D10Device::QueryInterface to get the IDXGIResource and then call IDXGIResource::GetSharedHandle... doesn't work because QI will not know which resource on the device to query. * DXGI device - call IDXGIResource::GetSharedHandle. * D3D9L device - can't figure this one out.
This isn't a complaint (hell, I'd not want to try documenting such a complex system!), I just don't know where to go from here. I would like to share texture data between different devices, but it appears that even MS don't know how this actually works. If it does...

Share this post


Link to post
Share on other sites
Yes, the D3D10 documentation is still very immature. IIRC these comments are left over from one of the first betas. What do you want to do exactly? Sharing between two D3D10 devices or a D3D9Ex and a D3D10 device?

Share this post


Link to post
Share on other sites
Okay... Here's what I'm trying to do. It's just an experiment, don't know if it'll be efficient or even work!

Problem:
1) Using DirectShow with DXVA requires that you supply a Direct3D device in your Allocator/Presenter. This must be your scene rendering device in order to access the texture data.
2) When trying to replay multiple video files at the same time you can get in a right mess trying to share a single device.

Solution(?): Using only DX10 devices
1) Each video replays using it's own DirectShow / Direct3D device. Frames are rendered into shared texture buffers.
2) Separate device renders scene by collecting shared textures and displaying them.

What do you think?

[Edited by - Racky1275 on October 2, 2007 6:34:50 AM]

Share this post


Link to post
Share on other sites
Just be patient; the SDK drops every few months rather regularly, which is a fairly quick turnaround for something of that size.

I don't have any experience with DirectShow. Wasn't it basically abandoned a while ago? Does it even cope with D3D10 resources?

Share this post


Link to post
Share on other sites
Quote:
Original post by Racky1275
Does anyone on this forum have any leverage with Microsoft when it come to things like getting documentation fixed?
There are several Microsoft Most Valuable Professionals specialising in DirectX hanging around here and we have quite a few MS employees with GDNet accounts. MVP's have no authority as such, but we can escalate things more directly...

The documentation team is (or was) very small - just 3 guys I seem to remember. Using the feedback links at the bottom of each page (dxsdkdocs@microsoft.com or something) is usually fairly successful. I've had replies from them via that alias. The main problem is that email is almost unusable these days due to the signal-to-noise ratio [rolleyes]


hth
Jack

Share this post


Link to post
Share on other sites
I must confess that I never have done anything with DirectShow or DXVA. Therefore you need to help me a little bit to allow me to help you.

What kind of resource type do you need for DirectShow/DXVA to write the video data? A texture, a surface or something different?

Share this post


Link to post
Share on other sites
I have a simple dream - To render a full-screen 3D scene at 60Hz which has 4 HD (1920x1080) videos embedded within it. Maybe not the best dream, but it's a start.

My current code uses a DX9 renderer with a thread based VFW video decoder. It's good enough to feed me 1 or 2 HD videos, but it's limited by the CPU/Main memory frame decoding path. Copying video buffers about uses all my CPU time.

I know the answer is DirectShow (and by extension DXVA), as this will decode the video using the graphics hardware, leaving the frames in texture memory ready for use. A multiple video implementation though is proving 'tricky'.

Decisions, decisions...

At first I too thought DirectShow was out, in favour of Vista's new Media Foundation layer. But it appears that MF is only recommended if you are playing DRMed WMV files, otherwise sticking with DirectShow is the preferred route.

Further reading of MSDN points to DirectShow/DXVA NOT being DX10 compatible. So this looks like another dead end. Damn. (it works with DX9ex, but I don't think that helps me much)

Unfortunately DX9 with multiple DirectShow filter graphs and VMR9s appears to be a bad mix. For a start you have to use DX9 in multi-threaded mode, not good for performance.

Share this post


Link to post
Share on other sites
I wouldn't expect DirectShow to ever support Direct3D10. DirectShow is a dead component at this point; no active development or bug fixes except for security related fixes.

Even the DirectShow MVPs are left out of the loop as to what Microsoft's strategy is for multimedia and video.

Share this post


Link to post
Share on other sites
I've yet to have a serious look at DX9ex... Thought I'd just skip to DX10!

Just had a mad thought about using VMR9 to render multiple AVI files into a HUGE texture, which I'd then split up into multiple videos during the render phase...

VMR9's Pin0 would need to be connected to an artificial 4096x4096 60Hz source. That's 64MB per frame, nearly 4GB/s, but it's all in video ram, not moving across buses! Hmmmmm. Crazy, but it just might work...

Share this post


Link to post
Share on other sites

This topic is 3723 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this