Search in sources :

Example 1 with Camera

use of us.mn.state.dot.tms.Camera in project iris by mnit-rtmc.

the class CameraManager method addPlaylist.

/**
 * Add a camera to the play list
 */
public void addPlaylist(Camera c) {
    PlayList pl = play_list;
    if (canEditPlayList(pl)) {
        ArrayList<Camera> cams = new ArrayList<Camera>(Arrays.asList(pl.getCameras()));
        cams.add(c);
        pl.setCameras(cams.toArray(new Camera[0]));
    }
}
Also used : PlayList(us.mn.state.dot.tms.PlayList) ArrayList(java.util.ArrayList) Camera(us.mn.state.dot.tms.Camera)

Example 2 with Camera

use of us.mn.state.dot.tms.Camera in project iris by mnit-rtmc.

the class CameraManager method removePlaylist.

/**
 * Remove a camera from the play list
 */
public void removePlaylist(Camera c) {
    PlayList pl = play_list;
    if (canEditPlayList(pl)) {
        ArrayList<Camera> cams = new ArrayList<Camera>(Arrays.asList(pl.getCameras()));
        cams.remove(c);
        pl.setCameras(cams.toArray(new Camera[0]));
    }
}
Also used : PlayList(us.mn.state.dot.tms.PlayList) ArrayList(java.util.ArrayList) Camera(us.mn.state.dot.tms.Camera)

Example 3 with Camera

use of us.mn.state.dot.tms.Camera in project iris by mnit-rtmc.

the class PlayListPanel method insertCamera.

/**
 * Insert a camera
 */
private void insertCamera() {
    Camera c = lookupCamera();
    if (c != null) {
        insertIntoModel(c);
        changeCameras();
    }
    cam_txt.setText("");
}
Also used : Camera(us.mn.state.dot.tms.Camera)

Example 4 with Camera

use of us.mn.state.dot.tms.Camera in project iris by mnit-rtmc.

the class PopoutCamControlPanel method createPresetModel.

/**
 * Create the camera preset model
 */
private DefaultComboBoxModel<CameraPreset> createPresetModel(CameraPTZ cam_ptz) {
    Camera c = cam_ptz.getCamera();
    DefaultComboBoxModel<CameraPreset> cbxm = new DefaultComboBoxModel<CameraPreset>();
    // add a blank element at the beginning
    cbxm.addElement(null);
    if (c != null) {
        cam_ptz.setCamera(c);
        for (int i = 1; i <= CameraPreset.MAX_PRESET; ++i) {
            CameraPreset cp = CameraPresetHelper.lookup(c, i);
            if (cp != null)
                cbxm.addElement(cp);
        }
    }
    return cbxm;
}
Also used : CameraPreset(us.mn.state.dot.tms.CameraPreset) Camera(us.mn.state.dot.tms.Camera) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel)

Example 5 with Camera

use of us.mn.state.dot.tms.Camera in project iris by mnit-rtmc.

the class PopoutCamControlPanel method monitorSelected.

/**
 * Called when a video monitor is selected
 */
private void monitorSelected() {
    VideoMonitor vm = getSelectedOutput();
    String vmn = (vm != null) ? vm.getName() : "null";
    System.out.println("Setting monitor output to " + vmn);
    watcher.setProxy(vm);
    if (vm != null) {
        Camera c = camera_ptz.getCamera();
        vm.setCamera(c);
    }
}
Also used : VideoMonitor(us.mn.state.dot.tms.VideoMonitor) Camera(us.mn.state.dot.tms.Camera)

Aggregations

Camera (us.mn.state.dot.tms.Camera)22 ArrayList (java.util.ArrayList)5 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)2 CameraPreset (us.mn.state.dot.tms.CameraPreset)2 PlayList (us.mn.state.dot.tms.PlayList)2 Position (us.mn.state.dot.tms.geo.Position)2 Frame (java.awt.Frame)1 HashSet (java.util.HashSet)1 DefaultCellEditor (javax.swing.DefaultCellEditor)1 JComboBox (javax.swing.JComboBox)1 JLabel (javax.swing.JLabel)1 JPopupMenu (javax.swing.JPopupMenu)1 TableCellEditor (javax.swing.table.TableCellEditor)1 CameraAction (us.mn.state.dot.tms.CameraAction)1 ChangeVetoException (us.mn.state.dot.tms.ChangeVetoException)1 EncodingQuality (us.mn.state.dot.tms.EncodingQuality)1 FlowStream (us.mn.state.dot.tms.FlowStream)1 VideoMonitor (us.mn.state.dot.tms.VideoMonitor)1 CameraSelectAction (us.mn.state.dot.tms.client.camera.CameraSelectAction)1 ProxyColumn (us.mn.state.dot.tms.client.proxy.ProxyColumn)1