Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Verstraeten committed May 5, 2017
2 parents bca2c28 + 36b0db9 commit 437e72d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
16 changes: 8 additions & 8 deletions config/capture.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
<IPCamera>
<url type="text">rtsp://admin:888888@192.168.0.13/tcp/av0_1</url>
<frameWidth type="number">640</frameWidth>
<frameHeight type="number">360</frameHeight>
<delay type="number">1000</delay>
<frameHeight type="number">480</frameHeight>
<delay type="number">500</delay>
<angle type="number">0</angle>
</IPCamera>

<USBCamera>
<frameWidth type="number">800</frameWidth>
<frameHeight type="number">640</frameHeight>
<frameWidth type="number">640</frameWidth>
<frameHeight type="number">480</frameHeight>
<deviceNumber type="number">0</deviceNumber>
<delay type="number">500</delay>
<angle type="number">0</angle>
</USBCamera>

<RaspiCamera>
<frameWidth type="number">1280</frameWidth>
<frameHeight type="number">720</frameHeight>
<frameWidth type="number">640</frameWidth>
<frameHeight type="number">480</frameHeight>
<delay type="number">500</delay>
<angle type="number">0</angle>
</RaspiCamera>

<VideoCapture>
<frameWidth type="number">800</frameWidth>
<frameHeight type="number">640</frameHeight>
<frameWidth type="number">640</frameWidth>
<frameHeight type="number">480</frameHeight>
<path type="text">0</path>
<delay type="number">500</delay>
<angle type="number">0</angle>
Expand Down
8 changes: 4 additions & 4 deletions config/config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<kerberos>

<instance>
<name type="text">frontdoor</name>
<logging type="bool">false</logging>
Expand All @@ -11,8 +11,8 @@
<algorithm file="algorithm.xml">DifferentialCollins</algorithm>
<expositor file="expositor.xml">Hull</expositor>
<heuristic file="heuristic.xml">Sequence</heuristic>
<io file="io.xml" type="multiple">Disk</io>
<io file="io.xml" type="multiple">Video</io>
<cloud file="cloud.xml">S3</cloud>
</instance>
</kerberos>

</kerberos>
2 changes: 1 addition & 1 deletion include/kerberos/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef __Version_H_INCLUDED__ // if Version.h hasn't been included yet...
#define __Version_H_INCLUDED__ // #define this so the compiler knows it has been included

#define VERSION "2.2.1"
#define VERSION "2.2.2"
#define HADES "https://hades.kerberos.io"
#define SYMBOL_DIRECTORY "/etc/opt/kerberosio/symbols/"
#define CONFIGURATION_PATH "/etc/opt/kerberosio/config/config.xml"
Expand Down
14 changes: 13 additions & 1 deletion src/kerberos/cloud/S3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,26 @@ namespace kerberos
// Date
std::string date = getDate();
headers.push_back("Date: " + date);

std::string contentType = "image/jpeg";

std::vector<std::string> extensions;
helper::tokenize(fileName, extensions, ".");
std::string extension = helper::urlencode(extensions[extensions.size()-1]);
if(extension == "mp4")
{
contentType = "video/mp4";
}

headers.push_back("Content-Type: " + contentType);

// folder
std::string folder = (m_folder == "") ? "" : m_folder + "/";

// Authorize request
std::string request = "PUT\n";
request += "\n";
request += "\n";
request += contentType + "\n";
request += date + "\n";
request += "/" + m_bucket + "/" + folder + fileName;
headers.push_back("Authorization: " + authorize(request));
Expand Down

0 comments on commit 437e72d

Please sign in to comment.