Camera3xPlugin

ip camera 3.x plugin develop document

ip camera 3.x plugins document

Version / Author / DateModify
1.0/kun/2013-03-26First edition
1.1/kun/2013-05-20addition audio volume control property,OSD set method, local param save method.


Plugin Install program download Attach:PluginInstall.msi version:1.0.0.2 support: firefox, chrome, safari, opera. sample : Attach:plugin_sample.html
IE Active cab pack download Attach:rc_hplayer.cab version:1.0.0.7 sample : Attach:active_sample.html
Property

  • Model
    Readonly, Model value indicate the camera's model. 
   0  indicate the camera's model is RC9264.
  • Mode
    Readonly, Mode value indicate the  connect mode between camera and  computer.
    0:CONNECT_TO_CAMERA;1:CONNECT_BY_CAMERA.2:P2P.
    this plugin only  support  CONNECT_TO_CAMERA at present.。
  • ID
    Readonly, The current connect camera id .
  • Host
    Readonly, The current connect camera ip address.
  • Port
    Readonly, The current connect camera Port.
  • SSL
    Readonly, retain property 0.
  • User
    Readonly,  user name of the current connect camera.
  • Pwd
    Readonly, user's password of  the current camera.
  • Key
    Readonly, The current connect camera‘s key, general the value is NULL.
  • Group
    Readonly, The user power to the current connect camera。
  • ConnectStatus
    Readonly, The camera's connect status. 
    0:diconnect or connect fail,1:conneting,2:verifying,3:connect success。
  • VideoStatus
    Readonly, The connected camera's video status .-1:stop video, 0,requsting video ,1:video playing.
  • AudioBufferMs
    Read  and Write , set or get the buffer times of the audio and video.
  • AudioStatus
    Readonly, The connected camera’s audio status.-1:stop audio, 0: requsting audio, 1:audio playing.
  • SpeakStatus
    Readonly, The connected camera’s talk status. -1:stop talk, 0:requsting talk, 1:talking.
  • RecordStatus
    Readonly, The connected camera’s record status. 
    0:not record or record stop , 1:recording, 2:record finish.
  • ReocrdFolder
    Read and Write. set or get the directory of  the record file.
  • Error
    Readonly, The recent error.
  • DiscoveredCameraID
    Readonly. The camera  id from search.
  • DiscoveredCameraFirmwareVersion
    Readonly. The camera FirmwareVersion from search.
  • DiscoveredCameraWebUIVersion
    Readonly. The camera WebUIVersion from search.
  • DiscoveredCameraAlias
    Readonly. The camera Alias from search.
  • DiscoveredCameraCurrectIP
    Readonly. The camera CurrectIP from search.
  • DiscoveredCameraCurrectNetmask
    Readonly. The camera CurrectNetmask from search.
  • DiscoveredCameraDhcp
    Readonly. The camera Dhcp from search.
  • DiscoveredCameraIP
    Readonly. The camera IP from search.
  • DiscoveredCameraNetmask
    Readonly. The camera Netmask from search.
  • DiscoveredCameraGateway
    Readonly. The camera Gateway from search.
  • DiscoveredCameraDNS1
    Readonly. The camera DNS1 from search.
  • DiscoveredCameraDNS2
    Readonly The camera DNS2. from search.
  • DiscoveredCameraPort
    Readonly. The camera Port from search.
  • DiscoveredCameraHttps
     Readonly. The camera Https from.
  • DiscoveredCameraModel
    Readonly. The camera Model frome search.
  • DiscoveredCameraIDType
    Readonly. The camera id type, 0: general, 1:ppcn id, 2: rcp2p。.
  • AudioVolume
    Read and Write,Write is to control the audio volume,read is to get the current audio volume

Method'

  • SetCamera
    long SetCamera(long Model, ong Mode, const char * ID, const char * Host,long Port, BOOL SSL,const char * User,const char * Pwd,const char * Key);
    Set the camera informations。
    parameters:
    Model:The camera model,  at present only support RC9264 the value is 0.
    Mode:The camera connect mode , see the mode property introduce.
    ID:The destination camera id, if unknow the id it can set NULL.
    Host:The destination camera host.
    Port:The destination camera port.
    SSL:retain parameter value is 0.
    User: User name.
    Pwd:the User password.
    Key:the camera key, default value is NULL.
    sample:
    function SetCamera()
    {
        var ret = videoPlugin.SetCamera(0,0,"","192.168.0.189",88,0,"admin","","");
    }
    return:On success 0 is returned, On error -1 is returned. 
    explain:everytime before  connect to the camera the user 
            must be use this method set the camera informations .
  • Connect
    long Connect(BOOL Reconnectable, long ReconnectInterval);
    the method connect to the camera.
    parameters:
        Reconnectable:whether reconect, is reconnect value is 1 else value is 0.
        ReconnectInterval:reconnect interval times.
    return :On success 0 is returned, On error -1 is returned, 
            if the camera is connected areadly or the camera disconncet -1 is returned.
    explain:Before call this method the SetCamera method must be called to set the camera informations,
            this method is asynchronous  operate  return 0 not means connect success ,
            from the connect event OnConnectStatusChanged return value can get the connect status.
  • Disconnect
    long Disconnect();
     disconnect  the camera.
     paramters:
     return:On success 0 is returned,  On error -1 is return, if camera is't connect  -2 is return.
     explain:asynchronous operation,   from the OnConnectStatusChanged event can get the status.
  • PlayVideo
    long PlayVideo(long stream);
    request play video
    parameters:stream:witch video stream request to play.
    return:On success 0 is returned, On error -1 is return,  camera is't connect -2 isreturned,.
    voide is playing -4 is returned, User have not power operation this method -5 is return.
    explain:asynchronous operation, OnVideoStatusChanged event return the play video status. 
  • StopVideo
    long StopVideo();
    stop video play.
    paratemers:.
    return:On success  -0 is returned, On error -1 is return, camera is'n connect -2 is returned,  
    video is'n playing -3 is returned.
    explain:asynchronous operation,  OnVideoStatusChanged event return the stop video status.
  • PlayAudio
    long PlayAudio();
    request play audio.
    paratemers:.
    return:On success 0 is returned, On error -1 is returned,  camera is't connect -2 is returned,
    audio is playing -4 is returned, User have not power operation this method -5 is return.
    explain:asynchronous operation, OnAudioStatusChanged event return the audio status.
  • StopAudio
    long StopAudio();
    stop audio play.
    parameters:.
    return:On success 0 is returned, On error -1 is returned,  camera is'n not connect -2 is returned, 
    no audio playing  -3 is returned.
    explain:asynchronous operation, OnAudioStatusChanged event return the audio status.
  • StartSpeak
    long StartSpeak(long SpeakBufferMs);
    request start to talk.
    parameters:SpeakBufferMs:audio buffer times.
    return:On success 0 is returned, On error -1 is returned,  camera is't connect -2 is return,  
    talk is already starting -4 is returned,  User have not power operation this method -5 is return.
    explain:asynchronous operation,  OnSpeakStatusChanged event return the audio status.
  • StopSpeak
    long StopSpeak();
    stop to talk.
    parameters:.
    return:On success 0 is returned,  On error -1 is returned,  camera is'n connect -2 is returned
    no talk is playing -4 is returned.
    explain:asynchronous operation, OnSpeakStatusChanged event return the talk status.
  • StartRecord
    long StartRecord(const char *filename);
    start to record video and audio.
    parameters:filename:record file's name, must end with asf.
    return:On success 0 is returned,  On error -1 is return,  camera is'n connect -2 is return, 
    record is doing -4 is returned,  User have not power operation this method -5 is return.
    explain:asynchronous operation, OnRecordStatusChanged  event return the record status.
  • StopRecord
    long StopRecord();
    stop to record  av.
    parameters:.
    return:On success 0 is returned,  On error -1 is returned.
    explain:asynchronous operation, OnRecordStatusChanged event return the record status.
  • AddCameraPropertyToFetch
    void AddCameraPropertyToFetch(const char * Name);
    add the property to fetch.
    parameters:Name:property name, one time just can add one property.
    return:void.
    explain:this method just add property not means that is start to fetch the property.
  • FetchCameraProperties
    long FetchCameraProperties();
    start to fetch properties, before call this method AddCameraPropertyToFetch 
    must call to add the properties name. 
    parameters:.
    return:On success 0 is return,  On error -1 is return , camera is'n connect -2 is returned.
    The property value return frome OnCameraPropertyFetched event.
  • AddCameraParamToFetch
    void AddCameraParamToFetch(const char * Name);
    add the param to fetch.
    parameters:Name:param name, one time just can add one param.
    return:void.
    explain:this method just add param not means that is start to fetch the param.
  • FetchCameraParams
    long FetchCameraParams();
    start to fetch params, before call this method AddCameraParamToFetchmust call to add the param name. 
    parameters:.
    return:On success 0 is return,  On error -1 is return , camera is'n connect -2 is returned.
    The param value return frome OnCameraParamFetched event.
  • AddCameraStatusToMonitor
    void AddCameraStatusToMonitor(const char * Name);
    add monitor item.
    parameters:Name:monitor item name,one time just can add one item.
    return:void
    explain:this method just add item name not means that is start to moniter.
  • MonitorCameraStatus
    long MonitorCameraStatus();
    call this method to start to monitor the item add with AddCameraStatusToMonitor method.
    parameters:.
    return:On success 0 is return, On error -1 is return,  camera is'n not connect -2 is return.
    The moniter item value return frome OnCameraStatusChanged event.
  • AddCameraParamToSet
    void AddCameraParamToSet(const char * Name, const char * Value);
    add param want to set.
    parameters:Name:param name,   value:param value.
    return:void.
    explain:this method just add  param name and value not means that is start to moniter.
  • SetCameraParams
    long SetCameraParams();
    start to set camera params, before call this method AddCameraParamToSet must be
    called to add the param name and value. 
    parameters:.
    return:On success 0 is returned, On error -1 is returned,  camera is'n connect -2 is returned.
  • PTZControl
    long PTZControl(long Command, long Param);
    camera console control
    parameters:Command:control command, Param:control param
    return:On success 0 is return, On error -1 is return,  camera is'n connect -2 is connect,  
            User have not power to do this.
  • StartDiscovery
    long StartDiscovery();
    open camera search function.
    parameters:.
    return:On success 0 is return, search function is opened already -4 is returned.
    explain:asynchronous operation, OnCameraDiscoveredevent return the search result.
  • StopDiscovery
    long StopDiscovery()
    close the camera search function.
    param:.
    return:On success 0 is returned, search function is not open -4 is returned.
  • SetLocalParam
    long SetLocalParam(char *name,char *param);
    save local params
    param:name:param name,param:value
    return:0:success,-1:failed
  • GetLocalParam
    char * GetLocalParam(char *name);
    get local save param
    param:name:param name
    return:return the param value or return NULL。
  • SetVideoOsd
    long SetVideoOsd(char *name,bool enable_date,long color);
    set the video OSD ,before call this method the video open method must be called。
    param:name:the camra name ,enable_date:whether show time,\\
    color:show color,1:black,2:blue,3:green,4:cyan,5:red,6:yellow,7:white。
    return:less than 0 means set failed.

Event'

  • OnConnectStatusChanged
    void OnConnectStatusChanged();
    when receive this event means the property ConnectStatus is changed. 
  • OnVideoStatusChanged
    void OnVideoStatusChanged();
    when receive this event means the property VideoStatus is changed.
  • OnAudioStatusChanged
    void OnAudioStatusChanged();
    when receive this event means the property AudioStatus is changed.
  • OnSpeakStatusChanged
        when receive this event means the property SpeakStatus is changed.
    
  • OnRecordStatusChanged
    void OnRecordStatusChanged();
    when receive this event means the property RecordStatus is changed.
  • OnCameraPropertyFetched
    void OnCameraPropertyFetched(BSTR Name, BSTR Value);
	
    fetch camera property event
    Name:property  name, Value:property value. 
  • OnCameraParamFetched
    void OnCameraParamFetched (BSTR Name, BSTR Value);
    fetch camera param  event
    Name:param name,Value:param value
  • OnCameraStatusChanged
    void OnCameraStatusChanged (BSTR Name, BSTR Value);
    fetch camera moniter event
    Name:item name, Value:item value.
  • OnCameraDiscovered
    void OnCameraDiscovered(long Action);
    camera search event
     parameter:Action:the camera status
        0:indicate the camera is online.
        1:indicate the camera is  off-line.
        2:indicate the camera is update.
    explain:when search a camera or  camera's status change this event is called, 
            and the properties DiscoveredCamera*  is changed too.
  • OnStatistics
    void OnStatistics(long VideoFramesRecved, long VideoFramesShowed, long VideoBytesRecved, long AudioSamplesRecved,long AudioBytesRecved, long AudioSampleSent, long AudioBytesSent);
    camera video and audio bandwith statistics.
    paramters:
    VideoFramesRecved: video frames received per second.
    VideoFramesShowed:video frames show per second.
    VideoBytesRecved:video bytes recevied per second.
    AudioSamplesRecved:audio samples received per second.
    AudioBytesRecved:audio bytes recevied per second.
    AudioSampleSent:audio samples per second sent.
    AudioBytesSent:audio bytes per second sent.
  • OnLeftKeyPressed
    void OnKeyPressed();
    Mouse left key to click on the display window will trigger this event.
Copyright:Shenzhen XRC Tech Co.,Ltd.

ICP:粤ICP备09050685号