Changeset 18034


Ignore:
Timestamp:
09/24/12 19:26:51 (12 years ago)
Author:
nit
Message:

[titan] add playurl to webif

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/httpd.h

    r18015 r18034  
    223223        if(ostrcmp(query, "getvideo") == 0)
    224224                buf = webgetvideo(param, *connfd, fmt);
    225   if(ostrcmp(query, "videoplay") == 0)
     225  if(ostrcmp(query, "videoplay") == 0 || ostrcmp(query, "videoplay=") == 0)
    226226                buf = webvideo(param, fmt);
    227227        if(ostrcmp(query, "getshoot") == 0)
  • titan/titan/httpdfunc.h

    r17972 r18034  
    918918        {
    919919                if(status.play == 0 && status.webplayfile == NULL)
    920                         status.webplayfile = ostrcat(tmpbuf, NULL, 0, 0);
     920                {
     921                        char* tmpbuf1 = tmpbuf;
     922                        if(ostrstr(tmpbuf, "url=") == tmpbuf) tmpbuf1 += 4;
     923                        status.webplayfile = ostrcat(tmpbuf1, NULL, 0, 0);
     924                }
    921925                free(tmpbuf); tmpbuf = NULL;
    922926        }
     
    924928   
    925929        int count = 0;
    926         if(status.play == 0 && ostrcmp("play", param) == 0)
     930        if(status.play == 0 && (ostrcmp("play", param) == 0 || ostrcmp("play=", param) == 0))
    927931        {
    928932                int count = 0;
     
    946950        if(status.play == 1)
    947951        {
    948                 if(ostrcmp("stop", param) == 0)
     952                if(ostrcmp("stop", param) == 0 || ostrcmp("stop=", param) == 0)
    949953                        writerc(getrcconfigint("rcstop", NULL));
    950954
    951                 if(ostrcmp("pause", param) == 0)
     955                if(ostrcmp("pause", param) == 0 || ostrcmp("pause=", param) == 0)
    952956                        writerc(getrcconfigint("rcpause", NULL));
    953957   
    954                 if(ostrcmp("ff", param) == 0)
     958                if(ostrcmp("ff", param) == 0 || ostrcmp("ff=", param) == 0)
    955959                        writerc(getrcconfigint("rcff", NULL));
    956960   
    957                 if(ostrcmp("fr", param) == 0)
     961                if(ostrcmp("fr", param) == 0 || ostrcmp("fr=", param) == 0)
    958962                        writerc(getrcconfigint("rcfr", NULL));
    959963
     
    961965                tmpbuf = ostrcat(param, NULL, 0, 0);
    962966
    963                 if(ostrcmp("getlen", param) == 0)
     967                if(ostrcmp("getlen", param) == 0 || ostrcmp("getlen=", param) == 0)
    964968                {
    965969                        unsigned long len = 0;
     
    970974                }
    971975 
    972                 if(ostrcmp("getpos", param) == 0)
     976                if(ostrcmp("getpos", param) == 0 || ostrcmp("getpos=", param) == 0)
    973977                {
    974978                        unsigned long pos = 0;
     
    979983                }
    980984 
    981                 if(ostrcmp("getisplaying", param) == 0)
     985                if(ostrcmp("getisplaying", param) == 0 || ostrcmp("getisplaying=", param) == 0)
    982986                {
    983987                        int playing = 0;
     
    988992                }
    989993 
    990                 if(ostrcmp("getplayercan", param) == 0)
     994                if(ostrcmp("getplayercan", param) == 0 || ostrcmp("getplayercan=", param) == 0)
    991995                {
    992996                        free(tmpbuf); tmpbuf = NULL;
Note: See TracChangeset for help on using the changeset viewer.