CTransformFilter::DecideBufferSize
ALLOCATOR_PROPERTIES Structure
和CMediaType::SetSampleSize有關
如果沒對映好,送到pin腳的資料就會少
2007年12月13日 星期四
DirectShow MediaType
AM_MEDIA_TYPE http://msdn2.microsoft.com/en-us/library/aa930737.aspx
typedef struct _MediaType{
GUID majortype;
GUID subtype;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
ULONG lSampleSize;
GUID formattype; .
IUnknown* pUnk;
ULONG cbFormat;
/* [size_is] */ BYTE __RPC_FAR* pbFormat;
} AM_MEDIA_TYPE;
formattype
Registered (GUID) format type.
pbFormat
Pointer to the format section of the media type. The layout of this is determined by the format type GUID.
-> 指向這個media type的structure
CMediaType::SetFormatType -> specifies the format type
CMediaType::SetFormat -> initializes the format block.
typedef struct _MediaType{
GUID majortype;
GUID subtype;
BOOL bFixedSizeSamples;
BOOL bTemporalCompression;
ULONG lSampleSize;
GUID formattype; .
IUnknown* pUnk;
ULONG cbFormat;
/* [size_is] */ BYTE __RPC_FAR* pbFormat;
} AM_MEDIA_TYPE;
formattype
Registered (GUID) format type.
pbFormat
Pointer to the format section of the media type. The layout of this is determined by the format type GUID.
-> 指向這個media type的structure
CMediaType::SetFormatType -> specifies the format type
CMediaType::SetFormat -> initializes the format block.
2007年12月6日 星期四
RTSP 簡圖
Client Server
| |
| ---- DESCRIBE ---> |
| <----------------- |SDP, video type, length...
| |
| ----- SETUP -----> |client address, port
| <----------------- |server address, port
| |
| ------ PLAY -----> |
| <----------------- |
| |
| <----------------- |
| Media Stream | RTP on UDP
| <----------------- |
| |
| ----- PAUSE -----> |
| <----------------- |
| |
| ---- TEARDOWN ---> |
| <----------------- |
| |
Real Time Streaming Protocol from Wikipedia
2007年11月15日 星期四
MPEG-4 AAC Format
AAC封裝主要分三類
AAC的SDP裡的
AudioSpecificConfig: (ISO/IEC 14496-3, Table1.13)
- Multiplex (LATM, M4Mux)
- Storage(MPEG-4 FileFormat, ADIF)
- Transmission (ADTS, LOAS)
AAC的SDP裡的
AudioSpecificConfig: (ISO/IEC 14496-3, Table1.13)
5 bits: object type4 bits: frequency index
if (frequency index == 15)
24 bits: frequency
4 bits: channel configuration
1 bit: frame length flag
1 bit: dependsOnCoreCoder
1 bit: extensionFlag
ref:
2007年10月16日 星期二
2007年10月15日 星期一
找不到strstrea.h
在Visual Studio 2002的project,拿到Visual Studio 2005去build會有以下錯誤訊息:
fatal error C1083: Cannot open include file: 'strstrea.h'好像是Visual Studio 2003後就不用這個檔案了,所以要把strstrea.h改成strstream
2007年10月5日 星期五
在Ubuntu Linux裡build FAAD2
在Ubuntu 7.04 (Feisty Fawn)裡build faad2-2.5遇到一些問題:
Ubuntu裡要先裝
/faad2/configure.in
/faad2/plugins/xmms/src/Makefile.am
/faad2/plugins/Makefile.am
執行
How to compile ffmpeg on Mac and Linux
Ubuntu裡要先裝
sudo apt-get install autoconf改幾個和BMP有關的檔(不然configure不過)
sudo apt-get install automake
sudo apt-get install libtool
/faad2/configure.in
/faad2/plugins/xmms/src/Makefile.am
/faad2/plugins/Makefile.am
執行
autoreconf -vif參考:
./configure --with-mp4v2
make
sudo make install
How to compile ffmpeg on Mac and Linux
2007年10月3日 星期三
Windows CE的build
Windows CE的build都是從BldDemo.bat產生run-time image.
其中依序呼叫:
1. Cebuild.bat
2. Buildrel.bat
3. Makeimg.exe
參考: Build flow in BldDemo.bat
但是MSDN的Build phases畫的圖很怪,要先compile才sysgen?
Checko's Blog寫的更好
其中依序呼叫:
1. Cebuild.bat
2. Buildrel.bat
3. Makeimg.exe
參考: Build flow in BldDemo.bat
但是MSDN的Build phases畫的圖很怪,要先compile才sysgen?
Checko's Blog寫的更好
2007年10月1日 星期一
[WindowsCE小技巧] Build出來的東西沒有在image裡
好像常會發生,都是prebuild搞的鬼...
- Copy your binary, symbols, map into %_FLATRELEASEDIR%
- Find out what package your file is in
- Cd %_FLATRELEASEDIR%
- "findstr /i [your filename] *.bsm.xml" Ex: findstr /i nk.exe *.bsm.xml
- This should return a package's xml file, for example oemxipkernel.bsm.xml. This tells you that it's in the OS package.
- Find the prebuilt package and delete it
- cd prebuilt
- del oemxipkernel.cab.pkg
- Makeimg
2007年9月30日 星期日
2007年9月21日 星期五
Windows Media Player與副檔名
Windows Media Player在播ASF, MP3 WMA和WMV時,不是用DirectShow(不確定PC上的是不是也一樣)。硬要用DirectShow的話,要改註冊檔:
[HKEY_CLASSES_ROOT\Media Type\Extensions\.xxx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.xxx]
其中Runtime和和Permissions請看: File Name Extension Registry Settings
這裡也要加,不過好像也沒差...
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\MLS\Extensions]
[HKEY_CLASSES_ROOT\Media Type\Extensions\.xxx]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.xxx]
其中Runtime和和Permissions請看: File Name Extension Registry Settings
這裡也要加,不過好像也沒差...
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\MLS\Extensions]
2007年9月20日 星期四
Windows CE Build筆記 (未完)
wince.bat
blddemo.bat invokes: sysgen, build, buildrel, and makeimg.
first 2 are invoked indirectly through cebuild.bat
Generating WinCE System: Sysgen.bat
sysgen.bat executes cesysgen.bat, where the modules and components.
include modules
CE_MODULES=coredll filesys nk
component included in a module
set COREDLL_COMPONENTS=coremain coreloc lmem thunks
BIB(Binary Image Builder Files) files specify the name and location of modules that must be included in the image.
filesys module initializes the Windows registry.
blddemo.bat invokes: sysgen, build, buildrel, and makeimg.
first 2 are invoked indirectly through cebuild.bat
Generating WinCE System: Sysgen.bat
sysgen.bat executes cesysgen.bat, where the modules and components.
include modules
CE_MODULES=coredll filesys nk
component included in a module
set COREDLL_COMPONENTS=coremain coreloc lmem thunks
BIB(Binary Image Builder Files) files specify the name and location of modules that must be included in the image.
filesys module initializes the Windows registry.
2007年9月12日 星期三
WindowsCE的printf
WindowsCE裡有些值用printf印不出來,要用DEBUGMSG, RETAILMSG, 或ERRORMSG
等巨集,NKDbgPrintfW
http://www.pocketpcjunkies.com/Uwe/Forum.aspx/wince-pb/806/May-I-print-message-via-serial-port-instead-of-using-RETAILMSG
等巨集,NKDbgPrintfW
The debug printf messages are invaluable at some stages of development. However, we found drawbacks when using the non-Pocket PC reference platform. Basically, ActiveSync and EVC Remote Tools were frustratingly unreliable. After a successful build and download of a Rawether sample application and the PCANDIS4 driver the EVC Remote Tools may simply refuse to connect again until the PDA was rebooted.
http://www.pocketpcjunkies.com/Uwe/Forum.aspx/wince-pb/806/May-I-print-message-via-serial-port-instead-of-using-RETAILMSG
2007年9月11日 星期二
2007年9月10日 星期一
要連WindowsMobile6請先裝SP1
用Visual Studio 2005的工具Remote Registry Editor連不到WindosMobile 6的機器,沒有錯!又要裝VS 2005 Service Pack 1 (SP1)。
2007年9月7日 星期五
OpenMAX API
OpenMAX是一套Khronos Group 推出的跨平台多媒體API,由上到下分為三層:Application Layer(AL)、(Integration Layer) IL和Development Layer (DL),免收權利金。目前有六個部門在管理:
(1)帶頭 - TI
(2) AL - Nvidia
(3) IL - TI
(4) Video DL - Motorola
(5) Still Image DL - ARM
(6) Speech/Audio - Intel。
IL顧名思義就是可以整合各種media framework之下,如Microsoft DirectShow、SDL、Linux GStreamer、Symbian MDF和MMAPI (JSR 135),我猜IL應該就像DirectShow的Filter。DL介於個codecs和CPU、DSP或硬體加速之間。
示意圖:
-----------------
| Application |
| OpenMAX AL |
| OpenMAX IL |
| Codecs |
| OpenMAX DL |
| Physical H/W |
-----------------
OpenMAX白皮書 - OpenMAX和DirectShow、Gstreamer和MDF的整合。
(1)帶頭 - TI
(2) AL - Nvidia
(3) IL - TI
(4) Video DL - Motorola
(5) Still Image DL - ARM
(6) Speech/Audio - Intel。
IL顧名思義就是可以整合各種media framework之下,如Microsoft DirectShow、SDL、Linux GStreamer、Symbian MDF和MMAPI (JSR 135),我猜IL應該就像DirectShow的Filter。DL介於個codecs和CPU、DSP或硬體加速之間。
示意圖:
-----------------
| Application |
| OpenMAX AL |
| OpenMAX IL |
| Codecs |
| OpenMAX DL |
| Physical H/W |
-----------------
OpenMAX白皮書 - OpenMAX和DirectShow、Gstreamer和MDF的整合。
2007年9月6日 星期四
WindowsCE介紹
WinHEC 2004裡的Embedded Design: Architecture and Engineering Advances有佷多WindowsCE架構的投影片。
Windows Mobile 5和6的比較
最主要好像是Exchange、Windows Live和一些messaging的東西...
from: Jason Langridge's WebLog
Windows Mobile 5和6的比較
最主要好像是Exchange、Windows Live和一些messaging的東西...
from: Jason Langridge's WebLog
Windows CE5.0不支援midi的DirectShow Filter
看到這個才恍然大悟:
Effective with Windows CE 5.0, Windows CE no longer provides a MIDI filter for DirectShow. Third party solutions for MIDI support through DirectShow are still possible.DirectShow Migration
用到dynamic_cast運算子時要加/GR
程式build可以過,但是run到dynamic_cast運算子時,會出現access deny(coredll.dll),然後hang住。
Sources檔要要加上/GR的compile option才可以。
讀更多: Compiler Options照字母排
Sources檔要要加上/GR的compile option才可以。
讀更多: Compiler Options照字母排
訂閱:
文章 (Atom)