I'm trying to use the GSSF to feed in h264 encoded bytes. I get these bytes from a SampleGrabber with MediaType-Video and SubType-H264. The SampleGrabber sets up OK.
I'm trying to set up the GSSF MediaType the same way. (have also tried others) including Stream but i can't get anything to connect to it either SmartConnect or manually connecting the pins to a decoder that does connect in GraphEdit.
Everything connects ok with the sample using an mpeg video MediaType-Stream and SubType MPEG2Program.
Am i doing something wrong? Is there something else i have to do in order to feed a byte array into the filter?
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can find out what QI calls are made against the GSSF filter. If it looks like you need to support a pull filter, well, I made one a while back. It didn't seem like folks needed it so I didn't put it in the sample download, but it's checked in to CVS at http://directshownet.cvs.sourceforge.net/viewvc/directshownet/directshowlib/Samples/Misc/GSPF/. Make sure you read the readme.
Once upon a time, I made a version of the
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there anything about DirectShow you don't know :)
I'm finding that the "hr = ips.SetEmbedded(typeof(AsyncRdr).GUID);" is not returning 0 to set the COM Object and fails here.
The filter itself has registered OK and i have also incorporated the "Reader.cs" into the project.
The Project has been downloaded from the CVS. Is there anything else i need to do that i'm missing. I've read the ReadMe and I can't find anything else.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if(m_obj==NULL){// Create an instance of the COM class, get the IUnknown. Note that we MUST// use aggregation, otherwise you can't qi from the embedded object back to the IPin,// and there are filters that try to do exactly that.hr=CoCreateInstance(riid,GetOwner(),CLSCTX_INPROC_SERVER,IID_IUnknown,(LPVOID*)&m_obj);}else{hr=MAKE_HRESULT(1,FACILITY_WIN32,ERROR_ALREADY_INITIALIZED);}returnhr;
}
So, I would say there is something wrong with your COM registration for AsyncRdr. The error number returned might give you some thoughts about what the problem is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It was the COM AsyncRdr not registered. I had used the Reader.cs in my project as opposed to building the Reader solution and importing the rdr.dll into my bin folder.
No i can see what this can do.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do i need to create a new asyncreader for each frame that comes in from the samplegrabber as i'm parsing the byte array of each frame at creation time like the setfilename section?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use the GSSF to feed in h264 encoded bytes. I get these bytes from a SampleGrabber with MediaType-Video and SubType-H264. The SampleGrabber sets up OK.
I'm trying to set up the GSSF MediaType the same way. (have also tried others) including Stream but i can't get anything to connect to it either SmartConnect or manually connecting the pins to a decoder that does connect in GraphEdit.
Everything connects ok with the sample using an mpeg video MediaType-Stream and SubType MPEG2Program.
Am i doing something wrong? Is there something else i have to do in order to feed a byte array into the filter?
Thank you.
I'm guessing, but perhaps the h264 filter requires a pull filter:
http://msdn.microsoft.com/en-us/library/dd377480%28VS.85%29.aspx
You can find out what QI calls are made against the GSSF filter. If it looks like you need to support a pull filter, well, I made one a while back. It didn't seem like folks needed it so I didn't put it in the sample download, but it's checked in to CVS at http://directshownet.cvs.sourceforge.net/viewvc/directshownet/directshowlib/Samples/Misc/GSPF/. Make sure you read the readme.
Once upon a time, I made a version of the
Thanks Snarfle, i appreciate that.
Is there anything about DirectShow you don't know :)
I'm finding that the "hr = ips.SetEmbedded(typeof(AsyncRdr).GUID);" is not returning 0 to set the COM Object and fails here.
The filter itself has registered OK and i have also incorporated the "Reader.cs" into the project.
The Project has been downloaded from the CVS. Is there anything else i need to do that i'm missing. I've read the ReadMe and I can't find anything else.
Looking at the code for SetEmbedded in PullSourceFilter.cpp:
STDMETHODIMP CPullOutputPin::SetEmbedded(REFIID riid)
{
CAutoLock cAutoLock(m_pLock);
HRESULT hr;
}
So, I would say there is something wrong with your COM registration for AsyncRdr. The error number returned might give you some thoughts about what the problem is.
Thanks again,
It was the COM AsyncRdr not registered. I had used the Reader.cs in my project as opposed to building the Reader solution and importing the rdr.dll into my bin folder.
No i can see what this can do.
Sorry to hastle you,
In the rdr.dll, i have changed the filestream to a memorystream in the "SetFileName" so that i can parse the byte[] i get from the SampleGrabber.
I can see that it is reading each frame from the output.
Is this an ok way to feed the SampleGrabber bytes into this filter or is there a better way?
How you satisfy the calls to the IAsyncReader methods is up to you.
Thanks for everything.
I believe this will be my last question.
Do i need to create a new asyncreader for each frame that comes in from the samplegrabber as i'm parsing the byte array of each frame at creation time like the setfilename section?
One of us is really confused.
Why would you need to create a new asyncreader for each frame? You create the asyncreader, and it provides frames.
Maybe I've lost track of what you are trying to do?
Sorry about that my poor explanation. Long day at work.
In the ConfigureRdr function there is:
hr = pPin.SetFileName(sFileName); I'm configuring with my frame byte array here.
I guess i meant, can i just call this on each frame? or is there another way to continually feed frame bytes in.
Sorry for the confusion.