Skip to content

Commit

Permalink
Merge pull request #1 from BreeeZe/typescript
Browse files Browse the repository at this point in the history
Typescript
  • Loading branch information
BreeeZe committed May 11, 2015
2 parents ffb7d69 + 275eb3d commit eece9a6
Show file tree
Hide file tree
Showing 41 changed files with 4,645 additions and 934 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ FakesAssemblies/

# Visual Studio 6 workspace options file
*.opt

v4l2ctl.json
release/
release.zip
33 changes: 33 additions & 0 deletions .settings/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Launch rpos",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "rpos.js",
// Automatically stop program after launch.
"stopOnEntry": false,
// Command line arguments passed to the program.
"args": [],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": ".",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
// Environment variables passed to the program.
"env": { }
},
{
"name": "Attach",
"type": "node",
// TCP/IP address. Default is "localhost".
"address": "localhost",
// Port to attach to.
"port": 5858
}
]
}
196 changes: 196 additions & 0 deletions .settings/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
// Available variables which can be used inside of strings.
// ${workspaceRoot}: the root folder of the team
// ${file}: the current opened file
// ${fileBasename}: the current opened file's basename
// ${fileDirname}: the current opened file's dirname
// ${fileExtname}: the current opened file's extension
// ${cwd}: the current working directory of the spawned process

// A task runner that calls the Typescipt compiler (tsc) and
// Compiles a HelloWorld.ts program
{
"version": "0.1.0",

// The command is tsc.
"command": "tsc",

// Show the output window only if unrecognized errors occur.
"showOutput": "silent",

// Under windows use tsc.exe. This ensures we don't need a shell.
"windows": {
"command": "tsc.exe"
},

// use the standard tsc problem matcher to find compile problems
// in the output.
"problemMatcher": "$tsc"
}

// A task runner configuration for gulp. Gulp provides a less task
// which compiles less to css.
/*
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"tasks": [
{
"taskName": "less",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard less compilation problem matcher.
"problemMatcher": "$lessCompile"
}
]
}
*/

// Uncomment the following section to use gulp in a watching mode that compiles a
// less file. The gulp task prints "[hh:mm:ss] Starting 'clean-styles'" to the console
// when existing css files get deleted and "[hh:mm:ss] Finished 'styles'" when the
// overall less compilation has finished. When the clean pattern is detect internal less
// problems are cleaned. When the finshed pattern is detected in the output less
// problems are published.
/*
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"tasks": [
{
"taskName": "watch-less",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Task is running in watching mode.
"isWatching": true,
"problemMatcher": {
// Use the standard less compilation problem matcher as the base.
"base": "$lessCompile",
// A regular expression signalling that a watched task begins executing (usually triggered through file watching).
"watchedTaskBeginsRegExp": "^\\[\\d+:\\d+:\\d+\\] Starting 'clean-styles'\\.\\.\\.$",
// A regular expression signalling that a watched tasks ends executing.
"watchedTaskEndsRegExp": "^\\[\\d+:\\d+:\\d+\\] Finished 'styles' after \\d+"
}
}
]
}
*/

// Uncomment the following section to use jake to build a workspace
// cloned from https://github.com/Microsoft/TypeScript.git
/*
{
"version": "0.1.0",
// Task runner is jake
"command": "jake",
// Need to be executed in shell / cmd
"isShellCommand": true,
"showOutput": "silent",
"tasks": [
{
// TS build command is local.
"taskName": "local",
// Make this the default build command.
"isBuildCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the redefined Typescript output problem matcher.
"problemMatcher": [
"$tsc"
]
}
]
}
*/

// Uncomment the section below to use msbuild and generate problems
// for csc, cpp, tsc and vb. The configuration assumes that msbuild
// is available on the path and a solution file exists in the
// workspace folder root.
/*
{
"version": "0.1.0",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true"
],
"taskSelector": "/t:",
"showOutput": "silent",
"tasks": [
{
"taskName": "build",
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard MS compiler pattern to detect errors, warnings
// and infos in the output.
"problemMatcher": "$msCompile"
}
]
}
*/

// Uncomment the following section to use msbuild which compiles Typescript
// and less files.
/*
{
"version": "0.1.0",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true"
],
"taskSelector": "/t:",
"showOutput": "silent",
"tasks": [
{
"taskName": "build",
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard MS compiler pattern to detect errors, warnings
// and infos in the output.
"problemMatcher": [
"$msCompile",
"$lessCompile"
]
}
]
}
*/
// A task runner example that defines a problemMatcher inline instead of using
// a predfined one.
/*
{
"version": "0.1.0",
"command": "tsc.exe",
"args": ["HelloWorld.ts"],
"showOutput": "silent",
"problemMatcher": {
// The problem is owned by the typescript language service. Ensure that the problems
// are merged with problems produced by Visual Studio's language service.
"owner": "typescript",
// The file name for reported problems is relative to the current working directory.
"fileLocation": ["relative", "${cwd}"],
// The actual pattern to match problems in the output.
"pattern": {
// The regular expression. Matches HelloWorld.ts(2,10): error TS2339: Property 'logg' does not exist on type 'Console'.
"regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
// The match group that denotes the file containing the problem.
"file": 1,
// The match group that denotes the problem location.
"location": 2,
// The match group that denotes the problem's severity. Can be omitted.
"severity": 3,
// The match group that denotes the problem code. Can be omitted.
"code": 4,
// The match group that denotes the problem's message.
"message": 5
}
}
}
*/
38 changes: 13 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This version uses a patched version of the "node-soap" v0.80 library (https://gi

- Streams H264 video over rtsp
- Camera control (resolution and framerate) through Onvif
- Set other camera options through a web interface.

#How to:

Expand All @@ -34,32 +35,19 @@ Install nodejs on your pi (http://weworkweplay.com/play/raspberry-pi-nodejs/):
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb

Download rpos master from github to your pi
Download rpos release from github to your pi

wget https://github.com/BreeeZe/rpos/archive/master.zip
unzip master.zip
cd rpos-master
npm install
sudo chmod -R a+rwx ./bin/rtspServer

Be sure to configure the ipaddress, service port, rtsp stream name and rtsp port in "config.js" ("nano config.js")
For now you can set V-flip or H-flip in the file "./lib/camera.js"

Camera.prototype.settings = {
hf : false, //horizontal flip
vf : true, //vertical flip
drc : 2, //0=OFF, 1=LOW, 2=MEDIUM, 3=HIGH
gop : 2, //keyframe every X sec.
forceGop : true,
resolution : { Width : 1280, Height: 720 },
framerate : 30,
bitrate : 7500,
profile : "Baseline",
quality : null,
exposure : "auto"
};

Then you start rpos by running "sudo node server.js"
wget https://github.com/BreeeZe/rpos/[release]
unzip [release].zip
cd rpos-[release]

Optionaly set the service port or other options in rposConfig.json

Then you start rpos by running "sudo node rpos.js"

#Camera settings
You can set camera settings by browsing to : http://CameraIP:Port/
These settings are then saved in a file called v4l2ctl.json and are persisted on rpos restart.

#Known Issues
- 1920x1080 can cause hangs and crashes.
Expand Down
2 changes: 2 additions & 0 deletions RPOS.njsproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<Content Include="cpp\rtspServer" />
<Content Include="cpp\rtspServer.cpp" />
<Content Include="cpp\rtspServer.o" />
<Content Include="views\camera.ntl" />
<Content Include="LICENSE" />
<Content Include="package.json" />
<None Include="wsdl\www.w3.org.2005.08.addressing.ws-addr.xsd" />
Expand All @@ -67,6 +68,7 @@
<Folder Include="bin\" />
<Folder Include="cpp\" />
<Folder Include="lib\" />
<Folder Include="views\" />
<Folder Include="services\" />
<Folder Include="services\stubs\" />
<Folder Include="web\" />
Expand Down
Empty file modified bin/rtspServer
100644 → 100755
Empty file.
16 changes: 0 additions & 16 deletions config.js

This file was deleted.

64 changes: 64 additions & 0 deletions lib/SoapService.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/SoapService.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eece9a6

Please sign in to comment.