¥|¡B
¬ã¨s¹Lµ{
1.
³]³Æ¤Î¤u¨ã
2.
¨Ï¥ÎJava¦b¹ê¾÷¤W¶}µo
3.Smartphone
¤W¤§§Y®É¼vµªA°È
4.
SIP for J2ME
1.
³]³Æ¤Î¤u¨ã
back
³]
³Æ¡G
・¯«¹F Mio 8390 ¦æ°Ê¹q¸Ü
§@·~¨t²Î¡G¡@
Microsoft Smartphone 2003 ¡]¤º«Ø¤ä´©J2ME¡^
¶}
µo¤u¨ã¡G
・MicrosoftªºeMbedded Visual C++ 4.0(SP3)
・Microsoft SDK for Windows Mobile 2003-based Smartphones
¡]¤º§tSmartphone¼ÒÀÀ¾¹¡^
・Microsoft ActiveSync 3.7.1 ¡]¹q¸£©MSmartphone¶¡ªº³s½u¡^
・Microsoft ActiveSync Remote Display
¡]¥]§t¦bWindows Mobile Developer Power
Toys¤¤¡A¥i¥Ñ¹q¸£¸gActiveSyn³s½u¡A»·ºÝ±µ¦¬Smartphone¼ÒÀÀ¾¹ªºµe±¡^
・J2ME Wireless Toolkit 2.1¡@¡]§tJ2ME
APIs¡A¤Îjava¤â¾÷¼ÒÀÀ¾¹¡^
・Java Media Framework 2.1.1e¡@¡]javaªº¦h´CÅé³B²z¡^
・JSR180 Reference Implementation package
¡]Nokia¶}µoªºSIP API for J2ME¡A§tNokiaªº¤â¾÷¼ÒÀÀ¾¹¡^
2.
¨Ï¥ÎJava¦b¹ê¾÷¤W¶}µo
back
·í®³¨ì¹ê¾÷(¯«¹FMitac Mio
8390)«á¡A¥Ñ©ó¥H¤U¢²ÂI¦]¯À¡A§Ų́M©w±N¶}µo¤u¨ã¥ÑeMbedded Visual C++Âà´«¦ÜjavaªºJ2ME Wireless
Toolkit 2.1¡G
1.
desktop¤Îserver²Õ¨Ï¥Îjava§@¬°¶}µo»y¨¥¡G
¥Ñ©ójavaªº¸ó¥¥x¯S©Ê¡A¦]¦¹¨Ï¥Îjava¥i¦bdesktop¤Îserver²Õ¤w«Ø¥ßªº°ò¦¤W¶i¦æ¡A¥i´î¤Ö¶}µo®É¶¡¡A¨Ã¤è«K©Mdesktop¤Î
server²Õ¾ã¦X¡C
2.
eMbedded Visual C++ªº¤å¥ó¸ê°T¤£¨¬¡G
eMbedded Visual
C++¤å¥ó¤¤¡A¹ï©óGUI¤¶±ªº»¡©ú¤£¨¬¡A¥BSmartphone¤£¹³Ó¤H¹q¸£©ÎPDA¡A¨Ã¨S¦³¤å¦r¼Ò¦¡ªºconsole¤¶±¡A¦]¦¹µ{¦¡ªº¶Ç¿é¤Î¿ù»~°T®§
Ãø¥HÀˬd¡C¦ÓJ2ME¤WªºGUI³]p©MJ2SEÃþ¦ü¡A¸û©ö¨Ï¥Î¡C¥BJ2ME Wireless Toolkit
2.1¤¤ªºKToolbar¤Î¼ÒÀÀ¾¹¡A´£¨Ñ¸û«K§Qªº¶}µoÀô¹Ò¡C
3.
Smartphone¤â¾÷¹ïJ2MEªº¤ä´©¡G
¥]§t°ê¤ºSmartphone¼t°Ó¦b¤º¡A¤j³¡¤ÀSmartphone³£¦³¤º«Ø¹ïJ2MEªº¤ä´©¡C°£¦¹¤§¥~¡A¤]¦³²Ä¤T¤è·~ªÌ´£¨ÑSmartphone¤Wªº
J2MEÀô¹Ò¡C¦]¦¹¨Ï¥Îjava¶}µoSmartphoneµ{¦¡¡A¨Ã¤£·|³y¦¨µLªk¤ä´©ªº°ÝÃD¡C
3.Smartphone¤W¤§§Y®É¼vµªA°È back
§Y®É¼vµªA°Èªº³¡¤À¡A»Ýn¥Î¨ìªº§Þ³N¦³JMF¡BJ2ME¥H¤ÎRTP¡CJMF¬O¥HJ2SEÀô¹Ò«Øºcªº¡A¦ÓJ2ME«h¦³¦Û¤vªºMedia
API¡A¥s°µMicro Media API¡A¥¦ªº¬[ºc¬O¥HJMF¬°°ò¦¨Ó³]pªº¡A¤£¹L¦¹API¦p¦P¨ä¥LªºJ2ME
API¤@¯ë¸ûJ2SEªº¤p¡C¦]¦¹§Ú̬O¥ýµÛ¤â¬ã¨sJMF¡A«Ý¼ô±x¤F¥¦ªº¬[ºc¤§«á¦A±N¤§¥ÎMicro Media
API®M¥Î¨ìSmartphone¤W¡C¦P®É¡A§Ṳ́]¹ï¤â¾÷µ{¦¡ªº¼¶¼g¶i¦æ¬ã¨s¡C
¼½©ñ¼v¤ùÀÉ
JMFªº©x¤è¤å¥óªº»¡©ú¶¶§Ç¬O¥ý±q¦h´CÅéÀɮתº¼½©ñ¶}©l¡A¦]¦¹§Ú̪º¬ã¨s¤]´N¥ý±q³o¤è±¶}©lµÛ¤â¡C
¼½©ñ¦h´CÅéÀÉ®×¥i¥H¥ÎPlayer©Î¬OProcessor¡A¦b¦¹§Ú̥Ϊº¬OPlayer¡CPlayer©Ò¯à³B²zÀɮתº¯à¤O¸ûProcessor¨Óªº§C¡A¦ý
¬O¨ä¬[ºc¸û¬°Â²³æ¡A¦]¦¹©|¦b¤Jªù¶¥¬qªº§Ú̱ĥÎPlayer¨Ó¬ã¨s¡C<µù¤>
First Step¡GCreate Player
º¥ý¡AÀɮרӷ½¤]´N¬O©Ò¿×ªºData
Source¥²¶·¥Î¤@Ó¥s°µMediaLocatorªºª«¥ó¨Ó¡u¸Ë¡v¡C¨Ò¦p¡G
String MediaFile =
"http://static.fm.cdpa.nsysu.edu.tw/fun/fun03/FM073_Mouton.mpg";
URL MediaURL = new URL(MediaFile);
MediaLocator mediaLocator = new MediaLocator(MediaFile);
¤§«á¡A§ÚÌ«K¥i¥Î¦¹MediaLocator¨Ó³Ð³y¤@ÓPlayer¡C¨Ò¦p¡G
player = Manager.createPlayer(mediaLocator);
Managerª«¥ó¦bJMF¤¤¬Ot³d±N¸ê·½®³¨Ócreate¦pPlayer¡BProcessor¡BDataSourceµ¥ªº¤u¨ã¡A¦b¼¶¼gJMFªºµ{¦¡¤¤·|
±`¥Î¨ì¡C
¦¹®É¤@ÓPlayer¤w¸g»s§@¥X¨Ó¤F¡A±µ¤U¨Ó§Ú̧Q¥Îrealize()¤èªk±N¤§Realize¡C
Second Step¡GRealize Player
¨Ò¦p¡G player.realize();
¦brealize¹L«á¡APlayer´N¶i¤JRealizedª¬ºA¡C¶i¤JRealizedª¬ºA«áªºPlayer«K¥i¥H¶i¦æ¹Ï§Î¤¶±ªº«Øºc¤§Ãþªº³B²z¡C¹Ï§Î¤¶
±ªº«Øºc¬O§Q¥Îplayer.getVisualComponent()¤èªk¨ÓÂ^¨úplayer¤¤ªº¼v¹³¸ê·½¡A¦Ó¤¶±¤è±«h¬O§Q¥ÎJava
GUI¨Ó¦Û¦æ³]p¡C¥t¥~¡A·íPlayer¤@¦ý³Q³Ð³y¥X¨Ó«á¡A§ÚÌ¥i¥H¥ÎaddControllerListener()¤èªk¥H¤Î¹ê°µ
ControllerListenerª«¥óªº¤è¦¡¨Ó»s§@¨Ï¥ÎªÌ±±¨î¦¹Playerªº¤èªk¡C
Third Step¡GPrefetch player
¤Wz§Q¥ÎMediaLocator»s§@Playerªº°Ê§@¬Û·í©ó§â¿ý¼v±a©ñ¶i¿ý¼v¾÷·í¤¤¡A¦Óprefetch«h¬OÅý¿ý¼v¾÷ºÏÀY¥hŪ¨ú¼v±aªº°Ê§@¡C
player.prefetch();
prefetch«áªºPlayer«K¶i¤JPrefetchedª¬ºA¡C¦¹®ÉPlayer«K¥i¼½©ñ¼v¤ù¤F¡C
Fourth Step¡GStart player
§Q¥Îplayer.start()¤èªk¥i¥H¼½©ñ¼v¤ù¡Aplayer.stop()¤èªk«h¥i¥H°±¤î¼v¤ù¼½©ñ¡C
loading¡K
playing¡K
¼¶¼gPlayerµ{¦¡®Énª`·Nªº¤@ÂI¬O¡A¤@ÓData
Source¥u¯à»s§@¤@ÓPlayer©Î¬OProcessor¡A¦P®É±N¤@ÓData
Source¥Î§@¦hÓPlayer©ÎProcessorªº¨Ó·½±N¥u¦³¤@ÓPlayer©ÎProcessor¥i¥H°õ¦æ¡A¨ä¥Lªº·|¥X²{¿ù»~¡C
Â^¨úWeb Cam¤§¼v¹³
§Ú̬O±N¤Wz¼¶¼g¤§Playerµ{¦¡ªº¨Ó·½Àɧ令Web Camªº©ÒÂ^¨úªº¼v¹³¡C
Â^¨úWeb
Cam¼v¹³ªº¤èªk¡A«h¬O¥ý¥ÎJMFªºCaptureDeviceManager.getDeviceList()¤èªk¨Ó¹ï¹q¸£´£¥X§ä´MWeb
Camªºn¨D¡C¦b¦¹§Ú̬O´£¥XCaptureDeviceManager.getDeviceList(new
VideoFormat(¡§YUV¡¨))¡A¥un¬O²Å¦XÀɮרӷ½¬O¥HYUV½s½Xªº©PÃä¸Ë¸m¡A¹q¸£´N·|À°§ÚÌ©ñ¤JDeviceList¤¤¦s©ñ¡AData
Source´N¥Ñ¦¹Device List¤¤ªºWeb Cam¨ÓÂ^¨ú¡C
Web Cam
4. SIP for J2ME back
¸g¹L¬ãŪ¤å¥ó«á¡Aµo²{¤£½×¬OJ2SE©ÎJ2ME¡A³£¨S¦³SIPªº¬ÛÃöAPI¡C¦ý¦bSunªººô¶¤W¡A¦³¤@¥÷ÈÐWhite Paper¡G SIP and
the Java
PlatformsÈС]°Ñ¦Ò¸ê®Æ2¡^»¡©ú¤FÃö©ójava¹ïsipªº¤ä±Â¡A±N¥ý¥Ñ«È¤á¼t°Ó¶i¦æJSRªº³W®æ³]p¡A¤é«á¦A¾ã¦X¦Üjavaªº¼Ð·Ç¤¤¡C
JSR¡]Java Specification
Request¡^¡A¬OSunªº¦X§@¼t°Ó¡A¦]¬°¦Û¤vªº»Ý¨D¡A¦VSun´£¥X¼Ð·Çjava
API¤¤©Ò¨S¦³ªº·sAPI¬[ºc¡A©Î§ï¶i¦³ªºJSR¬[ºc¡C¦bÈÐWhite Paper¡G SIP and the Java
PlatformsÈФ¤´£¨ì¡A¦³¤TÓJSRpµe¡A¤À§O°w¹ïJ2SE¡BJ2EE¤ÎJ2ME³]pSIPªºAPI¡C¨ä¤¤J2MEªº³¡¤À¡A¬O¥ÑNokia©Ò¥D¾Éªº
ÈÐJSR 180: SIP API for J2MEÈС]°Ñ¦Ò¸ê®Æ3¡^¡C
ÂÇ¥ÑJSR
180¡A«K¥i¦bSmartphoneªºJ2MEÀô¹Ò¤¤¡A¶}µoSIPªºÀ³¥Îµ{¦¡¡C¥Ø«e¥»²Õ±MÃD¶i¦æ¨ì³oÓ³¡¤À¡A±µµÛ«K¬O¥[¤W§Y®É¼v¹³¶Ç¿é¥\¯à¡A¨Ã©M
server²Õªº¦P¾Ç¶i¦æ¾ã¦X¡C