1) to display a video file loaded in the MJPEG format. : Request you to kindly share an example MJPEG file which can be loaded . Since the sample MJPEG files i found online , the size was too large mostly.
first at all it is important to understand that Embedded Wizard Bitmap resources don't support MJPEG decoding at the runtime. Just in the moment when you generate code for the target system or you start the Prototyper, the MJPEG contents (similarly to all other image contents like PNG, BMP, etc.) are read and converted in the format appropriate for the target system. In other words, all frames stored within the MJPEG file are transcoded in a Embedded Wizard bitmap already during code generation.
Depending on the original MJEPG content, its JPEG compression, the resulting amount of data for the Bitmap resource can become significantly larger than the size of the original MJEPG file. The transcoding (the conversion) may also take a long time - the more frames the longer the conversion. Summarised, MJEPG should be used with prudence. It is not intended to add real videos to your application. It is intended for short animation sequence used for example in a splash screen, etc. On the other hand, it does not require any MJEPG decoder running in the target system.
Unfortunately, I have no MJPEG example to share with you. I searched in GOOGLE for "free mjpeg example". This lead me to a page where I was able to download a small MJPEG example for the resulting 640x360 pixel. How to use this MJEPG?
Step 1: Once you download the file, add it to the project. You can simply drag&drop the MJEPG file from Windows File Explorer to Composer window with an opened Unit (resources similarly to all other global entities may exist within Units only). See also: Add new bitmap resource.
Step 2: Within a GUI component where you want to display the MJEPG content, I added a new Image view:
Step 3: Move and resize the Imnage view as necessary.
Step 4: In Inspector window select in the Image view's property Bitmap the previously added bitmap resource (from step 1):
Just in the moment when the bitmap resource is used, Embedded Wizard starts the conversion. You see messages in the Log window. Note, this may take some time:
Step 5: Also modify the property Animated of the Image view top the value true. This is essential to allow the Image view to playback the converted MJPEG contents:
Step 6: Now start the Prototyper by pressing the key F5.
This will again cause the MJPEG to be converted. As soon as the operation is done, the Prototyper displays the animated contents.
Please note: per default the new aded Bitmap resource stores the image contents in the format Native. Depending on your target system and the color format used there, this may occupy a lot of memory. In case of contents imported from MJEPG we recommend to change the attribute Format of the corresponding Bitmap resource to the value Index8:
2) to display a sequence of JPEG images with Framedelay : I did read the documentation and configured as mentioned with a framedelay of 100msec. But the images doesnot change after framedelay .
Difficult to say what is wrong. Have you set the property Animated of the Image view to the value true? See also: Control the playback of an animated bitmap resource.
A further hint: all above explained functionality is intended to display short animation sequences. If you expect a 'real' video player, you have to add a MJPEG decoder to your software in the target system and decode MJPEG contents at the runtime. Then you could even play videos from an SD card, etc.
Does it help you further?