Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


DarkRonin

Member Since 06 Oct 2006
Offline Last Active Mar 30 2015 09:47 PM

Topics I've Started

Draw and triangle count

30 March 2015 - 08:33 PM

Hi Guys,

 

From a IDirect3DDevice9 interface, is it possible to tell how many triangles and(or) draw counts are being performed per frame?

 

Thanks in advance :)


Decompressing PNG / JPG images on the GPU

11 March 2015 - 07:59 PM

Hi Guys,

 

Does anyone know of any way to decompress PNG / JPG images on the GPU, so you are left with pointer to an uncompressed RGBA texture pointer residing in GPU RAM?

 

Can this even be done with today's tech?

 

Thanks in advance cool.png


Media Foundation Syncronous Playback

06 March 2015 - 10:12 PM

Hi Guys,

 

I am learning how to use the Microsoft Media Foundation API at the moment (synchronous at this point).

 

At this stage I have created one big in-line file, so I can get the right process happening and best understanding of what is going on. Later once it works, I'll break it back down into a nice class.

 

At this stage I am up to the point where I have created everything all the way to connecting up the source and sink.

 

Error handling tells me that all is good up to there, which is great.

 

My question is, how do I start playback? I am using synchronous mode so, I know that I'll have to manually loop the playback. But I am lost as to how to even start the playback as all of the MSDN points to the async mode (which I'll investigate once Sync mode is working).

 

Any advice would be awesome :)

 

Thanks in advance.


Directshow problem

04 March 2015 - 03:01 AM

Hi Guys,
 
I have come across a small problem with my DirectShow code.
 
I want to play audio only from a video file (without any video image playing) and I have the following code which works fine with AVI files.
 

char* szFilename=filename;

HRESULT hr;
hr=CoInitialize(NULL);
if(FAILED(hr))		// Error in CoInitialize;
	return 1;

// create filter graph and get interfaces
hr=CoCreateInstance(CLSID_FilterGraph, NULL,CLSCTX_INPROC_SERVER,IID_IGraphBuilder,(void**)&it->pGraph);
if(FAILED(hr))		// Error in creating graph
	return 2;
	
hr=it->pGraph->QueryInterface(IID_IMediaControl,(void**)&it->pControl);
if(FAILED(hr))		// Error in querying media control
	return 3;

hr=it->pGraph->QueryInterface(IID_IMediaEvent,(void**)&it->pEvent);
if(FAILED(hr))		// Error in querying media event
	return 4;

hr=it->pGraph->QueryInterface(IID_IMediaSeeking,(void**)&it->pSeeking);
if(FAILED(hr))		// Error in querying seeking interface
	return 5;

// Converts the path to wide characters
WCHAR wFilePath[MAX_PATH];
char tempFilePath[MAX_PATH];
strcpy(tempFilePath,filename);
strcat(tempFilePath,"\0");

int len=(int)strlen(tempFilePath);
int needed=MultiByteToWideChar(0,0,tempFilePath,len+1,wFilePath,len+1);

hr=it->pGraph->RenderFile(wFilePath,NULL);
if(FAILED(hr))		// Problem with opening video file
	return 13;
 

hr=it->pGraph->QueryInterface(IID_IVideoWindow,(void**)&it->pWindow);
if(FAILED(hr))		// Error getting video window interface
	return 14;

hr=it->pGraph->QueryInterface(IID_IBasicAudio,(void**)&it->pAudio);
if(FAILED(hr)) 
	return 15;

it->pWindow->put_AutoShow(OAFALSE);

The problem is, when I try to load video files that are any type other than AVI (eg mov, mp4, etc...) the code fails at the "return 13" potion of my code.

 

All of the video files I am trying to load work fine in media player, so installed codecs shouldn't be an issue.

 

Any help would be greatly appreciated!

 

Thanks in advance :)


DXVA-HD Question

25 February 2015 - 02:54 AM

Hi Guys,

 

I am currently working through this over on MSDN to get some video decoding working on the GPU

 

https://msdn.microsoft.com/en-us/library/windows/desktop/ee663581(v=vs.85).aspx

 

So far, so good.

 

But the one thing that I can't find is how to specify the input file.

 

I try to download the sample from here https://msdn.microsoft.com/en-us/library/windows/desktop/dd756740(v=vs.85).aspx but it no longer exists and isn't part of the SDK any more.

 

Does anyone have experience in this area that might be able to help out?

 

Thanks in advance :)


PARTNERS