Create a Web-Enabled Digital Photo Frame: Step 8

Last modified by Microchip on 2023/12/15 17:33

Configuring Project Settings for Streaming Media

There are some project settings to be set in the Microchip Graphics Composer (MGC) to display media using streaming.

Open the Microchip Graphics Composer plugin, open the project provided, and go to Project Settings.

Figure: Opening the MGC Project Settings

Streaming Library Options

The streaming Library options can be found in the Library menu item in Project Settings. The streaming support can be enabled from there, and for JPEG files we need to increase the cache size for faster decoding. The MCU in use does not have too much memory, so setting this to 32 KB works well.

Also, to debug the memory allocator in Legato, Debug Asserts can be used. This will make the graphics stop in a while loop in case we exceed the memory put to our disposal, which is useful while debugging the application.

The PNG decoder needs lots of memory for pictures, it is better to be used for small, embedded icons in Flash and not for streaming. The demo will have this option disabled.

Also, this demo does not use the Monochrome Image Decoder, so this option will be disabled.

Figure: Microchip Graphics Composer – Project Library Settings

In the Project Settings, go to the Memory option and disable the Use Fixed Memory Pools.

The user can enable the Debug Allocator in Debug mode to debug when the memory is exceeded.

Figure: Microchip Graphics Composer – Project Memory Settings

The display size is 480x272 pixels, and the color format is RGB565 (16-bit), this means that a scratch buffer of 480*272*2 bytes (255 KB) and the renderer would need a scratch buffer of this size to show the picture in one shot. Using half of it will display the picture half by half. We can set the Scratch Buffer Size to 256 to have a so-called round number.

Figure: Microchip Graphics Composer – Project Renderer Settings

Back to top