Hello k10183131,
regarding your questions:
(1)Will "Applet" automatically draw the data output to the "Applet" frame(Canvas?) according to the rect range returned by OnUpdate
after obtaining the Xbitmap by running the function OnGetBitMap?
Yes, Applet will draw the bitmap area returned by OnUpdate() of the bitmap returned by OnGetBitmap().
Please note, that OnUpdate() is triggered by ProgressTimer. Its default period is 100ms. To increase update frequency, please override ProgressTimer and set another period.
(2)Error code 335 will appear from time to time during operation.
This should never happen! It means, that the heap structure of Embedded Wizard is corrupted.
One reason for that could be, that Embedded Wizard methods are called from another thread, which is not allowed!
Even calls like EwPrint(), EWAlloc() of EwLockBitmap() are not allowed from other threads.
I assume, that VLC and its callbacks are running in a separate thread.
(3)In addition to getting bitmap directly from VLC decoding call backs and transform to XBitmap type manually,
it seems that VLC functions can directly specify the rendering window.
If I can get the specific window id (XWindow) of applet,
then maybe it can achieve the rendering of the video more effectively.
I think one possible solution could be to lock one of the video frame bitmaps and pass the resulting pixel buffer to VLC for rendering. After VLC has rendered one frame this video frame bitmap can be unlocked again within the Embedded Wizard thread and returned by OnGetBitmap();
I assume, that color format RGBA8888 is used. So one reason, that the video frames are still not visible could be that the alpha channel of each pixel is set to 0 by VLC.
Regards,
Martin