Hi, I just wondering which API or any sample in SDK where can I use Start/Stop Record Manually? (as same function as overlay record button)
Thank you
Hi, I just wondering which API or any sample in SDK where can I use Start/Stop Record Manually? (as same function as overlay record button)
Thank you
There are start and stop recording buttons implemented in the VideoViewer sample, try to explore it.
?Hi, It not working when I put it in SCWorkspace
I suspect that you might not supply a correct camera FQID. Please describe how you have implemented getting the camera and camera FQID in your SCWorkspace plugin.
Hi, I think I did get FQID of Camera When Program start I create Event to detect camera FQID (Camera View) like this private object CameraChangedIndicationHandler(VideoOS.Platform.Messaging.Message message, FQID destination, FQID source) { cameraFqid = message.RelatedFQID; if (cameraFqid != null) { loadData(); } return null; } This function is correct because Data Have been loaded into loadData() Function then I create Startbutton to start record like this private void Startbutton_Click(object sender, EventArgs e) { if(cameraFqid != null) { MessageBox.Show(“Test”); _selectedItem = Configuration.Instance.GetItem(cameraFqid); EnvironmentManager.Instance.SendMessage( new VideoOS.Platform.Messaging.Message(MessageId.Control.StartRecordingCommand), _selectedItem.FQID); } } but when I click button it go into if function and never start record but I notice that when I try to using Milestone overlay start record button via setup mode the button did appear in “Live Mode” but not appear in my “SCworkspace” as well as “Playback mode” Thank you
I have one test I woul like you to try, try to move the MessageBox.Show to after the GetItem and write out the Item, something like -
MessageBox.Show("Test " + _selectedItem.Name + " " + (_selectedItem.FQID.Kind==Kind.Camera).ToString());
Does it verify you have the right item?
The Smart Client Overlay button “Start recording on the selected camera” is by design visible in live mode and not visible in playback mode, and only on the view it was configured.
Hi , I try you verify code and it show the message of camera name and kindCamera as expected but program still not start manual record for us [cid:d10f47d6-ee5d-419d-a7ba-40df4eae50fd]? So I think it came back to question where the camera view is not configured as you said so I just wondering how to configure that camera view to support start manual record Thank you
I tried to do what you are doing, or my interpretation at least, and all works well. I modified the MIP SDK sample SCWorkSpace, adding two test buttons, and then added the code below (SCWorkSpaceViewItemUserControl.cs):
It worked perfectly!
private object _cameraChangedReceiver;
private FQID _cameraChangedToFQID;
..
_cameraChangedReceiver = EnvironmentManager.Instance.RegisterReceiver(new MessageReceiver(CameraChangedIndicationHandler),
new MessageIdFilter(MessageId.SmartClient.SelectedCameraChangedIndication));
..
private object CameraChangedIndicationHandler(VideoOS.Platform.Messaging.Message message, FQID destination, FQID source)
{
_cameraChangedToFQID = message.RelatedFQID;
return null;
}
private void button1_Click(object sender, EventArgs e)
{
if (_cameraChangedToFQID != null)
{
EnvironmentManager.Instance.SendMessage(
new VideoOS.Platform.Messaging.Message(MessageId.Control.StartRecordingCommand), _cameraChangedToFQID);
}
}
private void button2_Click(object sender, EventArgs e)
{
if (_cameraChangedToFQID != null)
{
EnvironmentManager.Instance.SendMessage(
new VideoOS.Platform.Messaging.Message(MessageId.Control.StopRecordingCommand), _cameraChangedToFQID);
}
}
There is a chance that my interpretation of what you do is wrong. In order for you to understand completely what I have done you can replace these files in the SCWorkspace sample..
http://download.milestonesys.com/MIPSDK/Samples/SCWorkSpaceViewItemUserControl_StartRecording.zip
Note:
If the camera is streaming video and is not recording it will start recording when you submit the command.
If the camera is recording based on another event or rule the stop recording command will have no effect, you can only stop the recording when you yourself have started it and only when nothing else is requesting the camera to be recorded.
If my camera starts recording based on always recording rule, but i would like to start/stop my recording based on another program using the SDK provided, is it able to do it ?
No.
If you want to be able to stop recording you must control all rules and cannot have a record always rule. If one rule says record the camera will be recording.
Hi, Thank you very much for taking time to look at problem but I try your code replace with completely clean SCWorkspace Plugin and test it still not start recording as show screen below I select camera and press button 1 to start record but the program still not record [cid:18ea63fb-02b5-434c-85aa-d9001e0ca0a5] and this is rule on Management console it default rule that we haven’t modified anything just deactivate Record always to test Manual Record [cid:ead3144b-20b2-40f2-888e-cd0871cd7ae6]? Thank you
When you start with a “clean” plugin, do you use the MIPPluginTemplate_vs2013?
Something must be missing in your plugin compared to the test I did. See if you can spot it. Perhaps move backwards from my sample and remove what you do not want step by step, see when it fails to learn what is the cause..