BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - gt5659a

Pages: [1]
1
Discussion - EVE / Streaming AVI to VM816CU50A
« on: November 16, 2020, 05:13:42 PM »
My goal is to stream an AVI file to the BT816 to drive an LCD screen.  The AVI file will be about 40 MB, it's binary (black or white pixels) and it will change every 30 seconds or so, and each time I need to stream it to the BT816 with as little latency as possible (I want the video to start within a 0 to 2 second window of nominal start time).

I have a VM816CU50A eval unit (it has an LCD).  I am able to create an external AVI file, and stream it to the LCD screen with the EVE Screen Editor v3.3.0.  The timing appears to be acceptable--the latency is very small: it takes less than a second to start the display after I click the "Upload RAM and Coprocessor" button with the following code:

CLEAR(1, 1, 1)
CMD_PLAYVIDEO(0, "C:/Users/Public/Documents/EVE Screen Editor/Examples/testvideo3.avi")

So far, all is well with the eval board, it appears the BT816 can dow what I want and now I need to get the BT816 integrated into my global architecture (which is coded in C#).  Two ways that I know of to use the C++ code in C# is either a CLI approach or a DLL approach.  In either case, I think the first step is getting it to work in C++, so that's what I am trying to do now.

I tried the easy route to export from ESE (running as an admin): Export-->EVE Hal 2.0 Projects-->VM81650A_LIBFT4222.  This gives me an error stating "Error copying assets to project folder: [Errno 2] No such file or directory: untitled_BT81X_EVE_HAL/untitled/Test/testvideo3.avi")".  I can export projects from ESE and run them in Visual Studio without issues if there isn't a CMD_PLAYVIDEO in them.

I also hacked some code directly in C++ and was able to display one of the provided videos of Star Trek with Jeri Ryan (FYI my 13 year old self thanks you for this), and here's a snipped of such a project:

void Skeleton(Gpu_Hal_Context_t *phost)
{
   Gpu_CoCmd_FlashFast(phost, 0);
   Gpu_CoCmd_Dlstart(phost);
   App_WrCoCmd_Buffer(phost, CLEAR(1, 1, 1));
    #define ADDR_VIDEO 4096
    Gpu_CoCmd_FlashSource(phost, ADDR_VIDEO);
    App_WrCoCmd_Buffer(phost, CMD_PLAYVIDEO);
    App_WrCoCmd_Buffer(phost, OPT_FLASH | OPT_SOUND | OPT_NOTEAR | OPT_OVERLAY);
    App_Flush_Co_Buffer(phost); //Video plays after this
}


Here's my specific questions.

1. Is it worth digging into the Export from ESE approach (I opened up the python export file but gave up)?  I had hoped this would make it an easy way for me to get some sample code to get moving, but if it's going to be a lot of work I can just start to hack the C++ directly
2. Can someone explain the process that ESE uses to generate the video from the provided AVI file?  Specifically, does ESE break the AVI in to bytes and add them in after a CMD_PLAYVIDEO, does it alter the AVI format and send it to flash, provide a direct filename/location link to BT81x, etc? 
3.  It seems the C++ code that I have is very close to what I need but I don't understand how the avi file gets assigned to the "ADDR_VIDEO 4096"...I think this is a location in the flash memory but I don't think that the flash upload is fast enough to be able to display the video with the low latency I am seeing in ESE (e.g., the video starts in about 500 milliseconds regardless of the size of the video tested (up to ~80 MB) hence I don't think it's going to flash).
4. Can I assign the ADDR_VIDEO (or some equivalent) to be a file name like "XYZ.avi"? and then just reassign to the new AVI whenever I need to play the video?
5. Any other pointers on how to get this to work?


Any help would be greatly appreciated!







Pages: [1]