Ejemplo n.º 1
0
void CTextInfoForm::DoVideoInfo(AM_MEDIA_TYPE *pmt, int level, int offset)
{
	CString				t, f, ofs;
	for (int i=0; i<offset; i++) ofs += _T(" ");
	VIDEOINFOHEADER	*vih = (VIDEOINFOHEADER*)pmt->pbFormat;

	Echo(ofs+_T("VIDEOINFOHEADER:"));
	t.Format(_T("    rcSource:             (%d,%d,%d,%d)"), vih->rcSource.left,vih->rcSource.top, vih->rcSource.right, vih->rcSource.bottom);
	Echo(ofs+t);
	t.Format(_T("    rcTarget:             (%d,%d,%d,%d)"), vih->rcTarget.left,vih->rcTarget.top, vih->rcTarget.right, vih->rcTarget.bottom);
	Echo(ofs+t);
	t.Format(_T("    dwBitRate:            %d"), vih->dwBitRate);				Echo(ofs+t);
	t.Format(_T("    dwBitErrorRate:       %d"), vih->dwBitErrorRate);			Echo(ofs+t);
	t.Format(_T("    AvgTimePerFrame:      %I64d"), vih->AvgTimePerFrame);		Echo(ofs+t);
	DoBitmapInfoHeader(&vih->bmiHeader, offset);

	/*
	int left = sizeof(VIDEOINFOHEADER) - pmt->cbFormat;
	if (left > 0 && level > 3) {
		BYTE *raw = ((BYTE*)vih) + sizeof(VIDEOINFOHEADER);
		Echo(ofs+_T("Extradata:"));
		DoDumpRawBuffer(raw, left, offset+4);
	}
	*/
}
void CTextInfoForm::DoVideoInfo2(AM_MEDIA_TYPE *pmt, int level, int offset)
{
	CString				t, f, ofs;
	for (int i=0; i<offset; i++) ofs += _T(" ");

	if (!pmt->pbFormat || pmt->cbFormat < sizeof(VIDEOINFOHEADER2))
		return;
	const VIDEOINFOHEADER2 * const vih = (VIDEOINFOHEADER2*)pmt->pbFormat;

	Echo(ofs+_T("VIDEOINFOHEADER2:"));
	t.Format(_T("    rcSource:             (%d,%d,%d,%d)"), vih->rcSource.left,vih->rcSource.top, vih->rcSource.right, vih->rcSource.bottom);
	Echo(ofs+t);
	t.Format(_T("    rcTarget:             (%d,%d,%d,%d)"), vih->rcTarget.left,vih->rcTarget.top, vih->rcTarget.right, vih->rcTarget.bottom);
	Echo(ofs+t);
	t.Format(_T("    dwBitRate:            %d"), vih->dwBitRate);				Echo(ofs+t);
	t.Format(_T("    dwBitErrorRate:       %d"), vih->dwBitErrorRate);			Echo(ofs+t);
	t.Format(_T("    AvgTimePerFrame:      %I64d"), vih->AvgTimePerFrame);		Echo(ofs+t);
	t.Format(_T("    dwInterlaceFlags:     %d"), vih->dwInterlaceFlags);		Echo(ofs+t);
	t.Format(_T("    dwCopyProtectFlags:   %d"), vih->dwCopyProtectFlags);		Echo(ofs+t);
	t.Format(_T("    dwPictAspectRatioX:   %d"), vih->dwPictAspectRatioX);		Echo(ofs+t);
	t.Format(_T("    dwPictAspectRatioY:   %d"), vih->dwPictAspectRatioY);		Echo(ofs+t);
	t.Format(_T("    dwControlFlags:       %d"), vih->dwControlFlags);			Echo(ofs+t);
	DoBitmapInfoHeader(&vih->bmiHeader, offset);

	/*
	int left = sizeof(VIDEOINFOHEADER2) - pmt->cbFormat;
	if (left > 0 && level > 3) {
		BYTE *raw = ((BYTE*)vih) + sizeof(VIDEOINFOHEADER2);
		Echo(ofs+_T("Extradata:"));
		DoDumpRawBuffer(raw, left, offset+4);
	}

    VIDEOINFOHEADER2    hdr;

	*/
}