Changeset 201


Ignore:
Timestamp:
Jul 9, 2013, 10:29:09 AM (11 years ago)
Author:
roman
Message:

Minor tooltip fix, improved subtype reporting

Location:
trunk/DirectShowSpy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DirectShowSpy/FilterGraphHelper.h

    r199 r201  
    268268                                                        CStringW sSubtype;
    269269                                                        if(pMediaType->subtype != MEDIASUBTYPE_NULL)
    270                                                                 sSubtype = _FilterGraphHelper::FormatSubtype(pMediaType->subtype);
    271                                                         sConnectionText += AtlFormatString(_T(" (%s %s)"), I(sMajorType), I(sSubtype));
     270                                                                sSubtype = _FilterGraphHelper::FormatSubtype(pMediaType->majortype, pMediaType->subtype);
     271                                                        CRoArrayT<CString> Array;
     272                                                        Array.Add(I(sMajorType));
     273                                                        Array.Add(I(sSubtype));
     274                                                        #pragma region MEDIATYPE_Video
     275                                                        if(pMediaType->majortype == MEDIATYPE_Video)
     276                                                        {
     277                                                                const CVideoInfoHeader2 VideoInfoHeader2 = pMediaType.GetCompatibleVideoInfoHeader2();
     278                                                                const CSize Extent = VideoInfoHeader2.GetExtent();
     279                                                                if(Extent.cx || Extent.cy)
     280                                                                        Array.Add(AtlFormatString(_T("%s x %s"), I(Extent.cx), I(Extent.cy)));
     281                                                        } else
     282                                                        #pragma endregion
     283                                                        #pragma region MEDIATYPE_Audio
     284                                                        if(pMediaType->majortype == MEDIATYPE_Audio)
     285                                                        {
     286                                                                const CWaveFormatEx* pWaveFormatEx = pMediaType.GetWaveFormatEx();
     287                                                                if(pWaveFormatEx)
     288                                                                {
     289                                                                        if(pWaveFormatEx->nSamplesPerSec)
     290                                                                                Array.Add(AtlFormatString(_T("%s Hz"), I(pWaveFormatEx->nSamplesPerSec)));
     291                                                                        if(pWaveFormatEx->nChannels)
     292                                                                                Array.Add(AtlFormatString(_T("%s channels"), I(pWaveFormatEx->nChannels)));
     293                                                                        if(pWaveFormatEx->wBitsPerSample)
     294                                                                                Array.Add(AtlFormatString(_T("%s bits"), I(pWaveFormatEx->wBitsPerSample)));
     295                                                                }
     296                                                        }
     297                                                        #pragma endregion
     298                                                        sConnectionText += AtlFormatString(_T(" (%s)"), _StringHelper::Join(Array, _T(", ")));
    272299                                                }
    273300                                        }
     
    319346                                                sText += AtlFormatString(_T(" * ") _T("`majortype`: %s") _T("\r\n"), I(_FilterGraphHelper::FormatMajorType(pMediaType->majortype)));
    320347                                                if(pMediaType->subtype != MEDIASUBTYPE_NULL)
    321                                                         sText += AtlFormatString(_T(" * ") _T("`subtype`: %s") _T("\r\n"), I(_FilterGraphHelper::FormatSubtype(pMediaType->subtype)));
     348                                                        sText += AtlFormatString(_T(" * ") _T("`subtype`: %s") _T("\r\n"), I(_FilterGraphHelper::FormatSubtype(pMediaType->majortype, pMediaType->subtype)));
    322349                                                K1(bFixedSizeSamples);
    323350                                                K1(bTemporalCompression);
  • trunk/DirectShowSpy/FilterGraphList.h

    r199 r201  
    415415                        sTextBuffer.AppendFormat(_T("Display Name: %ls\r\n"), Item.m_sDisplayName);
    416416                        sTextBuffer.AppendFormat(_T("Instance: 0x%p\r\n"), Item.m_nInstance);
    417                         sTextBuffer.TrimRight(_T("\t\n\r ."));
    418417                        const CString sDirectory = (LPCTSTR) GetPathDirectory(Item.m_sProcessImagePath);
    419418                        if(!sDirectory.IsEmpty())
    420419                                sTextBuffer.AppendFormat(_T("Process Directory: %s\r\n"), sDirectory);
     420                        sTextBuffer.TrimRight(_T("\t\n\r ."));
    421421                        #pragma region Clipboard Copy
    422422                        if(GetKeyState(VK_CONTROL) < 0 && GetKeyState(VK_SHIFT) < 0)
Note: See TracChangeset for help on using the changeset viewer.