cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1824
Views
5
Helpful
3
Replies

CE9.9 Macros for Source Compositing

Anthony T
Level 5
Level 5

I'm trying to composite 2 different camera inputs, and have the configuration remain 'sticky'....stays that way no matter what else you do on the codec.

The command 'xCommand Video Input SetMainVideoSource ConnectorId:1 ConnectorId:2 Layout:Equal' in the API seems to do what is required, but it is not 'sticky'. If someone wants to use the PTZ controls for one of the cameras, for example, it goes back to a single camera view.

So to get  around that, I was trying to create a command button on the Touch 10 that would re-initiate the composite view.

The same command just doesn't seem to work when sent from a macro. It has to be reformatted for the requirements of a macro, and that seems to get me to this:

xapi.command('Video Input SetMainVideoSource', { ConnectorId: '1', ConnectorId: '2', Layout: 'Equal'} );

But this doesn't work.  Just sets main video to Connector 1, and completely ignores Connector 2.  If I reverse the order of the connectors in the command, then it does the opposite.  It's like the macro processor doesn't understand the command the same way that the API does.

There must be a way around this, to get source compositing to work permanently.  Can anyone around here lend a hand? I'm sure this can't be very complicated....just me.

3 Replies 3

Mike_Brezicky
Cisco Employee
Cisco Employee
The devices I have a combined view, I have a separate panel with up, down,left, right, and zoom. This lets me keep the view combined and manipulate the camera controls. It does not do this when i use the native control.
The buttons are labeled left and right to choose which camera, and sets a variable for Camera ID - 1 or 2.
Then the buttons use the variable and the command using event.Type = Pressed
xapi.command("Camera Ramp", {CameraId: CAMERAID, Pan: 'Left'});
or
xapi.command("Camera Ramp", {CameraId: CAMERAID, Tilt: 'Up'});
Then an additional command against event Type = released
xapi.command("Camera Ramp", {CameraId: CAMERAID, Tilt: 'Stop',Pan: 'Stop'});

Zoom is similar with
xapi.command("Camera PositionSet", {CameraId: CAMERAID,Tilt: '0',Pan: '0',Zoom: '8500'});
you can also get more precise wth the zoom but using a proper formula but I cant find my example.

Thanks.

I think thought that I'm not looking for a way to program new camera controls. I don't relish the idea of teaching dozens of people a new way to do camera control.

Really just looking for a way to format that command so the codec will accept it, then I'll tie it to a new button on the Touch 10. If I get ambitious, I'll make a script that triggers on certain events (which are known to reset the layout), and set it back to dual equal cameras.

Anthony T
Level 5
Level 5

I was able to find out the syntax for main camera compositing in a macro:

 

xapi.command('Video Input SetMainVideoSource', { ConnectorId: [1, 2], Layout: 'Equal' } );