Vehicle Camera Systems
Remit
Vehicle Camera Systems originally approached Raycomm
in order to have a USB driver written for their
camera hardware that had been already been designed.
In the initial discussions it became clear that the
USB driver was not the only software required.
In order to use the camera as intended it needed
to have a means by which the video data could be
downloaded in a secure manner and then uploaded
to a website where the clips would be stored.
Users of the camera and other permitted
authorities would then be able to play back the
video clips after logging into the site.
Proposal
Raycomm proposed
a solution that included:
- The writing of the USB driver to allow the
downloading of the encrypted video data from the
camera to a PC
- The writing of a Windows application to allow the
downloading and playing back of video clips on the
PC. In addition the software would support the
secure uploading of the clips to a website and
database.
- The development of a website that:
- Supported the secure uploading and storage of
video clips.
- Provided controlled access to the clips for the
owner and his designated insurers.
- Allowed users to view their video clips by
streaming video to their desktop.
- Allowed the on line selling of the Cameras via an
online shop.
- Updated their current website with a new layout
and design.
Special Requirements
The main requirement of the upload and playback
software was that the video clips could be
downloaded to a PC and uploaded to the website in
such away that they could not be tampered with. This
required that the video clips should be encrypted
throughout their time on the users PC.
Due to the technology employed in the initial camera
design the video files were excessively large for 30
second clips. This required that the video files
once on the PC should be transcoded to a more
manageable size whilst keeping the video quality as
high as possible. This was further complicated by
the need to be able to stream the video and also
play back the video on the PC, both tasks have
differing requirements for the required bit rate. By
compressing the video, uploads to the website would
be faster thus reducing any problems associated with
timeouts and other internet communication issues.
Technology
The USB requirements of this project were to download
the video files quickly and securely. In order to
guarantee the security it was decided not to
implement a USB Mass storage driver as is typical in
most digital cameras but instead to develop a custom
interface that would only support the camera. Its
sole purpose was to provide means of securely
extracting the video files. The driver would be a
typical Windows driver supporting a number of custom
USB commands.

The Upload Utility was developed as a managed code application using C# 2.0.
This utility includes a video compression engine to compress the encrypted video
file. The Windows media services are used to compress the video using a custom
profile. Playback of the video on the PC is achieved using the Windows
DirectShow multimedia framework this was chosen over spawning a copy of media
player as it meant the video could remain encrypted and did not need to be made
available as an unencrypted wmv file. In addition the utility provides an upload
facility with a secure login that allows the application to be uploaded via a
web service.
The website was developed using ASP.NET 2.0 making
use of the new membership, roles and user profile
providers. This feature allows ASP.NET
authentication to be integrated with role management
to provide authorisation services for the website.
In addition each user can have an associated profile
which can provide application-specific customisation
that can be tailored by individual users.
The web service provides a secure upload service for the upload of videos.
Access to the facility is controlled at login.
Implementation
Driver
Raycomm did not have access to the firmware in the
camera. As the USB code implemented was unverified
it was decided to make use of a pre-built kernel
mode driver and then use a customised user mode
access DLL. By adopting this approach it was much
easier to track down and debug errors in the USB
communications which would inevitably occur if using
two untried USB drivers (one in the camera and one
on the PC). The result was that problems with the
USB interface were quickly tracked back to the USB
firmware and corrected allowing our developers to
concentrate on the Upload Utility and website. If
Raycomm had written the USB code for the camera we
would normally have developed our own custom driver.
By adopting this approach the source of any USB
problems could easily be identified.
This approach allowed easy integration with managed code allowing the PC
software to be developed as a managed application in C# 2.0.
Upload Utility
The
upload utility is a simple managed C# application. Encryption of file streams is
managed using the Crypto library in the .NET framework.
Video play back is provided using the DirectShow.NET library from
http://sourceforge.net/projects/directshownet/ which provides .NET interface
to the Direct Show api. The video compression uses the WMF SDK via Interop to
access the necessary Windows codec to compress the video.
Microsoft Web services 3.0 were used to implement
the web services interface for uploading video files.
Web Service
Designed to be used over a secure HTTP connection the
MTOM based upload web service allows the secure
uploading of the downloaded video clips along with
supporting information such as insurer details,
incident details etc. The uploading is only possible
from the Upload Utility to add some extra
protection.
Website
The website is based around an ASP.NET Master Page
approach which provides the menus and peripheral
graphics images for each page. The content holder
for each page is then populated with the individual
page contents. CSS Friendly adaptors are used to
allow cascading style sheets to be used for
formatting.
There are 3 secure areas on the site for
- Users - allows the management of orders , the viewing
and management of video clips and updating of user
profile details
- Insurers - allows the viewing of users clips if
the user has permitted the insurer to do so.
- Site administration - allows for the management of
orders and shop facilities, management of users,
management of insurer accounts and general site
admin.
In addition to the basic website elements and the
areas accessible to a logged in user, the site uses
Windows Media Server to stream video clips that are
selected by the user. Access to the clips is
controlled using the membership and role providers.
Publishing points are dynamically created for the
duration of the playback allowing the user to play
back only the video they have selected and have
permission to view.
The
final element of the website is a simple shop consisting
of a list of products with description and prices. It
includes some simple stock control features allowing the
Site Administrator to see the current stock level as
orders are placed. Visual feedback is provided to the
shop user by means of a coloured indicator indicating
stock, low stock or out of stock products. The site
administrators have a simple CMS system for entering
products and updating details and price as required.
Raycomm are a UK based, custom
software and electronics design and
development service company creating
bespoke electronic products, mobile
device software applications, backend
web server software and e-commerce
database software.
For a no-obligation discussion with one of our senior consultants on
your project needs:
- Call us on +44 (0) 1275 847553
- or fill in our
Enquiry
Form
- or email us using the link at the top of the
page
We look forward to hearing from you.