Hi 

Here is an update of my previous post

To make script webcam.r works I need to write temp files to disk
So you have to lower the security.


Hammiche Mourad
[EMAIL PROTECTED]

REBOL [
    Title: "Jpeg stream viewer"
    Author: "Hammiche Mourad"
    Email: [EMAIL PROTECTED]
    Date: 06-Jul-2000
    Version: 1.0.1
    Purpose: {Show a multipart/x-mixed-replace stream of jpeg images.
    
    }
    Note: { it create temp file on disk }
]

; stream directy from an axis 200+ webcam (not available from outside)
;webcam: http://192.168.1.10/cgi-bin/fullsize.srvpushb       

; stream from the axis demo on internet
webcam: http://peeper.axisinc.com/nph-update.cgi


count: 1

view layout [
    frame 352x288 with [
        rate: 4
        p1: none
        p2: none
        fp: open/direct/binary webcam
        buffer: make string! 4096
        feel: make feel [
            engage: func [f a e ] [
		    append buffer copy/part fp 4096
                if none? p1 [
                    if found? p1: find/tail buffer "image/jpeg^/^/" [
                        remove/part buffer p1
                    ]
                ]
                
                if found? p2: find buffer "^/^/--myboundary" [
                    write/binary %temp.jpg copy/part head buffer p2
                    count: count + 1
                    f/image: load %temp.jpg
                    show f
                    remove/part buffer p2
                    p1: none
                ]

            ]
        ]
    ]
    button "Quit" [ quit ]
]

Reply via email to