Giter VIP home page Giter VIP logo

esp32_usb_stream's Introduction

Arduino Lint pre-commit

ESP32_USB_STREAM

ESP32_USB_STREAM is an Arduino library designed to support USB UVC + UAC host driver for ESP32-S2/ESP32-S3. It supports read/write/control multimedia streaming from usb device. For example, at most one UVC + one Microphone + one Speaker streaming can be supported at the same time.

ESP32_USB_STREAM encapsulates the component from the Espressif Components Registry. It is developed based on arduino-esp32 and can be easily downloaded and integrated into the Arduino IDE.

Features

  • Only support for ESP32-S2 and ESP32-S3 SoCs.
  • Support video stream through UVC Stream interface.
  • Support microphone stream and speaker stream through the UAC Stream interface
  • Support volume, mute and other features control through the UAC Control interface
  • Support stream separately suspend and resume

Supported Drivers

Driver Version
usb_stream 1.2.0

How to Use

For information on how to use the library in the Arduino IDE, please refer to the documentation for Arduino IDE v1.x.x or Arduino IDE v2.x.x.

Dependencies Version

Name Version
arduino-esp32 >= v2.0.14

Examples

Detailed Usage

#include "USB_STREAM.h"

// Instantiate a Ustream object
USB_STREAM *usb = new USB_STREAM();

// allocate memory
uint8_t *_xferBufferA = (uint8_t *)malloc(55 * 1024);
assert(_xferBufferA != NULL);
uint8_t *_xferBufferB = (uint8_t *)malloc(55 * 1024);
assert(_xferBufferB != NULL);
uint8_t *_frameBuffer = (uint8_t *)malloc(55 * 1024);
assert(_frameBuffer != NULL);

// Config the parameter
usb->uvcConfiguration(FRAME_RESOLUTION_ANY, FRAME_RESOLUTION_ANY, FRAME_INTERVAL_FPS_15, 55 * 1024, _xferBufferA, _xferBufferB, 55 * 1024, _frameBuffer);


//Register the camera frame callback function
usb->uvcCamRegisterFrameCb(&cameraFramecb, NULL);

usb->start();

/*Dont forget to free the allocated memory*/
// free(_xferBufferA);
// free(_xferBufferB);
// free(_frameBuffer);

Note: For additional details and information about the usb_stream functionality, please refer to the documentation provided by ESP-IOT Solutions.

esp32_usb_stream's People

Contributors

alibukharai avatar lzw655 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.