2012/06/20

NSIS 런타임에 32bit 시스템 인지 64bit 시스템 인지 감지하기

; Check OS Platform
System::Call "kernel32::GetCurrentProcess() i .s"
System::Call "kernel32::IsWow64Process(i s, *i .r0)"
StrCmp $0 '0' Win32 Win64
Win32:

Goto EndCheck
Win64:

EndCheck:



2010/07/09 - [Com. Story] - NSIS 이용한 Install 할 때 32bit 시스템 인지 64bit 시스템 인지 감지하기

<

Original Post : http://neodreamer-dev.tistory.com/666

SayRadio Windows Gadget



인터넷 서핑 중 SayRadio를 보고 블로그등의 웹페이지에 삽입할 수 있어 이를 Windows Gadget에 추가해 보았다.


작업은 그리 어렸지 않았다. Say Radio(http://saycast.sayclub.com/saycast/index/widget/sayclub)에서 Blog에 삽입하는 코드를 가져와서 Gadget의 본체에 넣어 주기만 하면 된다.


보기 좋게 크기 맞추고 스크롤바를 감춘 것이 모든 작업이다.


이 Gadget을 바탕화면에 추가하면 아래와 같이 보여진다.





2012/05/23 - [Dev Story/Tips] - Windows gadget 만들기 - Hello Widget

<

Original Post : http://neodreamer-dev.tistory.com/665

2012/06/19

HTML5 Video

HTML5에 Multimedia를 위해 Video element가 추가 되었다. video 태그를 이용하여 쉽게 웹페이지에서 동영상을 보여 줄 수 있다.



보여줄 수 있는 코덱은 MPEG4, WebM, Ogg 가 있다. Audio 와 마찬가지로 표준이 없다. 브라우저마다 지원하는 코덱이 서로 달라서 하나의 포맷으로 모든 브라우저을 대응할 수 없다. Mpeg4와 Ogg정도 구성을 해야 대부분의 브라우저를 대응할 수 있다.



video 태그 속성


  • autoplay

    value - autoplay

    페이지 로딩을 마치고 동영상을  자동으로 재생할 지 여부를 설정한다. "autoplay"를 설정할 경우 동영상을 자동재생한다.

     

  • controls

    value - controls

    동영상 재생을 제어할 제어 컨트롤을 보여줄지를 설정한다. "controls"로 설정한 경우 화면에 재생 트랙과 Volume 을 조정할 수 있는 컨트롤을 보여준다.

     

  • height

    value - pixels

    video player 높이를 설정. 실제 영상의 비율은 유지되며 재생한다.

     

  • width

    value - pixels

    video player 폭을 설정. 실제 영상의 비율은 유지되며 재생한다. 

     

  • loop

    value - loop

    반복 여부를 설정한다. "loop" 설정시 재생 완료 후 반복해서 재생한다.

     

  • muted

    value - muted

    동영상 재생시 소리 재생 여부를 설정한다. "muted"를 설정한 경우 소리는 재생되지 않는다.

     

  • poster

    value - URL

    동영상을 불러오는 동안에 표시하는 이미지 이다. 미리 읽기가 끝나 재생이 시작되거나 사용자가 클릭한 경우 poster 이미지는 사라진다.

     

  • preload

    value - auto, metadata, none

    동영상 데이터의 미리읽기를 할지 여부를 설정한다. "auto"로 설정한 경우 페이지 로딩이 끝나고 동영상 데이티를 읽어 들인다.

     

  • src

    value - URL

    재생할 동영상 주소를 설정한다.

     




video 태그는 아래 source와 track element를 포함할 수 있다.

source는 재생하고자 하는 동영상의 정보를 담고 있으며 아래 와 같은 속성을 포함 한다.

source tag 속성


  • media

    value - media_query

    Audio 리소스의 type 대한 정의라 하는데 거의 사용이 되지 않는 듯 하다.




  • src

    value - URL

    재생하고자 하는 파일의 경로를 지정한다.




  • type

    value - MIME_type (video/mp4, video/ogg, video/webm)

    재생하고자 하는 파일의 형식을 지정한다.

    video/mp4 : MPEG 4 (H264 video + AAC audio codec)

    video/ogg : Ogg (Theora video + Vorbis audio codec)

    video/webm : WebM (VP8 video codec + Vorbis audio codec)

     


 track은 자막에 대한 설정을 아래와 같은 속정을 포함 한다.


  • default

    value - default

    기본 자막 설정

     

  • kind

    value - captions, chapters, descriptions, metadata, subtitle

    자막 종류 설정

     

  • label

    value - text

    기본 자막 설정

     

  • src

    value - URL

    기본 자막 설정

     

  • srclang

    value - language_code (en, ko...)

    기본 자막 설정

      


자막의 경우 WebVTT 형식을 지원한다고 하는데 이에 대해서는 좀 더 정보를 알아봐야겠다.



아래 코드는 간단하게 동영상을 재생하는 코드이다.

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE> HTML5 Video </TITLE>
</HEAD>
<BODY>
<video controls="controls">
<source src="Friends - [1x01] - The One where Monica gets a Roommate.mkv" type="audio/mpeg" />
Your browser does not support the video element.
</vedeo>
</BODY>
</HTML>



 

&

Original Post : http://neodreamer-dev.tistory.com/664

2012/06/18

HTML5 Audio

HTML5 에서는 Audio를 재생할 수 있는 <audio> 태그를 지원해 별도의 작업없이 바로 Audio를 재생할 수 있다.

HTML5 에서 지원하는 Audio 형식은  .mp3 .wav .ogg .m4a 이지만 모든 형식을 모든 브라우저에서 지원하지는 않는다 그렇다고 표준이 정해져 있어 모든 브라우저에서 재생되는 형식도 없다.



ogg와 mp3를 함께 구성해 놓으면 거의 모든 브라우저에서 재생이 가능 하다.

서로다른 형식의 파일을 모두 source 태그에 포함해 두면 지원되는 형식이 재생이 된다.



audio tag는 5가지 속성과 1개의 하위 항목을 가질 수 있다.



audio tag 속성


  • autoplay

    value - autoplay

    자동 재생 여부를 설정 한다. "autoplay"로 설정한 경우 페이지 로딩 후 mp3를 재생한다. 




  • controls

    value - controls

    재생 동작을 조작할 수 있는 제어화면 출력 여부를 설정 한다. Track 및 Volume을 조정할 수 있다. 




  • loop

    value - loop

    재생 완료 후 다시 재생 여부를 설정 한다. "loop"가 설정된 경우 자동으로 다시 재생을 한다. 




  • preload

    value - auto, metadata, none

    재생 해야 할 Audio를 미리 읽어들일지 여부를 설정 한다. "auto"로 설정한 경우 페이지 로딩 후 미리 읽기를 한다. 




  • src

    value - URL

    재생하고자 하는 Audio 파일의 경로를 설정 한다. 



  

Audio tag 의 하위 항목 으로 <source> 를 포함 할 수있다.

<source>는 재생을 하고자 하는 Audio 파일에 대한 자세한 정보를 담고 있다. <audio> 의 속성에 src 있어 지정을할 수 있지만 Audio 파일의 형식을 지정할 수 없어 <source>를 사용하는 것이 좋다.



source tag 속성


  • media

    value - media_query

    Audio 리소스의 type 대한 정의라 하는데 거의 사용이 되지 않는 듯 하다.




  • src

    value - URL

    재생하고자 하는 파일의 경로를 지정한다.




  • type

    value - MIME_type (audio/aac, audio/mp4, audio/mpeg, audio/ogg, audio/wav, audio/webm)

    재생하고자 하는 파일의 형식을 지정한다.





아래 HTML5 소스는 간단하게 MP3 파일을 재생하는 코드이다. audio 태그의 controls 속성만 부여하여 화면에 보이도록 하였다.

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE> HTML5 Audio </TITLE>
</HEAD>
<BODY>
<audio controls="controls">
<source src="rainymood30a.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
</BODY>
</HTML>

 



이 파일을 Chrome 에서 불러오면 아래와 같은 재생 화면을 볼 수 있다.

&

Original Post : http://neodreamer-dev.tistory.com/663

2012/06/17

HTML5 이건 뭐지?

요 몇일 HTML5가 뭔지 거들떠 보고 있다.

띠엄띠엄 거들떠 보고는 있는데 당최 뭐가 뭔지 모르겠다.


몇 가지 거들떠 본 바로는 문서를 구조적으로 구성할 수 있는 태그들이 추가되고 확장된 태그들도 있고 CSS로 대채할 수 있는 문자를 꾸미는 태그들을 지원하지 않는다 한다.


구성에 필요한 태그들 이외에 멀티미디어 및 Offline API가 추가 되었다. 

HTML5가 XHTML을 포함하는지 태그 사용 규약이 더 엄격해진 것 같다. 태그 사용하면서 닫는 태그 하나 빠뜨린 것으로 페이지가 정상 출력되지 않았다.


앞으로 HTML5를 틈틈이 띠엄띠엄 거들떠 보려 하는데 만만치 않은 녀

Original Post : http://neodreamer-dev.tistory.com/662

2012/06/15

SQLite Release 3.7.13

SQLite 가 버전업을 하였다.

이번 배포판부터는 Metro style 응용프로그램을 위한 WinRT API 를 사용한 Dll 파일을 배포하고 있다.




SQLite Release 3.7.13 On 2012-06-11 (3.7.13)


  • In-memory databases that are specified using URI filenames are allowed to use shared cache, so that the same in-memory database can be accessed from multiple database connections.

  • Recognize and use the mode=memory query parameter in URI filenames.

  • Avoid resetting the schema of shared cache connections when any one connection closes. Instead, wait for the last connection to close before reseting the schema.

  • In the RTREE extension, when rounding 64-bit floating point numbers to 32-bit for storage, always round in a direction that causes the bounding box to get larger.

  • Adjust the unix driver to avoid unnecessary calls to fchown().

  • Add interfaces sqlite3_quota_ferror() and sqlite3_quota_file_available() to the test_quota.c module.

  • The sqlite3_create_module() and sqlite3_create_module_v2() interfaces return SQLITE_MISUSE on any attempt to overload or replace a virtual table module. The destructor is always called in this case, in accordance with historical and current documentation.

  • SQLITE_SOURCE_ID: "2012-06-11 02:05:22 f5b5a13f7394dc143aa136f1d4faba6839eaa6dc"

  • SHA1 for sqlite3.c: ff0a771d6252545740ba9685e312b0e3bb6a641b



SQLite Homepage&

Original Post : http://neodreamer-dev.tistory.com/661

2012/06/11

AnkhSVN 2.3.11269 Released

변경사항

  • Compiled against Subversion 1.7.5.

  • Support for Visual Studio 2012 RC, including a UI refresh.

  • Removed old style file selection control, replacing it with the common selection dialog

  • Many performance improvements in AnkhSVN and SharpSvn (Several privately reported cases via CollabNet and their partners)

  • Directly record copies and moves in Subversion instead of moving files around via temporary locations

  • Disable commands that could cause unrelated reloads files during opening the solution, building and debugging

  • Enable the navigation bar in the annotate viewer of Visual Studio 2010 and 2012

  • Resolve a focus stealing issue in several Sql server related project types, by using a slower glyph update for these projects

  • Improve stability of the Visual Studio Class View in Visual Studio 2010, when the Solution Navigator is not installed

  • Show a VS wait dialog when we are slowing down Visual Studio for too long on Pending changes initialization

  • Fix copy recording directly below the working copy root

  • Fix 'Scc Files' / 'Scc Excluded' handing on C++ projects in Visual Studio 2010 and later

  • Add option to immediately import a project on adding it to Subversion, to avoid a double commit

  • Properly mark new files over deleted files as pending changes

  • Record and reload recent urls in the add to subversion dialog





AnkhSVN Homepage

AnkhSVN Download Page&

Original Post : http://neodreamer-dev.tistory.com/660

2012/06/04

OpenCV 2.4.1 Released







2.4.0 에서 변경된 사항들

  • The GPU module now supports CUDA 4.1 and CUDA 4.2 and can be compiled with CUDA 5.0 preview.

  • Added API for storing OpenCV data structures to text string and reading them back:
    //==== storing data ====
    FileStorage fs(".xml", FileStorage::WRITE + FileStorage::MEMORY);
    fs << "date" << date_string << "mymatrix" << mymatrix;
    string buf = fs.releaseAndGetString();

    //==== reading it back ====
    FileStorage fs(buf, FileStorage::READ + FileStorage::MEMORY);
    fs["date"] >> date_string;
    fs["mymatrix"] >> mymatrix;


  • cv::calcOpticalFlowPyrLK now supports precomputed pyramids as input.

  • Function signatures in documentation are made consistent with source code.

  • Restored python wrappers for SURF and MSER.

  • 45 more bugs in our bug tracker have been fixed




OpenCV의 행보가 자꾸만 빨라지는 것 같다. 모바일 플랫폼에 대한 대응도 잘 이루어지고 있고 로드 맵 상으로는 올 해 안으로 2.5 버전이 나올 것 같다.

하지만 매번 컴파일을 해서 써야해 그만큼 빈번하게 빌드해야해서 좀 귀찮아 질 것 같다.



현재 OpenCV는 다양한 버전의 Visual C++에 대한 .Dll과 .Lib 파일을 함께 배포하고 있지만 32비트와 64비트가 구분이 되지 않아 불편하다. 32비트 버전과 64비트 버전을 같은 경로에서 실행할 수 없는 문제가 있고 .Dll 이나 .Lib 파일 이름으로 32비트와 64비트를 구분할 수 없는 문제가 있다. 그래서 매번 다시 빌드해서 사용하고 있다. 이 문제가 해결이 되면 새로운 버전이 나올 때마다 다시 빌드할 필요가 없을 것 같은데 아쉽다.



http://code.opencv.org

http://sourceforge.net/projects/opencvlibrary/

Original Post :
http://neodreamer-dev.tistory.com/659

2012/06/01

[MFC] System Menu에 "About..." 메뉴 추가하기

DialogBased 응용프로그램에서 시스템 메뉴에 사용자 메뉴를 추가하기 위해 찾은 정보이다.



////////////////////////////////////////////////////////////////////////////////
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}

<

Original Post : http://neodreamer-dev.tistory.com/658