BRT Community
General Category => Discussion - EVE => Topic started by: b2mishra on November 04, 2019, 04:27:16 PM
-
HI,
I am trying to display a small video as part of my splash screen. I used EVE Asset Builder to convert my video, and loaded it in to flash.
The sample C code generated looks a little confusing.
Do I need anything other than the following code to display the video?
I think I am missing some initialization.
/* Switch Flash to FULL Mode */
Gpu_CoCmd_FlashHelper_SwitchFullMode(&host);
Gpu_Hal_Wr32(phost, REG_PLAY_CONTROL, 1);
Gpu_CoCmd_Dlstart(phost);
App_WrCoCmd_Buffer(phost, CLEAR(1, 1, 1));
App_WrCoCmd_Buffer(phost, COLOR_RGB(255, 255, 255));
Gpu_CoCmd_FlashSource(phost, ADDR_VIDEO);
App_WrCoCmd_Buffer(phost, CMD_PLAYVIDEO);
App_WrCoCmd_Buffer(phost, OPT_FLASH | OPT_SOUND | OPT_NOTEAR);
App_Flush_Co_Buffer(phost);
Gpu_Hal_WaitCmdfifo_empty(phost);
-
Hello,
The code you have looks correct, the following is from the 'set10.c' file in our main 'SampleApp' linked below.
void SAMAPP_Video_Flash()
{
#define ADDR_VIDEO 4096
Gpu_CoCmd_FlashHelper_SwitchFullMode(g_phost);
Gpu_CoCmd_Dlstart(g_phost);
App_WrCoCmd_Buffer(g_phost, CLEAR(1, 1, 1));
App_WrCoCmd_Buffer(g_phost, COLOR_RGB(255, 255, 255));
Gpu_CoCmd_Text(g_phost, 0, 150, 30, 0, "Video display from Flash");
App_Flush_Co_Buffer(g_phost);
Gpu_Hal_WaitCmdfifo_empty(g_phost);
Gpu_CoCmd_FlashSource(g_phost, ADDR_VIDEO);
App_WrCoCmd_Buffer(g_phost, CMD_PLAYVIDEO);
App_WrCoCmd_Buffer(g_phost, OPT_FLASH | OPT_SOUND | OPT_NOTEAR | OPT_OVERLAY);
App_Flush_Co_Buffer(g_phost); //Video plays after this
Gpu_Hal_WaitCmdfifo_empty(g_phost);
Gpu_CoCmd_Nop(g_phost);
App_Flush_Co_Buffer_nowait(g_phost);
Gpu_Hal_Sleep(5000);
Gpu_Hal_Wr8(g_phost, REG_PLAY_CONTROL, -1);
}
Please see below for update version of our Sample Applications:
EVE_Samples_v1.1.0_RC_28062019.zip (ftp://u45902898-ide:Ftd1$erv@ftp.ftdichip.com/CES/EVE/EVE_Samples_v1.1.0_RC_28062019.zip)
Best Regards,
BRT Community
-
hello,
i have bridgetek 816c50a-d module. and i having pic micro controller ,i have downlod lib or pic interfacing and sucessfully display image from flash. but now i want play video from flash. but it working (video converted and upload on flash using eve asset builder software
sharing my pic code ,please give me suggestion if i am wrong
API_LIB_BeginCoProList();
API_CMD_DLSTART();
API_CLEAR_COLOR_RGB(255, 0, 0);
API_CLEAR(1,1,1);
API_COLOR_RGB(255,255,255);
EVE_CMD_FLASHSOURCE(4160);
API_CMD_VIDEOFRAME(4,0);
API_CMD_PLAYVIDEO(OPT_FULLSCREEN| OPT_NOTEAR| EVE_OPT_FLASH);
EVE_CMD_VIDEOSTARTF();
API_DISPLAY();
API_CMD_SWAP();
API_LIB_EndCoProList();
API_LIB_AwaitCoProEmpty();
-
Hello,
Here is a small code example. This assumes your video is loaded in flash at address 4096 right after the BLOB.
We will also post the code used after the video but for now here is the video play code.
HAL_MemWrite32(EVE_REG_PLAY_CONTROL, 1);
EVE_LIB_BeginCoProList(); // Begin co-processor commands
EVE_CMD_DLSTART(); // New display list
EVE_CLEAR_COLOR_RGB(0, 0, 0); // Clear screen to black
EVE_CLEAR(1,1,1); // Clear
EVE_COLOR_RGB(255,255,255); // White color for text
EVE_CMD_FLASHSOURCE(4096);
EVE_CMD_PLAYVIDEO(EVE_OPT_FLASH | EVE_OPT_NOTEAR | EVE_OPT_SOUND);
EVE_LIB_EndCoProList(); // Finish the list of commands
EVE_LIB_AwaitCoProEmpty(); // And wait until complete
Best Regards, BRT Community
-
thanks for reply,
this code is not working
HAL_MemWrite32(EVE_REG_PLAY_CONTROL, 1);
this function is not given in PIC microcontroller lib,
please give me that function.
-
Hi,
This will be EVE_MemWrite32(EVE_REG_PLAY_CONTROL, 1); in the original PIC code,
Best Regards, BRT Community