<rsd version="1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://archipelago.phrasewise.com/rsd">
  <service>
    <engineName>MyGet</engineName>
    <engineLink>http://www.myget.org/</engineLink>
    <dc:identifier>https://www.myget.org/F/mmalsharp/</dc:identifier>
    <dc:owner>techyian</dc:owner>
    <dc:creator>techyian</dc:creator>
    <dc:title>Builds for the mmalsharp library</dc:title>
    <dc:description># MMALSharp - C# wrapper to Broadcom's MMAL and API to the Raspberry Pi camera 

[![Build status](https://ci.appveyor.com/api/projects/status/r3o4bqxektnulw7l?svg=true)](https://ci.appveyor.com/project/techyian/mmalsharp) 
[![Join the chat at https://gitter.im/MMALSharp/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/MMALSharp/Lobby?utm_source=share-link&amp;utm_medium=link&amp;utm_campaign=share-link)

**If you like this project, please support it by giving it a star!** 
![GitHub stars](https://img.shields.io/github/stars/techyian/MMALSharp.svg?style=popout)

MMALSharp is a C# wrapper around the MMAL library designed by Broadcom. It exposes many elements of MMAL and in addition provides an easy to use, asynchronous API to the Raspberry Pi Camera Module. The library targets .NET Standard 2.0 and is compatible with Mono 5.4/.NET Core 2.0 or greater [runtimes](https://docs.microsoft.com/en-us/dotnet/standard/net-standard).


## Installation

MMALSharp NuGet package:
[![NuGet version](https://badge.fury.io/nu/MMALSharp.svg)](https://badge.fury.io/nu/MMALSharp)

```
PM&gt; Install-Package MMALSharp
```

MMALSharp.FFmpeg NuGet package:
[![NuGet version](https://badge.fury.io/nu/MMALSharp.FFmpeg.svg)](https://badge.fury.io/nu/MMALSharp.FFmpeg)

```
PM&gt; Install-Package MMALSharp.FFmpeg
```

Pre-release builds can be found on [MyGet](https://www.myget.org/gallery/mmalsharp):

## Basic Examples

Take a JPEG image using YUV420 encoding:

```csharp

public void TakePicture()
{
    // Singleton initialized lazily. Reference once in your application.
    MMALCamera cam = MMALCamera.Instance;

    using (var imgCaptureHandler = new ImageStreamCaptureHandler("/home/pi/images/", "jpg"))        
    {            
        await cam.TakePicture(imgCaptureHandler, MMALEncoding.JPEG, MMALEncoding.I420);
    }
    
    // Cleanup disposes all unmanaged resources and unloads Broadcom library. To be called when no more processing is to be done
    // on the camera.
    cam.Cleanup();
}

```

Take a H.264 video using YUV420 encoding at 30 fps:

```csharp

public void TakeVideo()
{
    // Singleton initialized lazily. Reference once in your application.
    MMALCamera cam = MMALCamera.Instance;

    using (var vidCaptureHandler = new VideoStreamCaptureHandler("/home/pi/videos/", "avi"))        
    {    
        var cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
                
        await cam.TakeVideo(vidCaptureHandler, cts.Token);
    }   

    // Cleanup disposes all unmanaged resources and unloads Broadcom library. To be called when no more processing is to be done
    // on the camera.
    cam.Cleanup();
}

```


## Documentation

For full installation instructions for Mono and .NET Core, including configuration and examples - please visit the [Wiki](https://github.com/techyian/MMALSharp/wiki).


## License

MIT license 

Copyright (c) 2016-2019 Ian Auty

Raspberry Pi is a trademark of the Raspberry Pi Foundation

## Contributors

I want to say a big thank you to those of you who have helped develop MMALSharp over the years, your contributions are most appreciated. In addition, I'd like to say thanks to Dave Jones [@waveform80](https://github.com/waveform80) for your work on picamera which gave me the inspiration to start this project.</dc:description>
    <homePageLink>https://www.myget.org/Feed/Details/mmalsharp/</homePageLink>
    <apis>
      <api name="nuget-v3-packages" blogID="" preferred="false" apiLink="https://www.myget.org/F/mmalsharp/api/v3/index.json" />
      <api name="nuget-v2-packages" blogID="" preferred="true" apiLink="https://www.myget.org/F/mmalsharp/api/v2/" />
      <api name="nuget-v1-packages" blogID="" preferred="false" apiLink="https://www.myget.org/F/mmalsharp/api/v1/" />
    </apis>
  </service>
</rsd>