显示下一条  |  关闭

leave

想念你有点blue

 
 
 
 
 
 

windows中使用CreateDIBSection创建bitmap

2012-5-5 9:36:04 阅读5 评论0 52012/05 May5

#define IMAGE_WIDTH 480
#define IMAGE_HEIGHT 256

void GenBmp(BYTE* ptr)
{
    int i, j;

    for (i=0; i<IMAGE_HEIGHT; i++)
        for (j=0; j<IMAGE_WIDTH; j++)
            *ptr++ = (i)%256; // (IMAGE_HEIGHT-i-1)%256;
}

void DrawBmp(HDC hdc)
{
    HDC hdcSrc = CreateCompatibleDC(hdc);
    struct BitMAPINFO
    { 

作者  | 2012-5-5 9:36:04 | 阅读(5) |评论(0) | 阅读全文>>

wince camera driver分析

2012-4-27 12:08:43 阅读7 评论0 272012/04 Apr27

在SRC\DRIVERS\CAMERA\DLL中,sources文件声明将生成$(_TGTPLAT_PFX)_camera.dll文件。该dll文件导出的接口有:
    DllMain
    CAM_Init
    CAM_Deinit
    CAM_Open
    CAM_Close
    CAM_IOControl
    PIN_Init
    PIN_Deinit
    PIN_Open
    PIN_Close
    PIN_IOControl
CAM_xxx为camera入口,PIN_xxx为PIN入口函数。这两部分共用一个dll文件。

CAM_xxx的加载在注册表项HKEY_LOCAL_MACHINE\Drivers\BuiltIn\QciBus\HM2057中指定

作者  | 2012-4-27 12:08:43 | 阅读(7) |评论(0) | 阅读全文>>

Windows CE camera framework

2012-4-21 12:41:42 阅读8 评论0 212012/04 Apr21

最近因项目需要,研究了一下MS的camera框架。主要资料来源有:
a. MSDN:
b. 微软出版的一本书《Programming Microsoft DirectShow for Digital Video and Television》,电子书下载地址:
http://www.infoxa.com/asp/book_file/xxnr_book_3459.htm
c. 微软提供的wince camera测试程序,路径

作者  | 2012-4-21 12:41:42 | 阅读(8) |评论(0) | 阅读全文>>

wince 6.0中编译camera测试程序

2012-4-20 15:34:04 阅读14 评论0 202012/04 Apr20

这几天在编译camera测试程序过程中颇经周折,记录如下:

MS在wince 6.0中提供了camera测试程序(C:\WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\CAMERA)。直接进入C:\WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW,执行build会有如下错误:
BUILD: [Thrd:Sequence:Type  ] Message
BUILD: [01:0000000161:ERRORE] C:\WINCE600\others\atl8\include\atlcore.h(694) : error C2039: 'CoDisconnectObject' : is not a member of '`global namespace''

作者  | 2012-4-20 15:34:04 | 阅读(14) |评论(0) | 阅读全文>>

wince build.exe 挂死

2012-4-20 12:12:42 阅读4 评论0 202012/04 Apr20

这两天碰到一个奇怪问题,用platform builder编译一个CameraApp时总出现挂死的情况。

wince build.exe 挂死 - leave - leave
 
哦,对了,是这样的,CameraApp由MS提供,原本在Private/test下,编译没有问题,我把它复制到platform下编译就有以上问题了。

经过多番对比、替换、排查,终于找到了症结。改变目录后,我用bash for windows中的工具(sed)对其中的sources文件作了替换,将换行方式由windows的\r\n改变成了\n。SB的build.exe不认识这种换行方式,于是挂了!

好了,要做的就是改回为windows换行方式了。在bash中执行:
find . -name sources | xargs dos2unix
find . -name sources | xargs sed -i 's,$,\r,g'

作者  | 2012-4-20 12:12:42 | 阅读(4) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 
 
 

广东省 深圳市 双子座

 发消息  写留言

 
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 
 
 
 
 
 
 
下载音乐盒  曲目表歌词秀
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
心情随笔列表加载中...
 
 
 
 
 
 
 
博友列表加载中...
 
 
 
 
 
 
 
列表加载中...
 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2012

   
创建博客 登录  
 关注