Announcement

Collapse
No announcement yet.

Video question

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

  • Video question

    Mark,

    I have written a main function for bank one that handle my screen functions. Now that I have mastered banks I am wondering about help videos. A customer asked about this.

    If I use Visi to create several video files to a uSD card how can I call them from designer? I don’t know how to get the various addresses for the media_SetAdd function.

  • #2
    OK, I found an app note and used the graphics composer.

    Now I have two issues.

    The video at 0,0 plays correctly except there is also junk playing at the bottom of the screen at the same time. Keep in mind I am in portrait mode. Any ideas about this?

    The other issue is I can't play the second clip. I have tried various combinations. Based on the data below what would my media_SetAdd look like for MC2.wmv?

    One other thing, If we hook up a speaker will the video play with audio?

    ---------------------------------------------------------------------------------------
    File "MC1.wmv" (MC1.wmv)
    Sector Address 0x000000
    X = 0 Y = 0 Width = 270 Height = 151 Bits = 16 Frames = 188 Delay = 33

    ---------------------------------------------------------------------------------------
    File "MC2.wmv" (MC2.wmv) CAN"T MAKE THIS ONE PLAY
    Sector Address 0x0074F5
    X = 0 Y = 0 Width = 270 Height = 151 Bits = 16 Frames = 249 Delay = 33

    Thanks
    Last edited by ccsial; 21st June 2015, 06:01 AM.

    Comment


    • #3
      Generally it is easier to use ViSi than designer to do this sort of thing. You still code using Designer, you just get easy access to ways to add, insert and access graphical objects. You don't need to worry about calculating anything as you do with Designer and GC. See File, Samples, Picaso ViSi, VidImage, for example.

      Having said that you appear to be using RAW mode which ViSi does not use. What made you go down that path?

      To use media_SetAdd() you will need to convert the sector address to a byte address, eg 0x74F5 -> 29941 (decimal sector) -> 15329792 (multiple by 512 to get media address) -> 0xE9EA00 (media hex address) -> media_SetAdd(0xE9, 0xEA00)

      Of course it is easier to use media_SetSector(0, 0x74F5) ;
      Mark

      Comment


      • #4
        Not sure what raw mode is.

        I am using designer because my entire app is done in designer.

        I will give set sector a try.

        Thanks.

        Comment


        • #5
          RAW mode as in accessing the uSD without any formatting (i.e. sector by sector)

          As opposed to FAT mode (i.e. opening files by name)

          If you create a new ViSi program you can 'start' with your Designer code by simply pasting it into the code window.
          Mark

          Comment


          • #6
            I guess I went down that path because the App note sent me there.

            I may give the VISI a try later. The setsector works great.

            Now if I can find out why I'm getting junk below my video I'll be elated. Any ideas why the extra stuff on the screen?

            Comment


            • #7
              Oops, sorry forgot to address that.

              The video window should be the size you have specified, any unused area should remain 'blank'.

              Issues can arise if the video window overflows the screen (either because of size, or positioning).

              You haven't said what screen you are using, so I can't comment relative to the 270x151 video size.

              RAW was tested on the Diablo processor, but since you are the only person I am aware of that is using it, maybe there is an issue with it.

              Can you post a picture of what you are seeing?
              Mark

              Comment


              • #8
                Hi Mark,

                Here is a picture of a short video, me on my bike, I used to test it. I also included the setup pages from the graphics composer.

                This is a SK-43DT

                Al
                Attached Files
                Last edited by ccsial; 21st June 2015, 11:02 AM.

                Comment


                • #9
                  Hmm, that's not right.

                  Can you email your .4dg program and the GC files (the .gcs file and the .gcs.d folder and its contents) to mark at 4dsystems dot com dot au?
                  Mark

                  Comment


                  • #10
                    Hi Mark,

                    I sent an Email. The program will run after a 2 second wakeup. Look at line 107 for the video code. Let me know here if you did not get the Email.

                    Thanks, Al

                    Comment


                    • #11
                      Hmm, half an hours has elapsed since your post and no email has arrived as yet
                      Mark

                      Comment


                      • #12
                        I attached them here

                        I included the code that runs in bank 0 and bank 2. You should not need bank2 since it does not call the functions.

                        When you start the program there is a 2 second wakeup screen and then the video starts forever.

                        The video code is at line 107.

                        The only files that were in the .D file are the two MCn.wmv files.
                        Attached Files
                        Last edited by ccsial; 21st June 2015, 08:42 PM.

                        Comment


                        • #13
                          Can you please try the attached replacement driver for your display?
                          Attached Files
                          Mark

                          Comment


                          • #14
                            I'll be happy to try that. Can you tell me how to install it or where to copy it.

                            Comment


                            • #15
                              The easiest thing to do is put it in the C:\Users\Public\Documents\4D Labs\4DUpdates\PmmCs folder, start the PmmCLoader tool and click 'AutoUpdate'
                              Mark

                              Comment

                              Working...
                              X