Dynamic Images, dynamic URL?
                    Is it possible to have a button with an image (jpg) where the URL itself changes?  Basically I am getting back something like:
Artist=Billy Joel
Songname=Always a Woman to Me
Coverart=http://www.foo.com/coverart/billyjoel/album.jpg
How do I put that covertart on a G4 panel? It seems so simple, but all I know how to do is a dynamic image, not a dynamic URL!
Curt
Trikin
                Artist=Billy Joel
Songname=Always a Woman to Me
Coverart=http://www.foo.com/coverart/billyjoel/album.jpg
How do I put that covertart on a G4 panel? It seems so simple, but all I know how to do is a dynamic image, not a dynamic URL!
Curt
Trikin
0          
            
Comments
I tried to use the ^RMF commands recently for a camera switching app using an AXIS 241Q video server. Even though I was 100% certain I was putting in the path and file the way I had used it in the resource manager when I tested it, I could not get it to work. The test program is short, so I'll post it. I worked with Gary in Tech support, eventually he came up with a workaround using the ^BBR command, so its all good, but I would still like to know why the heck it didn't work the way I first tried it, or how you guys might suggest troubleshooting it. I kind of suspect something with the arguments at the end of the filename is hosing it, tried $3f for ?, samo for = , didn't get anywhere. Any insights much appreciated.
Bob Moyle
PROGRAM_NAME='testmotionjpeg' DEFINE_DEVICE camerasTP1 = 10001:12:0 // camera page/port camerasTP2 = 10002:12:0 DEFINE_CONSTANT CHAR CAMS[5][20]= { {'^BBR-6,0,cam1'}, {'^BBR-6,0,cam2'}, {'^BBR-6,0,cam3'}, {'^BBR-6,0,cam4'}, {'^BBR-6,0,quad'} } /*---------------------------------- * this is what I wanted to do CHAR CAMS[5][80]= { {'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi?camera=1&resolution=704x480'}, {'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi?camera=2&resolution=704x480'}, {'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi?camera=3&resolution=704x480'}, {'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi?camera=4&resolution=704x480'}, {'^RMF-axis-cams,%Amjpg/quad%Fvideo.mjpg'} } ---------------------------------------------*/ CAMERA1 = 1 CAMERA2 = 2 CAMERA3 = 3 CAMERA4 = 4 QUAD = 5 DEFINE_VARIABLE CHAR CURRENT_CAM[80] VOLATILE dev camPANELS[]={camerasTP1,camerasTP2} VOLATILE INTEGER camBUTTONS[]={CAMERA1,CAMERA2,CAMERA3,CAMERA4,QUAD} DEFINE_MUTUALLY_EXCLUSIVE ([camerasTP1,CAMERA1]..[camerasTP1,QUAD]) ([camerasTP2,CAMERA1]..[camerasTP2,QUAD]) DEFINE_EVENT BUTTON_EVENT[camPANELS,camBUTTONS] { PUSH: { stack_var integer idx stack_var dev panel idx=get_last(camBUTTONS) CURRENT_CAM=CAMS[idx] idx=get_last(camPANELS) panel=camPANELS[idx] SEND_COMMAND panel, CURRENT_CAM ON[panel,idx] } } DEFINE_PROGRAM (***********************************************************) (* END OF PROGRAM *) (* DO NOT PUT ANY CODE BELOW THIS COMMENT *) (***********************************************************)Thanks for the reply. The button I was using for the dynamic image had 'axis-cams(dynamic)' assigned to it.
Bob
You mentioned that you?re 100% certain of the file and path. How about the IP? You can embed it in your ^RMF command with %H.
'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi?camera=1&resolution=704x480'
I tried
"'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi',$3f,'camera',$3d,'1&resolution',$3d,'704x480'"
I didn't try sending the %P or %H values, they were already set correctly in the resource, my understanding of this command is you only modify the fields you need to.
thanks,
Bob Moyle
"'^RMF-axis-cams,%Aaxis-cgi/mjpg%Fvideo.cgi%3fcamera%3d1&resolution%3d704x480'"
That?s correct, I was just trying to cover all the bases.
I am having an issue with the ^RMF- command here is what I have but the image isn't updating any ideas?
TIA
tried it both ways but no luck the dynamic image is never updating
Jeff
Not a stupid question my DHCP settings were not providing dns settings. I changed it to static. Will let you know if that fixes it
Jeff