2005-07 月份文章 顯示方式:簡文 | 列表

July 28,2005

Prepare a handle for AddMediaSample


// prepare your handle
Handle bufHandle = NewHandleClear(0);
Ptr bufPtr = NewPtrClear(SIZE_YOU_WANT);


do some stuff to bufPtr


// put your ptr & handle together
PtrAndHand(bufPtr, bufHandle, outBytes);

// use your bufPtr here
AddMediaSample(.........);

// DO NOT forget to dispose your buffer ptr and handle
if(bufPtr)
DisposePtr(bufPtr);
if(bufHandle)
DisposeHandle((Handle)bufHandle);


Posted by toki_kanno at 16:39回應(0)引用(0)Quicktime

July 25,2005

MeidaType 要看清楚再填 ORZ 

m_pMedia = NewTrackMedia(
m_pTrack,   //theTrack
VideoMediaType,
//      MovieMediaType,      //mediaType
VIDEO_TIME_SCALE,    //timeScale,
NULL,    //dataRef
0);     //dataRefType

by 一個被卡了快一星期的笨蛋 ORZ


Posted by toki_kanno at 11:30回應(0)引用(0)Quicktime

July 22,2005

Quicktime TimeValue


Quicktime use the TimeValue to determine the baseline frame duration of a movie.
For example:

In a 24 fps movie. You could set the media TimeValue = 600 (means 1/600 sec)
The frame duration unit will be calculated as (600/24)*(1/600) (sec)


Posted by toki_kanno at 15:58回應(0)引用(0)Quicktime

Tips for saving Quicktime movie file


  • DO NOT call any disposeXXXX function before u call funcitons like AddMovieResource or UpdateMovieResorce .... blah blah blah.
  • Whole flow of creating and saving movie file:
    • Create a movie file
    • Create tracks
    • Create track medias
    • Begin edit
    • Prepare compression
    • Compress and add samples into track
    • End compression
    • End edit
    • Insert track into movie
    • Add movie into resource (write into file)
    • Dispose track medias
    • Dispose tracks
    • Dispose movie
    • Close movie file
  • To be countinued.

Posted by toki_kanno at 10:24回應(0)引用(0)Quicktime

July 21,2005

Debug directshow filter 的方法

In Visual Studio

  • [F5] (Start Debug)
  • Choose excutable: graphedit.exe
  • Generate your filter in graphedit, and do something.
  • Debug ....:P

Posted by toki_kanno at 9:25回應(0)引用(0)DirectShow

July 19,2005

Filter 收不到 sample 的問題解決了


今天請了 leader 來幫忙看,算是解決了
不是我的 filter 有問題,是Windows內建的某 filter 有問題 ORZ
接上那個問題 filter ,接在它後面的 filter 完全收不到訊號

不過後來發現那邊比較像是接錯了,手動換成正確的 filter 就沒問題了


Posted by toki_kanno at 14:15回應(0)引用(0)DirectShow

July 14,2005

嗯……Apple 果然和 Windows 不和 XD


Quicktime for Cocoa

明明就可以寫成這種方便使用的物件嘛 Q_Q
不過話說回來,用 Carbon 來寫的話應該也差不多就是了


Posted by toki_kanno at 10:05回應(0)引用(0)Quicktime

IPin::ConnectionMediaType

If the pin is connected, this method copies the media type into the AM_MEDIA_TYPE structure specified by pmt. The caller must free the media type's format block. You can use the MicrosoftR Win32R CoTaskMemFree function, or the FreeMediaType helper function.

If the pin is not connected, this method clears the media type specified by pmt and returns an error code.


Posted by toki_kanno at 9:48回應(0)引用(0)DirectShow

July 13,2005

Manual create a Quicktime movie file on Windows

雖然有 StanardPutFile 可以用,不過也會有想用程式設定檔名的時候

這時後……請不要被Document虎爛用 FSMakeFSSpec 之類的function XD

手動把 FSSpec各參數指定好就好了

FSSpec fss;

fss.vRefNum = 0;
fss.parID = 0;
sprintf((char*)fss.name, "%s", YOUR_FILE_NAME);

Err = CreateMovieFile(
   &fss,
   sigMoviePlayer,
   smSystemScript,
   createMovieFileDeleteCurFile | createMovieFileDontCreateResFile,
   &movFHandle,  // handle for movie file
   &movHandle);  // handle for movie


Posted by toki_kanno at 11:29回應(0)引用(0)Quicktime

July 11,2005

Quicktime for windows memo

Memo of Quicktime for Windows Develope:

  • Modify "QTML.h". (replace all 0xc4 -> 0x20. But why there are 0xC4s in the header file? Who knows, ask Apple.)
  • Include "QTML.h", this is header file for Quicktime Media Layer.
  • DO add qtmlClient.lib into you project.
  • Call InitializeQTML(0L); before u do any thing about Quicktime, or it will crash.Call TerminateQTML() before your application terminate.
  • For using Movie Tool Box, call EnterMovies(). Call ExitMovies() before application terminate.
  • to be continue...

Posted by toki_kanno at 14:06回應(0)引用(0)Quicktime
 [1]  [2]  [最終頁]