Changeset 460
- Timestamp:
- May 24, 2015, 8:35:20 AM (8 years ago)
- Location:
- trunk/DirectShowSpy
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DirectShowSpy/MediaSampleTrace.h
r457 r460 84 84 PAGEITEMFLAG_COMMENT = 3, 85 85 PAGEITEMFLAG_TYPE_MASK = 0x03, 86 PAGEITEMFLAG_HIGHLIGHT_MASK = 0x3C, 87 PAGEITEMFLAG_HIGHLIGHT_SHIFT = 2, 86 88 }; 87 89 … … 208 210 Item.m_Item = *pItem; 209 211 Item.m_PageItem = *pPageItem; 212 Item.m_nHighlightIndex = (Item.m_PageItem.nFlags & PAGEITEMFLAG_HIGHLIGHT_MASK) >> PAGEITEMFLAG_HIGHLIGHT_SHIFT; 210 213 } 211 214 VOID Sort() … … 271 274 static SIZE_T GetFileMappingCapacity() 272 275 { 273 return 1 << 20; // 1MB276 return 8 << 20; // 8 MB 274 277 } 275 278 static LPCTSTR GetFileMappingName() … … 503 506 return m_ItemList.IsEmpty(); 504 507 } 505 VOID Register(CPages& Pages, UINT64 nFilterIdentifier, const CStringW& sFilterName, LPCWSTR pszStreamName, const PAGEITEM& PageItem, LPCWSTR pszComment )508 VOID Register(CPages& Pages, UINT64 nFilterIdentifier, const CStringW& sFilterName, LPCWSTR pszStreamName, const PAGEITEM& PageItem, LPCWSTR pszComment, USHORT nHighlight) 506 509 { 507 510 const UINT64 nTime = (UINT64) CUsAccurateFileTime::GetTime(); … … 518 521 PAGEITEM* pPageItem = (PAGEITEM*) (pPageHeader + 1) + pPageHeader->nItemCount; 519 522 pPageItem->nFlags = PageItem.nFlags & PAGEITEMFLAG_TYPE_MASK; 523 pPageItem->nFlags |= (nHighlight << PAGEITEMFLAG_HIGHLIGHT_SHIFT) & PAGEITEMFLAG_HIGHLIGHT_MASK; 520 524 pPageItem->nThreadIdentifier = GetCurrentThreadId(); 521 525 pPageItem->nFilterIdentifier = nFilterIdentifier; … … 639 643 640 644 // IMediaSampleTrace 641 STDMETHOD(RegisterNewSegment)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, LONGLONG nStartTime, LONGLONG nStopTime, DOUBLE fRate, const WCHAR* pszComment )642 { 643 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", nStartTime %I64d \n"), this, pBaseFilterUnknown, CString(pszStreamName), nStartTime);645 STDMETHOD(RegisterNewSegment)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, LONGLONG nStartTime, LONGLONG nStopTime, DOUBLE fRate, const WCHAR* pszComment, USHORT nHighlight) 646 { 647 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", nStartTime %I64d, nHighlight %d\n"), this, pBaseFilterUnknown, CString(pszStreamName), nStartTime, nHighlight); 644 648 _ATLTRY 645 649 { … … 650 654 PageItem.Data.NewSegment.fRate = fRate; 651 655 CRoCriticalSectionLock DataLock(m_DataCriticalSection); 652 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment );656 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment, nHighlight); 653 657 } 654 658 _ATLCATCH(Exception) … … 658 662 return S_OK; 659 663 } 660 STDMETHOD(RegisterMediaSample)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, const BYTE* pnSamplePropertiesData, const WCHAR* pszComment )661 { 662 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", pnSamplePropertiesData 0x%p \n"), this, pBaseFilterUnknown, CString(pszStreamName), pnSamplePropertiesData);664 STDMETHOD(RegisterMediaSample)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, const BYTE* pnSamplePropertiesData, const WCHAR* pszComment, USHORT nHighlight) 665 { 666 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", pnSamplePropertiesData 0x%p, nHighlight %d\n"), this, pBaseFilterUnknown, CString(pszStreamName), pnSamplePropertiesData, nHighlight); 663 667 _ATLTRY 664 668 { … … 668 672 PageItem.Data.MediaSample.Properties = *((const AM_SAMPLE2_PROPERTIES*) pnSamplePropertiesData); 669 673 CRoCriticalSectionLock DataLock(m_DataCriticalSection); 670 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment );674 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment, nHighlight); 671 675 } 672 676 _ATLCATCH(Exception) … … 676 680 return S_OK; 677 681 } 678 STDMETHOD(RegisterEndOfStream)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, const WCHAR* pszComment )679 { 680 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\" \n"), this, pBaseFilterUnknown, CString(pszStreamName));682 STDMETHOD(RegisterEndOfStream)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, const WCHAR* pszComment, USHORT nHighlight) 683 { 684 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", nHighlight %d\n"), this, pBaseFilterUnknown, CString(pszStreamName), nHighlight); 681 685 _ATLTRY 682 686 { … … 684 688 PageItem.nFlags = PAGEITEMFLAG_ENDOFSTREAM; 685 689 CRoCriticalSectionLock DataLock(m_DataCriticalSection); 686 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment );690 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment, nHighlight); 687 691 } 688 692 _ATLCATCH(Exception) … … 692 696 return S_OK; 693 697 } 694 STDMETHOD(RegisterComment)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, const WCHAR* pszComment )695 { 696 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", pszComment \"%s\" \n"), this, pBaseFilterUnknown, CString(pszStreamName), CString(pszComment));698 STDMETHOD(RegisterComment)(IUnknown* pBaseFilterUnknown, const WCHAR* pszStreamName, const WCHAR* pszComment, USHORT nHighlight) 699 { 700 _Z5(atlTraceCOM, 5, _T("this 0x%p, pBaseFilterUnknown 0x%p, pszStreamName \"%s\", pszComment \"%s\", nHighlight %d\n"), this, pBaseFilterUnknown, CString(pszStreamName), CString(pszComment), nHighlight); 697 701 _ATLTRY 698 702 { … … 700 704 PageItem.nFlags = PAGEITEMFLAG_COMMENT; 701 705 CRoCriticalSectionLock DataLock(m_DataCriticalSection); 702 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment );706 m_Page.Register(m_Pages, (UINT_PTR) pBaseFilterUnknown, GetFilterName(pBaseFilterUnknown), pszStreamName, PageItem, pszComment, nHighlight); 703 707 } 704 708 _ATLCATCH(Exception) -
trunk/DirectShowSpy/Module.idl
r440 r460 59 59 interface IMediaSampleTrace : IUnknown 60 60 { 61 HRESULT RegisterNewSegment([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] LONGLONG nStartTime, [in] LONGLONG nStopTime, [in] DOUBLE fRate, [in] const WCHAR* pszComment );62 HRESULT RegisterMediaSample([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const BYTE* pnSamplePropertiesData, [in] const WCHAR* pszComment );63 HRESULT RegisterEndOfStream([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const WCHAR* pszComment );64 HRESULT RegisterComment([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const WCHAR* pszComment );61 HRESULT RegisterNewSegment([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] LONGLONG nStartTime, [in] LONGLONG nStopTime, [in] DOUBLE fRate, [in] const WCHAR* pszComment, [in] USHORT nHighlight); 62 HRESULT RegisterMediaSample([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const BYTE* pnSamplePropertiesData, [in] const WCHAR* pszComment, [in] USHORT nHighlight); 63 HRESULT RegisterEndOfStream([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const WCHAR* pszComment, [in] USHORT nHighlight); 64 HRESULT RegisterComment([in] IUnknown* pBaseFilterUnknown, [in] const WCHAR* pszStreamName, [in] const WCHAR* pszComment, [in] USHORT nHighlight); 65 65 }; 66 66 [
Note: See TracChangeset
for help on using the changeset viewer.