Skip to main content

javacall

3 replies [Last post]
tusharj9
Offline
Joined: 2005-09-22
Points: 0

Hi,
What is the main use of "javacall" module?
I was trying to build jsr135 with phoneME on linux . As I understand linux specific drivers are not available with phoneME so it may not work. How can I use javacall things with one specific jsr such as 135 ?

Regards,
Tushar

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tusharj9
Offline
Joined: 2005-09-22
Points: 0

Thanks for the help Andrey.
I was trying to build jsr135 with stub implementation for native layer on linux . xilongpei'ssuggestion gives also good work around ..but i guess for that i'll have to change some make files to use win32 files in linux build.

aap031
Offline
Joined: 2006-10-18
Points: 0

Hi Tushar,

Javacall is a porting API. The component in repository contains API itself as well as win32 implementation. Unfortunately it seems you cannot make use of it on linux because:
- win32 implementation uses DirectSound API so you cannot reuse code from there
- and you cannot use only part of it - once you use it you should use it for all functionality - you cannot mix porting API implementations. And currently we have no javacall implementation for linux at all

Regards,
Andrey

xilongpei
Offline
Joined: 2007-02-24
Points: 0

the following is the APIs that I should implemented in Elastos (an OS used in TD-SCDMA) when I porting JSR135.
perhaps this work will be some usefull to you.(sorry, some in Chinese)

--------------------------------------------------------------------------------------------
放音部分(mmaudio.c)
序号 Win32函数 功能
1 MCIWndCreate
pHandle->hWnd = MCIWndCreate(GET_MCIWND_HWND(), GetModuleHandle(NULL),
MCIWNDF_NOERRORDLG | MCIWNDF_NOMENU | MCIWNDF_NOPLAYBAR,
pHandle->fileName);
2 MCIWndSetTimeFormat
3 MCIWndGetLength
4 MCIWndGetPosition
5 MCIWndClose
6 MCIWndDestroy
7 MCIWndSeek
8 MCIWndPause
9 timeSetEvent
10 timeKillEvent
11 MCIWndResume
12 MCIWndPlay

照像部分(camera capture interfaces - capture://video ,mmcamera.c)
序号 Win32函数 功能
1 capCreateCaptureWindow
pHandle->hCapWnd = capCreateCaptureWindow(_T("Sun_Java_Cap_Window"),
wsVisible | WS_CHILD | WS_CLIPSIBLINGS, x + X_SCREEN_OFFSET, y + Y_SCREEN_OFFSET, w, h, GET_MCIWND_HWND(), 0xffff);
2 capDriverConnect ret = capDriverConnect(pHandle->hCapWnd, DEFAULT_CAPTURE_DRIVER);
3 capSetCallbackOnFrame
4 capDriverDisconnect
5 capPreview
6 capGetVideoFormatSize
7 capGetVideoFormat
8 capSetVideoFormat
9 capGrabFrameNoStop
10 capPreviewScale capPreviewScale(pHandle->hCapWnd, TRUE);
11 capPreviewRate capPreviewRate(pHandle->hCapWnd, DEFAULT_PREVIEW_RATE);

MIDI部分(non-blocking JTS player, mmtone.c)
序号 Win32函数 功能
1 midiOutShortMsg midiOutShortMsg function sends a short MIDI message to the specified MIDI output device.

视频部分(mmvideo.c),SUN的开源工程中未实现。
序号 Win32函数 功能
1

录音部分(audio recording - capture://audio,mmrecord.c)
序号 Win32函数 功能
1 mmioCreateChunk
2 mmioWrite mmioWrite(hRecord->hFile, buffer, size);
3 mmioAscend
4 mmioFOURCC
5 mmioOpen HMMIO* hFile = mmioOpen((LPSTR)name, NULL, MMIO_CREATE|MMIO_WRITE|MMIO_EXCLUSIVE|MMIO_ALLOCBUF);
6 mmioClose mmioClose(hRecord->hFile, 0);
7 waveInOpen This function opens a specified waveform input device for recording.
mmReturn = waveInOpen(&hRecord->hWAVEIN, WAVE_MAPPER, &format, (DWORD)waveInProc, (DWORD)hRecord, CALLBACK_FUNCTION);
8 waveInClose This function cleans up the preparation performed by waveInPrepareHeader. The function must be called after the device driver fills a data buffer and returns it to the application. You must call this function before freeing the data buffer.
9 waveInStart This function starts input on the specified waveform input device.

振动部分(anc_win_vibrate.c)
序号 Win32函数 功能
1 anc_start_vibrate * @note start vibrate is not implemented, as planned.
* @parameter dur duration of the vibrate period in
* microseconds
* @return KNI_FALSE: if this device does not support vibrate
*/
jboolean anc_start_vibrate(int dur)
{
REPORT_CALL_TRACE1(LC_CORE, "LF:STUB:anc_start_vibrate(%d)\n", dur);

/* Suppress unused parameter warning */
(void)dur;

/* Not yet implemented */
return KNI_FALSE;
}
2 anc_stop_vibrate * @note stop vibrate is not implemented, as planned.
* @return KNI_FALSE: if this device does not support vibrate
*/
jboolean anc_stop_vibrate(void)
{
REPORT_CALL_TRACE(LC_CORE, "LF:STUB:anc_stop_vibrate()\n");

/* Not yet implemented */
return KNI_FALSE;
}