- Timestamp:
- Jun 28, 2013, 6:19:16 AM (11 years ago)
- Location:
- trunk/Utilities/WindowsMediaCodecList
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/WindowsMediaCodecList/AboutDialog.h
r66 r186 1 1 //////////////////////////////////////////////////////////// 2 // Copyright (C) Roman Ryltsov, 200 9-20122 // Copyright (C) Roman Ryltsov, 2008-2013 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #pragma once … … 114 112 #pragma endregion 115 113 #pragma region Caption 116 {117 #if _TRACE || defined(_WIN64)118 CString sCaption;119 _W(GetWindowText(sCaption));120 sCaption.Append(_T(" // "));121 #if _DEVELOPMENT122 sCaption.Append(_T("Dev "));123 #endif // _DEVELOPMENT124 sCaption.Append(_VersionInfoHelper::GetVersionString(_VersionInfoHelper::GetFileVersion(_VersionInfoHelper::GetModulePath())));125 #if defined(_WIN64)126 sCaption.Append(_T(" (x64)"));127 #endif // defined(_WIN64)128 _W(SetWindowText(sCaption));129 #endif // _TRACE || defined(_WIN64)130 }114 #if _TRACE || defined(_WIN64) 115 { 116 CString sCaption; 117 _W(GetWindowText(sCaption)); 118 sCaption.Append(_T(" // ")); 119 #if _DEVELOPMENT 120 sCaption.Append(_T("Dev ")); 121 #endif // _DEVELOPMENT 122 sCaption.Append(_VersionInfoHelper::GetVersionString(_VersionInfoHelper::GetFileVersion(_VersionInfoHelper::GetModulePath()))); 123 #if defined(_WIN64) 124 sCaption.Append(_T(" (x64)")); 125 #endif // defined(_WIN64) 126 _W(SetWindowText(sCaption)); 127 } 128 #endif // _TRACE || defined(_WIN64) 131 129 #pragma endregion 132 130 #pragma region Window Position and Focus -
trunk/Utilities/WindowsMediaCodecList/MainDialog.h
r67 r186 1 1 //////////////////////////////////////////////////////////// 2 // Copyright (C) Roman Ryltsov, 200 9-20122 // Copyright (C) Roman Ryltsov, 2008-2013 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #pragma once … … 476 474 { 477 475 if(!m_pCodecFormatData->m_sDescription.IsEmpty()) 476 { 478 477 sText.AppendFormat(_T("Description: %ls\r\n"), m_pCodecFormatData->m_sDescription); 478 sText.Append(_T("\r\n")); 479 } 480 #pragma region Interfaces 481 if(m_pCodecFormatData->m_pWmStreamConfig) 482 { 483 sText += AtlFormatString(_T("Interfaces:") _T("\r\n")); 484 static const struct 485 { 486 const IID* pIdentifier; 487 LPCSTR pszName; 488 } g_pMap[] = 489 { 490 #define A(x) { &__uuidof(x), #x }, 491 A(IWMMediaProps) 492 A(IWMStreamConfig) 493 A(IWMStreamConfig2) 494 A(IWMStreamConfig3) 495 A(IWMVideoMediaProps) 496 #undef A 497 }; 498 for(SIZE_T nIndex = 0; nIndex < DIM(g_pMap); nIndex++) 499 { 500 CComPtr<IUnknown> pUnknown; 501 m_pCodecFormatData->m_pWmStreamConfig->QueryInterface(*g_pMap[nIndex].pIdentifier, (VOID**) &pUnknown); 502 if(pUnknown) 503 sText += AtlFormatString(_T(" ") _T("%hs") _T("\r\n"), g_pMap[nIndex].pszName); 504 } 505 sText.Append(_T("\r\n")); 506 } 507 #pragma endregion 508 #pragma region Media Type 479 509 if(m_pCodecFormatData->m_pMediaType) 480 510 { 481 sText.Append(_T("\r\n"));482 511 sText.Append(_T("AM_MEDIA_TYPE:\r\n")); 483 512 const CMediaType& pMediaType = reinterpret_cast<const CMediaType&>(m_pCodecFormatData->m_pMediaType); … … 514 543 #pragma endregion 515 544 sText.AppendFormat(_T(" cbFormat: %s\r\n"), _StringHelper::FormatNumber((LONG) pMediaType->cbFormat)); 545 #pragma region FORMAT_VideoInfo 516 546 if(pMediaType->formattype == FORMAT_VideoInfo) 517 547 { … … 538 568 //biClrUsed; 539 569 //biClrImportant; 570 sText.Append(_T("\r\n")); 571 540 572 } else 573 #pragma endregion 574 #pragma region FORMAT_VideoInfo2 541 575 if(pMediaType->formattype == FORMAT_VideoInfo2) 542 576 { … … 572 606 //biClrImportant; 573 607 } else 608 #pragma endregion 609 #pragma region FORMAT_WaveFormatEx 574 610 if(pMediaType->formattype == FORMAT_WaveFormatEx) 575 611 { … … 596 632 sText.AppendFormat(_T(" %s\r\n"), StringFromData((const BYTE*) (pWaveFormatEx + 1), pWaveFormatEx->cbSize)); 597 633 } 598 } 634 #pragma endregion 635 } 636 #pragma endregion 637 #pragma region IWMMediaProps 638 const CComQIPtr<IWMMediaProps> pWmMediaProps = m_pCodecFormatData->m_pWmStreamConfig; 639 if(pWmMediaProps) 640 _ATLTRY 641 { 642 GUID Type = GUID_NULL; 643 __C(pWmMediaProps->GetType(&Type)); 644 sText.Append(_T("IWMMediaProps:\r\n")); 645 sText.AppendFormat(_T(" ") _T("Type: %ls") _T("\r\n"), _FilterGraphHelper::FormatMajorType(Type)); 646 sText.Append(_T("\r\n")); 647 } 648 _ATLCATCHALL() 649 { 650 _Z_EXCEPTION(); 651 } 652 #pragma endregion 653 #pragma region IWMStreamConfig 654 const CComQIPtr<IWMStreamConfig> pWmStreamConfig = m_pCodecFormatData->m_pWmStreamConfig; 655 if(pWmStreamConfig) 656 _ATLTRY 657 { 658 GUID StreamType = GUID_NULL; 659 __C(pWmStreamConfig->GetStreamType(&StreamType)); 660 WORD nStreamNumber = 0; 661 __C(pWmStreamConfig->GetStreamNumber(&nStreamNumber)); 662 WORD nStreamNameLength = 0; 663 pWmStreamConfig->GetStreamName(NULL, &nStreamNameLength); 664 CTempBufferT<WCHAR> pszStreamName(nStreamNameLength + 1); 665 __C(pWmStreamConfig->GetStreamName(pszStreamName, &nStreamNameLength)); 666 WORD nConnectionNameLength = 0; 667 pWmStreamConfig->GetConnectionName(NULL, &nConnectionNameLength); 668 CTempBufferT<WCHAR> pszConnectionName(nConnectionNameLength + 1); 669 __C(pWmStreamConfig->GetConnectionName(pszConnectionName, &nConnectionNameLength)); 670 DWORD nBitrate = 0; 671 __C(pWmStreamConfig->GetBitrate(&nBitrate)); 672 DWORD nBufferWindow = 0; 673 __C(pWmStreamConfig->GetBufferWindow(&nBufferWindow)); 674 sText.Append(_T("IWMStreamConfig:\r\n")); 675 sText.AppendFormat(_T(" ") _T("StreamType: %ls") _T("\r\n"), _FilterGraphHelper::FormatMajorType(StreamType)); 676 sText.AppendFormat(_T(" ") _T("StreamNumber: %d") _T("\r\n"), nStreamNumber); 677 if(wcslen(pszStreamName)) 678 sText.AppendFormat(_T(" ") _T("StreamName: %ls") _T("\r\n"), (LPCWSTR) pszStreamName); 679 if(wcslen(pszConnectionName)) 680 sText.AppendFormat(_T(" ") _T("ConnectionName: %ls") _T("\r\n"), (LPCWSTR) pszConnectionName); 681 sText.AppendFormat(_T(" ") _T("Bitrate: %d") _T("\r\n"), nBitrate); 682 sText.AppendFormat(_T(" ") _T("BufferWindow: %d") _T("\r\n"), nBufferWindow); 683 sText.Append(_T("\r\n")); 684 } 685 _ATLCATCHALL() 686 { 687 _Z_EXCEPTION(); 688 } 689 #pragma endregion 690 #pragma region IWMStreamConfig2 691 const CComQIPtr<IWMStreamConfig2> pWmStreamConfig2 = m_pCodecFormatData->m_pWmStreamConfig; 692 if(pWmStreamConfig2) 693 _ATLTRY 694 { 695 WMT_TRANSPORT_TYPE TransportType; 696 __C(pWmStreamConfig2->GetTransportType(&TransportType)); 697 WORD nDataUnitExtensionCount = 0; 698 pWmStreamConfig2->GetDataUnitExtensionCount(&nDataUnitExtensionCount); 699 for(WORD nDataUnitExtensionIndex = 0; nDataUnitExtensionIndex < nDataUnitExtensionCount; nDataUnitExtensionIndex++) 700 { 701 GUID Identifier = GUID_NULL; 702 WORD nSize = 0; 703 DWORD nInformationSize = 0; 704 __C(pWmStreamConfig2->GetDataUnitExtension(nDataUnitExtensionIndex, &Identifier, &nSize, NULL, &nInformationSize)); 705 } 706 sText.Append(_T("IWMStreamConfig2:\r\n")); 707 sText.AppendFormat(_T(" ") _T("TransportType: %d") _T("\r\n"), TransportType); 708 if(nDataUnitExtensionCount) 709 sText.AppendFormat(_T(" ") _T("DataUnitExtensionCount: %d") _T("\r\n"), nDataUnitExtensionCount); 710 sText.Append(_T("\r\n")); 711 } 712 _ATLCATCHALL() 713 { 714 _Z_EXCEPTION(); 715 } 716 #pragma endregion 717 #pragma region IWMStreamConfig3 718 const CComQIPtr<IWMStreamConfig3> pWmStreamConfig3 = m_pCodecFormatData->m_pWmStreamConfig; 719 if(pWmStreamConfig3) 720 _ATLTRY 721 { 722 WORD nLanguageStringLength = 0; 723 pWmStreamConfig3->GetLanguage(NULL, &nLanguageStringLength); 724 CTempBufferT<WCHAR> pszLanguageString(nLanguageStringLength + 1); 725 __C(pWmStreamConfig3->GetLanguage(pszLanguageString, &nLanguageStringLength)); 726 if(wcslen(pszLanguageString)) 727 { 728 sText.Append(_T("IWMStreamConfig3:\r\n")); 729 if(wcslen(pszLanguageString)) 730 sText.AppendFormat(_T(" ") _T("Language: %ls") _T("\r\n"), (LPCWSTR) pszLanguageString); 731 sText.Append(_T("\r\n")); 732 } 733 } 734 _ATLCATCHALL() 735 { 736 _Z_EXCEPTION(); 737 } 738 #pragma endregion 739 #pragma region IWMVideoMediaProps 740 const CComQIPtr<IWMVideoMediaProps> pWmVideoMediaProps = m_pCodecFormatData->m_pWmStreamConfig; 741 if(pWmVideoMediaProps) 742 _ATLTRY 743 { 744 LONGLONG nMaximalKeyFrameIntervalTime = 0; 745 __C(pWmVideoMediaProps->GetMaxKeyFrameSpacing(&nMaximalKeyFrameIntervalTime)); 746 DWORD nQuality = 0; 747 __C(pWmVideoMediaProps->GetQuality(&nQuality)); 748 sText.Append(_T("IWMVideoMediaProps:\r\n")); 749 sText.AppendFormat(_T(" ") _T("MaxKeyFrameSpacing: %s") _T("\r\n"), _FilterGraphHelper::FormatReferenceTime(nMaximalKeyFrameIntervalTime)); 750 sText.AppendFormat(_T(" ") _T("Quality: %d") _T("\r\n"), nQuality); 751 sText.Append(_T("\r\n")); 752 } 753 _ATLCATCHALL() 754 { 755 _Z_EXCEPTION(); 756 } 757 #pragma endregion 599 758 } 600 759 sText.Trim(_T("\t\n\r .")); … … 1026 1185 LRESULT OnCopyButtonClicked(UINT, INT, HWND) 1027 1186 { 1028 CStringW sText(GetSubmissionText()); 1029 __E(OpenClipboard()); 1030 _ATLTRY 1031 { 1032 __E(EmptyClipboard()); 1033 CGlobalMemoryHandle TextHandle; 1034 TextHandle.Alloc((sText.GetLength() + 1) * sizeof (WCHAR), GMEM_MOVEABLE | GMEM_SHARE); 1035 wcscpy_s(CGlobalMemoryHandle::CLockT<WCHAR>(TextHandle), sText.GetLength() + 1, sText); 1036 __E(SetClipboardData(CF_UNICODETEXT, TextHandle)); 1037 TextHandle.Detach(); 1038 MessageBeep(MB_OK); 1039 } 1040 _ATLCATCHALL() 1041 { 1042 _W(CloseClipboard()); 1043 _ATLRETHROW; 1044 } 1045 _W(CloseClipboard()); 1187 SetClipboardText(m_hWnd, GetSubmissionText()); 1188 MessageBeep(MB_OK); 1046 1189 return 0; 1047 1190 } … … 1049 1192 { 1050 1193 CWaitCursor WaitCursor; 1194 const CString sFileDescription = _VersionInfoHelper::GetString(_VersionInfoHelper::GetModulePath(), _T("FileDescription")); 1051 1195 CWinHttpPostData PostData; 1052 PostData.AddValue(_T("subj"), _T("Alax.Info Windows Media Codec List"));1196 PostData.AddValue(_T("subj"), sFileDescription); 1053 1197 CStringA sTextA = Utf8StringFromString(GetSubmissionText()); 1054 1198 PostData.AddValue(_T("body"), _Base64Helper::Encode<CString>((const BYTE*) (LPCSTR) sTextA, sTextA.GetLength(), _Base64Helper::FLAG_NOPAD | _Base64Helper::FLAG_NOCRLF)); … … 1065 1209 DWORD nStatusCode = 0; 1066 1210 __E(Request.QueryNumberHeader(WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, nStatusCode)); 1067 __D(nStatusCode == HTTP_STATUS_OK, MAKE_HRESULT(SEVERITY_ERROR, FACILITY_HTTP, nStatusCode));1211 __D(nStatusCode / 100 == HTTP_STATUS_OK / 100, MAKE_HRESULT(SEVERITY_ERROR, FACILITY_HTTP, nStatusCode)); 1068 1212 AtlMessageBoxEx(m_hWnd, _T("Submission complete, thank you!"), IDS_INFORMATION, MB_ICONINFORMATION | MB_OK); 1069 1213 return 0; -
trunk/Utilities/WindowsMediaCodecList/WindowsMediaCodecList.cpp
r66 r186 1 1 //////////////////////////////////////////////////////////// 2 // Copyright (C) Roman Ryltsov, 200 9-20122 // Copyright (C) Roman Ryltsov, 2008-2013 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #include "stdafx.h" … … 22 20 CModule() throw() 23 21 { 24 #if defined(_DEBUG) 25 AtlTraceLoadSettings(NULL); 26 #endif // defined(_DEBUG) 22 AtlTraceSetDefaultSettings(); 27 23 } 28 24 HRESULT PreMessageLoop(INT nShowCommand) throw() -
trunk/Utilities/WindowsMediaCodecList/WindowsMediaCodecList.rc
r67 r186 90 90 LTEXT "Email:",IDC_ABOUT_EMAILTITLE,60,72,20,8 91 91 LTEXT "<A HREF=""mailto:support@alax.info"">support@alax.info</A>",IDC_ABOUT_EMAIL,108,72,162,8,NOT WS_GROUP | WS_TABSTOP 92 LTEXT "Copyright © Alax.Info, Roman Ryltsov, 200 9-2012",IDC_ABOUT_COPYRIGHT,60,84,210,8,SS_NOPREFIX92 LTEXT "Copyright © Alax.Info, Roman Ryltsov, 2008-2013",IDC_ABOUT_COPYRIGHT,60,84,210,8,SS_NOPREFIX 93 93 DEFPUSHBUTTON "OK",1,220,102,50,14 94 94 CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,6,122,267,1 … … 122 122 123 123 VS_VERSION_INFO VERSIONINFO 124 FILEVERSION 1, 0, 0, 2 05124 FILEVERSION 1, 0, 0, 223 125 125 PRODUCTVERSION 1,0,0,1 126 126 FILEFLAGSMASK 0x3fL … … 141 141 VALUE "Created By", "Roman Ryltsov <roman@alax.info>" 142 142 VALUE "FileDescription", "Windows Media Codec List Utility" 143 VALUE "FileVersion", "1, 0, 0, 2 05\0"143 VALUE "FileVersion", "1, 0, 0, 223\0" 144 144 VALUE "InternalName", "WindowsMediaCodecList" 145 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 200 9-2012"145 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2013" 146 146 VALUE "OriginalFilename", "WindowsMediaCodecList.exe" 147 147 VALUE "ProductName", "Windows Media Codec List Utility" -
trunk/Utilities/WindowsMediaCodecList/WindowsMediaCodecList.sln
r66 r186 1 1 2 2 Microsoft Visual Studio Solution File, Format Version 11.00 3 # Visual Studio 201 03 # Visual Studio 2012 4 4 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsMediaCodecList", "WindowsMediaCodecList.vcxproj", "{1C8C592C-968B-4CDA-A548-952ECA5FE2A8}" 5 5 EndProject -
trunk/Utilities/WindowsMediaCodecList/_Bin/Win32
-
Property
svn:global-ignores
set to
Debug
-
Property
svn:global-ignores
set to
-
trunk/Utilities/WindowsMediaCodecList/_Bin/Win32/Release
-
Property
svn:global-ignores
set to
WindowsMediaCodecList
-
Property
svn:global-ignores
set to
-
trunk/Utilities/WindowsMediaCodecList/_Bin/x64/Release
-
Property
svn:global-ignores
set to
WindowsMediaCodecList
-
Property
svn:global-ignores
set to
-
trunk/Utilities/WindowsMediaCodecList/stdafx.cpp
r66 r186 1 1 //////////////////////////////////////////////////////////// 2 // Copyright (C) Roman Ryltsov, 2008-201 22 // Copyright (C) Roman Ryltsov, 2008-2013 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #include "stdafx.h" -
trunk/Utilities/WindowsMediaCodecList/stdafx.h
r66 r186 1 1 //////////////////////////////////////////////////////////// 2 // Copyright (C) Roman Ryltsov, 2008-201 22 // Copyright (C) Roman Ryltsov, 2008-2013 3 3 // Created by Roman Ryltsov roman@alax.info 4 //5 // $Id$6 4 7 5 #pragma once … … 71 69 // Alax.Info ATL/WTL 72 70 73 #define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utilit ies")71 #define REGISTRY_PRODUCTROOT _T("SOFTWARE\\Alax.Info\\Utility") _T("\\") _T("WindowsMediaCodecList") 74 72 #define REGISTRY_FILEROOT REGISTRY_PRODUCTROOT 75 73 #define REGISTRY_ROOT REGISTRY_FILEROOT
Note: See TracChangeset
for help on using the changeset viewer.