|
|
|
Hi to all,
I am creating a DirectShow filter, that will only read the RGB pixel (32 bit) from MPEG-2 input video source.
I am connecting it after MPEG-2 Video Decoder as follows,
MPEG-2 Video Decoder --> My Custom Filter --> Video Renderer
I am receiving video size from My Custom Filter is 720x480, but actual video size if 720x576.
Code within CheckInputType(const CMediaType *mtIn) & CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut) functions looks as follows,
<br />
if (IsEqualGUID(*mtIn->Type(), MEDIATYPE_Video))<br />
if (IsEqualGUID(*mtIn->Subtype(), MEDIASUBTYPE_RGB32))<br />
{<br />
VIDEOINFOHEADER *pvi = (VIDEOINFOHEADER *)mtIn->Format();<br />
return (pvi->bmiHeader.biBitCount == 32);<br />
}<br />
Is there anything I have to change/add?
Even any solution with RGB 24 bit is also fine.
I appreciate any and all comments and suggestions.
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
Hi! Did you use GraphEdit to see what inputs-outputs your filter gets?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
First I am conecting as MPEG-2 Video Decoder --> My Custom Filter --> Video Renderer & run the graph
Input Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 720x480, 32 bits
Output Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 720x480, 32 bits
And in output I get video cropped at bottom
---------------------------
Then I am conecting as MPEG-2 Video Decoder --> Video Renderer & run the graph
Input Pin Properties of Video Renderer
Major Type : Video
Sub Type : DXVA_ModeMPEG2_A
Format : NV12 704x576, 12 bits
Aspect Ration: 4x3
Interlace format: Interleaved Bob Only
proper video output
---------------------------
After that I am conecting as MPEG-2 Video Decoder --> My Custom Filter --> Video Renderer (again) & run the graph
Input Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 704x576, 32 bits
Output Pin Properties of My Custom Filter
Major Type : Video
Sub Type : RGB32
Format : RGB 704x576, 32 bits
And in output I get am getting proper video
|
|
|
|
|
Hmm, strange, and it's not just the height, if you check the width it also varies between 704 and 720. Try experimenting with a different filter to see how it behaves, for example try putting a color space converter filter between the renderer and the decompressor and see what formats that gets, maybe it can help finding out something...also try logging out what formats the mpg decompressor tries to feed your filter...currently i have no exact idea what the problem could be.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks for reply.
Custom Filter with RGB24, a Color Space Converter filter gets added between custom filter & video renderer.
While with RGB32, it is directly connecting to video renderer.
I am using Elecard Video Decoder.
Code-o-mat wrote: experimenting with a different filter to see how it behaves
I tried with different video deocders, but i m getting more issues with other deocders, like inverted video, green video, etc
|
|
|
|
|
Hi All,
I'm savitri here. I'm doing FingerPrint project. In this project i want to store fingerprint in database and retrieve that fingerprint for comparision.I created one table called "Images" with 2 fields called ID(AutoNumber)and Image(OLE Object). While inserting fingerprint i'm writing SQL statement like this.
BYTE* buffer=new BYTE[1632];
buffer=m_RegTemplate.pbData;//m_RegTemplate is DATA_BLOB Type.
"INSERT INTO Images(Image) VALUES('"+buffer+"')";
I'm not getting how to retrieve the fingerprint from the database table. i want to save that retrieved fingerprint into m_RegTemplate.pbData for comparision.
Please tell me how to solve this problem and Give me some hints.
Thanks in Advance
Regards,
Savitri P
|
|
|
|
|
You posted your question only 1 hour ago. This is a forum, not a chat. If you can't wait, then go on rentacoder and pay somebody to do the job for you.
|
|
|
|
|
lol
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
what format is your image? If you're storing a bitmap file, you have to first insert the correct header information & then the raw data (i forget how many bytes the header is, but it's more than a few)
Might check out "serializable" interfaces too
|
|
|
|
|
Hi All,
It is fingerprint template. I'm using DATA_BLOB Data type to store the image from the device.I'm not getting how to retrieve the stored image from the database. When i'm trying to retrieve the image from record set.that format is recset.GetFieldValue("Image",buffer);//buffer is of CDBVariant type.I want to assign the buffer value to another BYTE* variable. But i'm not getting how to do this? So please give me any hints to solve this problem. I'm also searching the solution and trying for all the options.
Thanks in Advance.
Regards,
Savitri.
|
|
|
|
|
Hi,
I am using a message box API as :
MessageBox(NULL, bstrMessage, bstrTitle, MB_OK | MB_HELP | MB_ICONEXCLAMATION);
This work fine in english...
But in italian OS it is displaying "?" in the caption of "Help" button.
How do we change it to display a correct string in place of "?".?
|
|
|
|
|
Odd as it may seem, for Italian Windows the translation of "Help" or "&Help" is "?" or "&?". You would have to hack the system DLLs (user32.dll actually) to change it.
modified on Monday, March 16, 2009 10:08 AM
|
|
|
|
|
Could you plz give me an example ..?
|
|
|
|
|
|
Hi Mik,
Want to see the implementation part details.
|
|
|
|
|
pandit84 wrote: Want to see the implementation part details
Sorry, I don't what you mean.
Once again - you can't change the translation ("?") of this MessageBox button.
|
|
|
|
|
I want to implement the changes by using redirecting user32.dll to execute our needfull functioanlity..
Mean want to display correct text string of translated "Help" in Italian language.
Could you please tell me the detailed implementation, How I can implpemet through code..... By hacking Systems dll for our need ?
|
|
|
|
|
It might be illegal to modifiy Windows system DLLs so I won't tell you how to do it.
|
|
|
|
|
...and I really don't care that you're downvoting me for this...
|
|
|
|
|
. That looks funny when they immediately respond with a 1 vote.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Yeah, ungrateful buggers
|
|
|
|
|
pandit84 wrote: How do we change it to display a correct string in place of "?".?
Technically speaking, "?" is a string.
BTW: You may roll your own version of the message box.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I am using VC++ 6.0. I need to create an XML which has multibyte support and has the Major version and minor version in it.
CComPtr pXMLDomDocPtr;
CComPtr pDataNode;
CComPtr pRootNode = NULL;
CComPtr pNodeList = NULL;
CComBSTR bstrName,bstrNodeName;
CoInitialize(NULL);
VARIANT_BOOL isSuccessful = VARIANT_FALSE;
HRESULT hr = pXMLDomDocPtr.CoCreateInstance( L"Microsoft.XMLDOM" );
if( hr == S_OK )
{
pXMLDomDocPtr->put_async( VARIANT_FALSE );
CString csXMLFileName(newpath);
csXMLFileName += "\\ITCSettings.xml";
pXMLDomDocPtr->put_async( VARIANT_FALSE );
hr = pXMLDomDocPtr->load((_variant_t)csXMLFileName);
}
I have created XML with above code. What do i need to modify in above code to have major and minor versions and with multibyte support
Thanks,
|
|
|
|