Code Monkey home page Code Monkey logo

mirror's Introduction

Mirror

Cross-platform casting SDK, support Android, Windows, Linux


Pure software screen projection is different from Miracast, AirPlay, etc., which need to rely on hardware support. This project was not designed to work on a wide area network, but works well in a local area network environment.

Features

  • Audio is transmitted using OPUS raw streaming.
  • Video encoding uses H264, supports QSV, NVENC hardware accelerated encoding and decoding.
  • Supports UDP multicast and SRT, and can dynamically switch the transport layer.
  • Work in an unstable network environment (such as high-QOS WIFI).

Build Instructions

Requirements

Git | Rust | CMake | Python3 | Node.js

  • C++20 or above compliant compiler.
  • Rust stable toolchain.
  • CMake 3.16 or above as a build system.
  • Node.js 16 or above as a auto build script.
  • Python3 is optional and required for Android Studio projects.
Linux (Ubuntu/Debian)

For Linux, you need to install additional dependencies to build SRT and other.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential libasound2-dev

Build

Examples and SDK library files can be automatically packaged by running an automatic compilation script.

npm run build

The Debug version is compiled by default. If you need the Release version, just run npm run build:release.
For android, there is no need to manually call compilation. You can directly use Android Studio to open ./examples/android.

If you don't need to build the examples, just build the dynamic library:

cargo build --release

For the required header files: frame.h | mirror.h | renderer.h

License

GPL Copyright (c) 2022 Mr.Panda.

mirror's People

Contributors

mycrl avatar

Stargazers

⭐ 🐾 avatar  avatar  avatar Jinming Chen avatar re2zero avatar sosiaozo avatar

Watchers

 avatar

Forkers

vaginessa

mirror's Issues

Cache Creation and Access Errors on Windows 11 - Electron App

I'm encountering an issue when running the mirror.exe file on Windows 11. The application seems to fail when attempting to create and access the GPU cache, resulting in multiple errors. Below are the error messages I receive in the PowerShell terminal:

PS D:\Users\Doumsg\Downloads\windows-x64-app-release\bin> ./mirror.exe
PS D:\Users\Doumsg\Downloads\windows-x64-app-release\bin>
[4208:0812/131423.592:ERROR:cache_util_win.cc(20)] Unable to move the cache: 拒绝访问。 (0x5)
[4208:0812/131423.592:ERROR:disk_cache.cc(208)] Unable to create cache
[4208:0812/131423.602:ERROR:gpu_disk_cache.cc(711)] Gpu Cache Creation failed: -2
[3612:0812/131423.640:ERROR:cache_util_win.cc(20)] Unable to move the cache: 拒绝访问。 (0x5)
-> ELECTRON: [info] - ipc update settings event
-> ELECTRON: [info] - rebuild mirror env
-> ELECTRON: [error] - Error: mirror create failed
-> ELECTRON: [info] - ipc get devices event

Steps to Reproduce:

  1. Download the windows-x64-app-release package.
  2. Navigate to the bin directory using PowerShell.
  3. Run the mirror.exe file.

Expected Behavior:
The application should run without errors, and the necessary caches should be created and accessed successfully.

Actual Behavior:
The application fails to create and access the GPU cache, leading to several errors indicating "Access Denied" and "Cache Creation failed."

Environment:

  • OS: Windows 11
  • Version: [Include your version of Windows and any relevant software versions]
  • Electron Version: [Include the version of Electron, if applicable]

Additional Information:
The error code 0x5 suggests that there might be a permissions issue preventing the application from accessing or creating the cache. However, running PowerShell as an administrator did not resolve the problem.

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.