Changeset 33179


Ignore:
Timestamp:
Feb 18, 2015, 5:33:09 PM (5 years ago)
Author:
gost
Message:

[plugins] ip-camera.. new camera type

Location:
titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/instar/instar.h

    r31379 r33179  
    3333                if(cam1 != NULL)
    3434                {
    35                         tmpstr = ostrcat(cam1, "/snapshot.cgi", 0, 0);
     35                        if(getconfigint("instar_1", NULL) == 1)
     36                                tmpstr = ostrcat(cam1, "/image/jpeg.cgi", 0, 0);
     37                        else
     38                                tmpstr = ostrcat(cam1, "/snapshot.cgi", 0, 0);
    3639                        system(tmpstr);
    3740                        free(tmpstr); tmpstr = NULL;
     
    3942                if(cam2 != NULL)
    4043                {
    41                         tmpstr = ostrcat(cam2, "/snapshot.cgi", 0, 0);
     44                        if(getconfigint("instar_2", NULL) == 1)
     45                                tmpstr = ostrcat(cam1, "/image/jpeg.cgi", 0, 0);
     46                        else
     47                                tmpstr = ostrcat(cam1, "/snapshot.cgi", 0, 0);
    4248                        system(tmpstr);
    4349                        free(tmpstr); tmpstr = NULL;
     
    197203        addchoicebox(onCam1, "ein", _("ein"));
    198204        setchoiceboxselection(onCam1, getlist(myconfig, "InstarCam1", NULL));   
     205        addchoicebox(typCam1, "0", "0");
     206        addchoicebox(typCam1, "1", "1");
     207        setchoiceboxselection(typCam1, getconfigint("instar_1", NULL));
    199208        changemask(ipCam1, "abcdefghijklmnopqrstuvwxyz");
    200209  changeinput(ipCam1, getlist(myconfig, "InstarCam1IP", NULL));
     
    209218        addchoicebox(onCam2, "ein", _("ein"));
    210219        setchoiceboxselection(onCam2, getlist(myconfig, "InstarCam2", NULL));   
     220        addchoicebox(typCam2, "0", "0");
     221        addchoicebox(typCam2, "1", "1");
     222        setchoiceboxselection(typCam2, getconfigint("instar_2", NULL));
    211223        changemask(ipCam2, "abcdefghijklmnopqrstuvwxyz");
    212224  changeinput(ipCam2, getlist(myconfig, "InstarCam2IP", NULL));
     
    243255                        addlist(myconfig, "InstarCam2Pass", passCam2->ret);
    244256                        writelist(myconfig, instarconf);
     257                        addconfig("instar_1", typCam1->ret);
     258                        addconfig("instar_2", typCam2->ret);
    245259                        if(rcret == getrcconfigint("rcblue", NULL))
    246260                        {
  • titan/skins/instar/skin.xml

    r29532 r33179  
    88<node name="autoCam" type="choicebox" parent="listbox" valign="top" posx="0" text="direkter Start" bordercol="bordercol" bordersize="2" width="100%" height="30">
    99<node name="onCam1" type="choicebox" parent="listbox" valign="middle" posx="0" text="Kamera 1" bordercol="bordercol" bordersize="2" width="100%" height="25">
     10<node name="typCam1" type="choicebox" parent="listbox" valign="middle" posx="0" text="Typ" bordercol="bordercol" bordersize="2" width="100%" height="25">
    1011<node name="ipCam1" type="inputbox" parent="listbox" valign="middle" posx="0" text="IP-Kamera 1" bordercol="bordercol" bordersize="2" width="100%" height="25">
    1112<node name="portCam1" type="inputboxnum" parent="listbox" valign="middle" posx="0" text="Port-Kamera 1" bordercol="bordercol" bordersize="2" width="100%" height="25">
     
    1415<node name="s1" type="inputbox" parent="listbox" valign="middle" posx="0" text=" " bordercol="bordercol" bordersize="2" width="100%" height="15">
    1516<node name="onCam2" type="choicebox" parent="listbox" valign="middle" posx="0" text="Kamera 2 (Umschalten mit Rot)" bordercol="bordercol" bordersize="2" width="100%" height="25">
     17<node name="typCam2" type="choicebox" parent="listbox" valign="middle" posx="0" text="Typ" bordercol="bordercol" bordersize="2" width="100%" height="25">
    1618<node name="ipCam2" type="inputbox" parent="listbox" valign="middle" posx="0" text="IP-Kamera 2" bordercol="bordercol" bordersize="2" width="100%" height="25">
    1719<node name="portCam2" type="inputboxnum" parent="listbox" valign="middle" posx="0" text="Port-Kamera 2" bordercol="bordercol" bordersize="2" width="100%" height="25">
Note: See TracChangeset for help on using the changeset viewer.