[matroska] r1110 - in trunk/MatroskaUtils/GDC: GDCMatroska common
[email protected] Sat, 26 Mar 2005 03:39:56 +0300 (MSK)
Newsgroups
gmane.comp.multimedia.matroska.cvs
Message-ID
<[email protected] >
Author: jcsston
Date: 2005-03-26 03:33:27 +0300 (Sat, 26 Mar 2005)
New Revision: 1110
Modified:
trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska.tlb
trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_h.h
trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_i.c
trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_p.c
trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.cpp
trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.h
trunk/MatroskaUtils/GDC/common/GoogleDesktopComponentCommon.vcproj
trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI.h
trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_i.c
trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_p.c
Log:
Working, content mime-type was set incorrectly.
Modified: trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska.tlb
===================================================================
(Binary files differ)
Modified: trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_h.h
===================================================================
--- trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_h.h 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_h.h 2005-03-26 00:33:27 UTC (rev 1110)
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */
-/* at Thu Mar 24 23:40:26 2005
+/* at Fri Mar 25 17:58:08 2005
*/
/* Compiler settings for .\GDCMatroska.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Modified: trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_i.c
===================================================================
--- trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_i.c 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_i.c 2005-03-26 00:33:27 UTC (rev 1110)
@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 6.00.0361 */
-/* at Thu Mar 24 23:40:26 2005
+/* at Fri Mar 25 17:58:08 2005
*/
/* Compiler settings for .\GDCMatroska.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Modified: trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_p.c
===================================================================
--- trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_p.c 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/GDCMatroska/GDCMatroska_p.c 2005-03-26 00:33:27 UTC (rev 1110)
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */
-/* at Thu Mar 24 23:40:26 2005
+/* at Fri Mar 25 17:58:08 2005
*/
/* Compiler settings for .\GDCMatroska.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Modified: trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.cpp
===================================================================
--- trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.cpp 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.cpp 2005-03-26 00:33:27 UTC (rev 1110)
@@ -95,7 +95,12 @@
CComPtr<IGoogleDesktopSearchEventFactory> spEventFactory;
CComPtr<IDispatch> spEventDisp;
HRESULT hr;
-
+ CString cS;
+
+ cS.Format(_T("CIndexMatroska::HandleFile = %s\n"), W2T(full_path_to_file));
+ //MessageBox(NULL, cS, _T("GDCMatroska"), 0);
+ OutputDebugStr(cS);
+
hr = event_factory->QueryInterface(&spEventFactory);
if (FAILED(hr))
return Error(L"No event factory", IID_IIndexMatroska, hr);
@@ -136,33 +141,26 @@
MatroskaUtilsNamespace::MatroskaTrackInfo *pAudioTrack = pParser->GetFirstAudioTrack();
MatroskaUtilsNamespace::MatroskaTrackInfo *pSubtitleTrack = pParser->GetFirstSubtitleTrack();
- content.Format(L"Muxing App: %s", A2W(pParser->GetMuxingApp()));
-
+ content = A2W(pParser->GetTextReport().c_str());
hr = spEvent->AddProperty(CComBSTR(L"content"), CComVariant(content));
+ hr = spEvent->AddProperty(CComBSTR(L"format"), CComVariant("text/plain"));
double duration = pParser->GetSegmentInfo()->GetDuration();
duration = duration * 1000.0 * 1000.0;
- hr = spEvent->AddProperty(CComBSTR(L"length"), CComVariant(((int)duration)));
+ CComVariant llDuration;
+ llDuration = (ULONG)duration;
+ llDuration.ChangeType(VT_UI8);
+ hr = spEvent->AddProperty(CComBSTR(L"length"), llDuration);
- if (pVideoTrack != NULL) {
- hr = spEvent->AddProperty(CComBSTR(L"format"), CComVariant("video/x-matroska"));
- } else if (pAudioTrack != NULL) {
- hr = spEvent->AddProperty(CComBSTR(L"format"), CComVariant("audio/x-matroska"));
- } else if (pSubtitleTrack != NULL) {
- hr = spEvent->AddProperty(CComBSTR(L"format"), CComVariant("text/x-matroska"));
- } else {
- hr = spEvent->AddProperty(CComBSTR(L"format"), CComVariant("application/x-matroska"));
- }
-
if (pVideoTrack != NULL && pVideoTrack->GetVideoInfo() != NULL) {
MatroskaUtilsNamespace::MatroskaVideoTrackInfo *info = pVideoTrack->GetVideoInfo();
- hr = spEvent->AddProperty(CComBSTR(L"width"), CComVariant(info->video_Width));
- hr = spEvent->AddProperty(CComBSTR(L"height"), CComVariant(info->video_Height));
+ hr = spEvent->AddProperty(CComBSTR(L"width"), CComVariant((unsigned int)info->video_Width, VT_UI4));
+ hr = spEvent->AddProperty(CComBSTR(L"height"), CComVariant((unsigned int)info->video_Height, VT_UI4));
}
if (pAudioTrack != NULL && pAudioTrack->GetAudioInfo() != NULL) {
MatroskaUtilsNamespace::MatroskaAudioTrackInfo *info = pAudioTrack->GetAudioInfo();
- hr = spEvent->AddProperty(CComBSTR(L"channels"), CComVariant(info->audio_Channels));
+ hr = spEvent->AddProperty(CComBSTR(L"channels"), CComVariant((unsigned int)info->audio_Channels, VT_UI4));
}
UTFstring s;
@@ -186,19 +184,14 @@
t = pParser->GetTagDiscTrack();
if (t > 0) {
- hr = spEvent->AddProperty(CComBSTR(L"track_number"), CComVariant(t));
+ hr = spEvent->AddProperty(CComBSTR(L"track_number"), CComVariant((unsigned int)t, VT_UI4));
}
t = pParser->GetTagYear();
if (t > 0) {
- hr = spEvent->AddProperty(CComBSTR(L"year"), CComVariant(t));
+ hr = spEvent->AddProperty(CComBSTR(L"year_published"), CComVariant((unsigned int)t, VT_UI4));
}
- t = pParser->GetTagYear();
- if (t > 0) {
- hr = spEvent->AddProperty(CComBSTR(L"year_published"), CComVariant(t));
- }
-
s2 = pParser->GetTagGenre();
if (s2.length() > 0) {
hr = spEvent->AddProperty(CComBSTR(L"genre"), CComVariant(s2.c_str()));
@@ -210,6 +203,7 @@
if (FAILED(hr))
return Error(L"AddProperty failed", IID_IIndexMatroska, hr);
+ hr = E_INVALID_EVENT_FLAGS;
hr = spEvent->Send(EventFlagIndexable);
if (FAILED(hr))
return Error(L"Send failed", IID_IIndexMatroska, hr);
Modified: trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.h
===================================================================
--- trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.h 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/GDCMatroska/IndexMatroska.h 2005-03-26 00:33:27 UTC (rev 1110)
@@ -31,7 +31,7 @@
public:
CIndexMatroska();
- DECLARE_REGISTRY_RESOURCEID(IDR_INDEXSHORTCUT)
+ DECLARE_REGISTRY_RESOURCEID(IDR_INDEXMATROSKA)
BEGIN_COM_MAP(CIndexMatroska)
COM_INTERFACE_ENTRY(IIndexMatroska)
Modified: trunk/MatroskaUtils/GDC/common/GoogleDesktopComponentCommon.vcproj
===================================================================
--- trunk/MatroskaUtils/GDC/common/GoogleDesktopComponentCommon.vcproj 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/common/GoogleDesktopComponentCommon.vcproj 2005-03-26 00:33:27 UTC (rev 1110)
@@ -92,25 +92,6 @@
</References>
<Files>
<Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- <File
- RelativePath=".\GoogleDesktopComponentRegistration.h">
- </File>
- <File
- RelativePath=".\stdafx.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- <File
- RelativePath=".\GoogleDesktopComponentRegistration.def">
- </File>
- </Filter>
- <Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
@@ -154,6 +135,25 @@
</FileConfiguration>
</File>
</Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\GoogleDesktopComponentRegistration.h">
+ </File>
+ <File
+ RelativePath=".\stdafx.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\GoogleDesktopComponentRegistration.def">
+ </File>
+ </Filter>
</Files>
<Globals>
</Globals>
Modified: trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI.h
===================================================================
--- trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI.h 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI.h 2005-03-26 00:33:27 UTC (rev 1110)
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */
-/* at Thu Mar 24 22:19:47 2005
+/* at Fri Mar 25 17:57:54 2005
*/
/* Compiler settings for .\GoogleDesktopSearchAPI.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Modified: trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_i.c
===================================================================
--- trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_i.c 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_i.c 2005-03-26 00:33:27 UTC (rev 1110)
@@ -6,7 +6,7 @@
/* File created by MIDL compiler version 6.00.0361 */
-/* at Thu Mar 24 22:19:47 2005
+/* at Fri Mar 25 17:57:54 2005
*/
/* Compiler settings for .\GoogleDesktopSearchAPI.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
Modified: trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_p.c
===================================================================
--- trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_p.c 2005-03-25 17:27:44 UTC (rev 1109)
+++ trunk/MatroskaUtils/GDC/common/GoogleDesktopSearchAPI_p.c 2005-03-26 00:33:27 UTC (rev 1110)
@@ -4,7 +4,7 @@
/* File created by MIDL compiler version 6.00.0361 */
-/* at Thu Mar 24 22:19:47 2005
+/* at Fri Mar 25 17:57:54 2005
*/
/* Compiler settings for .\GoogleDesktopSearchAPI.idl:
Oicf, W1, Zp8, env=Win32 (32b run)