Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
/ MMALSharp Public archive

C# wrapper to Broadcom's MMAL with an API to the Raspberry Pi camera.

License

Notifications You must be signed in to change notification settings

techyian/MMALSharp

Folders and files

NameName
Last commit message
Last commit date
Apr 18, 2017
May 18, 2017
May 3, 2017
May 18, 2017
May 16, 2017
Dec 20, 2016
Apr 21, 2017
Apr 28, 2017
Apr 25, 2017
May 1, 2017
Apr 4, 2017
Apr 19, 2017
May 18, 2017
Apr 7, 2017
Apr 28, 2017
Apr 28, 2017
Jan 24, 2017

Repository files navigation

MMALSharp

Build status

MMALSharp is an unofficial C# API for the Raspberry Pi camera. Under the hood, MMALSharp makes use of the native MMAL interface designed by Broadcom.

The project is in early stages of development, however the ability to take pictures and record video is working as expected (H.264 & MJPEG).

MMALSharp supports the following runtimes:

  1. Mono 4.x
  2. .NET Core 2.0 (beta) with .NET Standard 1.6.

Documentation

For full installation instructions for Mono 4.x and .NET Core, including configuration and examples - please visit the Documentation site.

Status

So far, the library has been tested on the following Raspberry Pi devices:

  • Raspberry Pi 1 Model B (512mb)
  • Raspberry Pi Zero
  • Raspberry Pi 2 Model B

Both the SUNNY and Sony IMX219 camera modules are working as expected.

Tested image 'still' features:

  • Image width/height
  • Image encoding
  • Brightness
  • Contrast
  • Saturation
  • Sharpness
  • Shutter speed
  • ISO
  • Exposure compensation
  • Exposure mode
  • Exposure metering mode
  • Raspistill supported image effects
  • Rotation
  • Flips
  • Annotate
  • Dynamic range compression
  • Stats Pass
  • Colour effects
  • Crop
  • Auto white balance mode/gains
  • EXIF tags
  • Raw capture

Notes & Known issues

When using more resource intensive encoders such as MMAL_ENCODING_BMP and the Sony IMX219 module, I've found it necessary to increase the memory split to around 200mb or otherwise you'll receive an ENOSPC error due to insufficient resources.

There is an issue with EXIF and Annotation support under the .NET Core build of MMALSharp currently, an issue has been raised for this and will be fixed ASAP.

License

MIT license

Copyright (c) 2017 Ian Auty

Raspberry Pi is a trademark of the Raspberry Pi Foundation

Special thanks

Dave Jones @waveform80 - your Python header conversions have saved me numerous hours so far. Thank you very much.