This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linking CXX shared library ../../lib/libopencv_highgui.dylib | |
brew: superenv removed: -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-deprecated-declarations | |
Undefined symbols for architecture x86_64: | |
"_faacEncClose", referenced from: | |
_Faac_encode_close in libavcodec.a(libfaac.o) | |
"_faacEncEncode", referenced from: | |
_Faac_encode_frame in libavcodec.a(libfaac.o) | |
"_faacEncGetCurrentConfiguration", referenced from: | |
_Faac_encode_init in libavcodec.a(libfaac.o) | |
"_faacEncGetDecoderSpecificInfo", referenced from: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crypto = require 'crypto' | |
connectionSecure = (req,trust_proxy=true) -> | |
secure_proxy = ( req.headers['x-forwarded-proto'] or '' ).toLowerCase() == 'https' | |
req.connection.encrypted or ( trust_proxy and secure_proxy ) | |
createID = (len) -> crypto.randomBytes(Math.ceil(len*3/4)).toString('base64').slice(0,len) | |
# not implemented yet | |
signId = (unsignedid,secret) -> unsignedid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frames = [] | |
addFrame = (frame) -> frames.push frame || [] | |
addToStack = (obs) -> if frames.length > 0 then frames[frames.length-1].push obs | |
mergeFrame = (obs) -> if frames.length > 0 then frames[frames.length-1] = frames[frames.length-1].concat obs | |
popFrame = -> | |
popped = unique frames.pop() | |
mergeFrame popped | |
return popped | |
unique = (frame) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runs = 0 | |
count = 10000 | |
stop = false | |
t_make = 0 | |
t_update = 0 | |
t_verify1 = 0 | |
t_verify2 = 0 | |
self.stop = -> stop = true | |
self.startmy = -> | |
t_make = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.put '/uploads/:fileid', (request,response) -> | |
getCachePath (path) -> #... does a bunch of prep | |
stream = fs.createWriteStream path, | |
bufferSize: 1024*1024*4 | |
encoding: 'binary' | |
start: start | |
flags: if start != 0 then 'r+' else 'w' | |
stream.on 'close', -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http = require 'http' | |
server = http.createServer (request,response) -> | |
console.log request | |
switch request.method | |
when 'OPTIONS' | |
response.setHeader 'Access-Control-Allow-Origin', '*' | |
response.setHeader 'Access-Control-Allow-Methods', 'PUT' | |
response.setHeader 'Access-Control-Allow-Headers', 'Content-Range' | |
response.setHeader 'Access-Control-Max-Age', '0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
express = require 'express' | |
app = express.createServer() | |
app.put '/uploads/:fileid', (request,response) -> | |
isvalid = false # ...code to determine validity of file being sent in the ServerRequest | |
if isvalid | |
# continue handling the upload | |
else | |
# the following two options are both unreliable |