0

It would really be helpful



Hi, this is a quick note for the Administrators, as I look through the forums for similar problems to mine, I notice that you email most of your answers instead of posting them to the forum.

This is frustrating and creates inefficacies in the process as different people have to ask the same question to get an answer.

It would be helpful if the answers you provide are posted here as well.

Thanks

5 comments

  • 0
    Avatar
    RokuLyndon


    I'll keep that in mind going forward. Most of the time when I send emails it's because there's an attachment, and it's easier.



    Please let me know problems you're having or if you need any help.
  • 0
    Avatar
    mzimet


    I was trying to find an example for synchronizing two 410's using the GPIO 15 pin cable assuming using a straight through 15 pin all except the power pin (to start videos at the same time). The SDK seems to have a lot of capabilities and allot of good examples; except in this area.



    I assume the steps are as follows, but not 100% sure:



    Master Script:



    1. Set up the ports and player.

    messagePort = CreateObject(“roMessagePortâ€
  • 0
    Avatar
    RokuLyndon


    Yes, that was close. Here's a master and slave example. The gpioenable output doesn't send a signal, just sets that gpio to output. Otherwise, it was pretty close. Also, you don't have to set the message port on the master if it's only setting, for the gpio. Finally, when synchronizing, you can't use setloopmode with true because, if you do, you won't know when the master video ends so you can send the gpio signal again.





    Master

    -------------------





    v = CreateObject("roVideoPlayer")

    gpio = CreateObject("roGpioControlPort")

    p = CreateObject("roMessagePort")

    v.SetPort(p)



    mode=CreateObject("roVideoMode")

    mode.SetMode("1920x1080x29.97")



    gpio.EnableOutput(2)

    current_video="video31.ts"

    current_gpio=1



    Play_video:

       gpio.SetOutputState(current_gpio,true)

       sleep(15)

       v.PlayFile(current_video)

       gpio.SetOutputState(current_gpio,false)



    listen:

       msg = wait(0,p)  

       if type(msg) = "roVideoEvent" then

       if msg.GetInt()=8 then goto Play_video

       endif



    goto listen







    Slave:

    ---------------



    v = CreateObject("roVideoPlayer")

    gpio = CreateObject("roGpioControlPort")

    p = CreateObject("roMessagePort")

    v.SetPort(p)

    gpio.SetPort(p)



    current_video="video31.ts"

    mode=CreateObject("roVideoMode")

    mode.SetMode("1920x1080x29.97")

    gpio.EnableInput(1)



    listen:

    msg = wait(0,p)

    if type(msg) = "roGpioButton" then

    if msg.GetInt() = 1 then

       v.PlayFile("video32.ts")

    endif

    endif



    goto listen
  • 0
    Avatar
    mzimet


    Thanks for the reply. Just for clarification what is the autorun file extension that should be used. I have seen several iterations in different documentation.



    Is it a .bas, .brs, or .csv?



    Thank again
  • 0
    Avatar
    RokuLyndon


    The autorun is the script. It should be autorun.brs. That's what you need on the compact models to override the standard autorun.brs that's in memory.



    If you are using a csv file, then it would be called autoplay.csv. The autorun that's in memory can interpret the csv file for playback.



    If you're using a playlist, then it would be called autoplay.bsp.  



    And, if you're using the brightauthor software, the autorun file has the same extension, but its playlist is called autoplay.xml.
Post is closed for comments.