2008年6月9日 星期一

DirectShow on Windows Mobile 5/6的Debug版

Windows Mobile 5.0 PocketPC SDK和Windows Mobile 6.0 Professional SDK沒有strmbasd.lib, 所以Build Debug版有問題。難道要自己去build debug的baseclass?!

2008年4月28日 星期一

__GSHandlerCheck

舊的VS2005 project重新compile發生以下錯誤:
error LNK2001: unresolved external symbol __GSHandlerCheck

把C/C++ /Code Generation的Buffer Security Check設成no (/GS-)

詳細看:

2008年4月16日 星期三

pow() 和log10()在Visual Studio 2005有C2668的error

程式專案用Visual Studio 2005開時, 會發生以下錯誤訊息

error C2668: 'pow' : ambiguous call to overloaded function

MSDN說: 在Visual C++ 2005, pow(int, int)不支援重載了,要把第一個參數轉換(cast)成double, float, 或是long double

log10也是一樣, 原本log10(j)要改成
log10( static_cast(j))



2008年1月30日 星期三

Linux上跑DirectShow

也是用wine,這裡有調校

2008年1月24日 星期四

DirectShow的Video Renderer

DirectShow有三個Video Renderer,其中有二個名字一樣,都叫Video Renderer,三個分別是:

Video Renderer Filter
最老的,Windows XP以前預設的Video Renderer,包含了DirectDraw和Overlay。
Video Mixing Renderer Filter 7
Widows XP預設使用的Video Renderer。
Video Mixing Renderer Filter 9
發行DirectX 9時推出的,用了Direct3D 9技術。

而在Vista裡為了Media Foundation又有了Enhanced Video Renderer

CLSID分別為
// {6BC1CFFA-8FC1-4261-AC22-CFB4CC38DB50}
OUR_GUID_ENTRY(CLSID_VideoRendererDefault,
0x6BC1CFFA, 0x8FC1, 0x4261, 0xAC, 0x22, 0xCF, 0xB4, 0xCC, 0x38, 0xDB, 0x50)

// 70e102b0-5556-11ce-97c0-00aa0055595a Video renderer
OUR_GUID_ENTRY(CLSID_VideoRenderer,
0x70e102b0, 0x5556, 0x11ce, 0x97, 0xc0, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)

// {B87BEB7B-8D29-423f-AE4D-6582C10175AC}
OUR_GUID_ENTRY(CLSID_VideoMixingRenderer,
0xB87BEB7B, 0x8D29, 0x423f, 0xAE, 0x4D, 0x65, 0x82, 0xC1, 0x01, 0x75, 0xAC)

Choosing the Right Renderer (MSDN)
Video Render VMR-9 的介紹 (Jing's Blog)
Enhanced Video Renderer (Jing's Blog)
关于Video Renderer和Overlay Mixer Mixer

2008年1月8日 星期二

在blogger裡正確顯示HTML碼

參考: How to display html code in blog post?

以前用ActiveX的筆記

JavaScript以Automation和Active X控制項溝通 (參數, 控制輸入)
Active X 控制項透過Active X Event和JavaScript連繫 (影像文字輸出)

<SCRIPT LANGUAGE="JAVASCRIPT">
function init()
{
if(form1.img.value != 1)
{
/*
* call ocx function
*/
Cap263.Init();
Cap263.Connect();
}
}
</SCRIPT>

<!-- 進入網頁, call JavaScript的init()-->
<body bgcolor="#99CCFF" onload=init()>

<object
classid="clsid:1EF7B4DB-680F-400E-9E0D-C880DC9036CC" width="176" height="144" id="Cap263"
codebase="./ocx/Kay1.ocx">

<param name="_Version" value="65536">
<param name="_ExtentX" value="0">
<param name="_ExtentY" value="0">
<param name="_StockProps" value="0">
</object>

2008年1月3日 星期四

AVI就可以了,為什麼還要用MP4

AVI不支援一些功能,像B frame。但是也有其他tricky的方法可以解,總之,AVI這個微軟的RIFF格式還是很多人在用。