Announcement

Collapse
No announcement yet.

How to display more than 1 video with a timer ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to display more than 1 video with a timer ?

    Hello everybody,

    My name is Martin, I decided to try 4dSystems display for my new embedded project.
    There is a lot of documentation, but maybe not too much with mcu (PIC, ESP, arduino...) use cases (?).

    I need to play differents short videos (around 30 videos of 6s duration), I would like to use TIMER in order to start and stop videos but how do it if I have more than 8 videos ?
    I would like to use TIMER0 to launch and stop my 30 videos. Videos can be on differents forms, this is not a problem.

    Maybe is it possible to show all videos on the same Form and specify the video number that I want to play ?
    Maybe I need to have 30 Form with one video... How can I add more than one event to Timer0 ? Like : Video0NextFrame OR Video1NextFrame OR Video2NextFrame...

    Thank you very much for your help, I am currently programming in C.

    Martin


    I am working with gen4-uLCD-43D ...

  • #2
    Hi Martin,

    You need to manually add the code for that. It can be easily done using the Genie Magic which is available on the PRO version of the Workshop4.
    Alternatively, the project can also be achieved using the ViSi Environment.

    I hope this helps.

    Best Regards,
    Kevin

    Comment


    • #3
      Hi Kevin,

      I don't know ViSi Environment for the moment... I will do some try tonight.
      I think I will need your help !

      Have a good day,

      Martin

      Comment


      • #4
        Hi Martin,

        Sure, please let me know if you need any help.

        Best Regards,
        Kevin

        Comment


        • #5
          Hi Kevin,

          I hope you are fine.
          I chose to merge all my videos in one file (.gif).
          So, I have a gif file with about 50 videos. Each video is 70 frames.

          Do you have a solution to play videos and specify the start and end frames number (with use of TIMER0) ?

          If not I will do a function like this :

          Code:
          void playMyVideo(int nbr){
          int i;
          
          for(i=0; i<70; i++){
          genie.WriteObject(GENIE_OBJ_VIDEO, 0x00, nbr + i);
          delay(90);
          }
          }
          I don't like this solution because my mcu will loop during 7 or 8s. I can use interrupt but it's more complicated.
          Do you have any suggestion, maybe with TIMER of display ?

          Thank you for your help,

          Martin

          Last edited by mlm31; 17 December 2019, 09:02 PM.

          Comment


          • #6
            Hi Martin,

            Yes, I am fine. Thank you for asking.

            If you are controlling the video widget on your host controller, your code should be fine. I cannot see a reason why it should be looping 7 or 8 s. If you are calling the function - playMyVideo(int nbr) once, then it should stop when the for loop is done.

            Also, if you intend to control the widget via the host controller, you need to remove the timer event on the display as it can probably raise a frame mismatch when not handled properly.

            I hope this helps.

            Best Regards,
            Kevin

            Comment

            Working...
            X