Facility Control

 View Only
  • 1.  NDI Variable Input

    Posted 04-27-2020 15:49

    Hi all, 

    Trying to get a dropdown for NDI source.    I'm using setsrcname but no luck in changing the source.   Any thoughts?

    Thank you

    Al

     

    <abs contexttype="opengear" id="_top" keepalive="false">
    <meta>
    <params>

    <param access="1" constrainttype="STRING_CHOICE" maxlength="0" name="InputList1" oid="Input_List_1" type="STRING" value="NDI (Output2)" widget="combo">
    <constraint>None</constraint>
    <constraint>NDI (Output)</constraint>
    <constraint>NDI (Output2)</constraint>
    </param>

    </params>
    </meta>
    <tab height="898" left="15" top="18" width="1356">
    <abs name="Tab 1">
    </abs>
    <abs name="Tab 2">
    <param expand="true" height="55" left="58" oid="Input_List_1" top="65" width="319"/>
    <button buttontype="push" height="40" name="Go" right="20" top="18" width="80">
    <task tasktype="ogscript">ogscript.getComponentsById('browser')[0].setUrl(params.getValue('URL1', 0));</task>
    </button>
    <button buttontype="push" height="40" left="418" name="Go" top="71" width="80">
    <task tasktype="ogscript">ogscript.getComponentsById('NDIInput1')[0].setsrcname(params.getName('Input_List_1', 0));</task>
    </button>

    <ndi height="204" id="NDIInput1" name="NDIInput1" right="961" showsrc="true" srcname="NDI (Output2)" top="180" width="296"/>

    </abs>
    </tab>
    </abs>



  • 2.  RE: NDI Variable Input

    Posted 04-27-2020 17:08

    Hi Al

    You're quite close - what you want to use is setSource(source name);

    Here is an example panel that queries for sources, puts them in a list, and allows you to select:

    <abs contexttype="opengear">
    <meta>
    <params>
    <param access="1" constrainttype="STRING_CHOICE" maxlength="0" name="NDI Sources" oid="ndi.sources" stateless="true" type="STRING" value="NONE" widget="list">
    <constraint>NONE</constraint>
    </param>
    </params>
    </meta>
    <borderlayout bottom="0" left="0" right="0" top="0">
    <borderlayout anchor="west" width="200">
    <param anchor="center" bottom="58" expand="true" left="2" oid="ndi.sources" right="3" scrolling="vertical" showlabel="false" top="5">
    <task tasktype="ogscript">var ndiWindow = ogscript.getComponentsById('ndi-window')[0];
    ndiWindow.setSource(this.getValue());</task>
    </param>
    <button anchor="south" bottom="6" buttontype="push" height="80" left="3" name="Load List" right="2">
    <task tasktype="ogscript">var ndiWindow = ogscript.getComponentsById('ndi-window')[0];
    var sourceNames = ndiWindow.getNDISourceNames();
    ogscript.debug("FOUND" + sourceNames.length);
    var c = params.createStringChoiceConstraint(sourceNames);
    params.replaceConstraint('ndi.sources', c);</task>
    </button>
    </borderlayout>
    <ndi anchor="center" fill="fit" id="ndi-window" quality="high" showname="true" srcname="BIRDDOG-DB (SDI)" style="bg#dark;bdr:etched;"/>
    </borderlayout>
    </abs>

    #DashBoard


  • 3.  RE: NDI Variable Input

    Posted 04-27-2020 17:44

    That works.  Thank you James. 


    #DashBoard