Coder Social home page Coder Social logo

yixinshuwu / libwebrtc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webrtc-sdk/libwebrtc

0.0 0.0 0.0 1.5 MB

A C++ wrapper for binary release, mainly used for flutter-webrtc desktop (windows, linux, embedded).

License: MIT License

Shell 0.07% C++ 74.55% Python 0.99% C 24.21% CMake 0.18%

libwebrtc's Introduction

libwebrtc-{windows,linux}-{amd64,x86,armv7,arm64}.{dll,so}

WebRTC C++ wrapper A C++ binary wrapper for webrtc, mainly used for flutter-webrtc desktop (windows, linux, embedded) version release.

possible supported platforms

  • Windows (x86,x64)
  • Linux (x86,x64)
  • Embedded Linux (armv7, arm64)

Note

Use the https://github.com/webrtc-sdk/webrtc.git branch m114_release to compile.

Usage

Create checkout dir

mkdir libwebrtc_build
cd libwebrtc_build

Create .gclient

solutions = [
  {
    "name"        : 'src',
    "url"         : 'https://github.com/webrtc-sdk/webrtc.git@m114_release',
    "deps_file"   : 'DEPS',
    "managed"     : False,
    "custom_deps" : {
    },
    "custom_vars": {},
  },
]
target_os  = ['win']

Synchronize source code

gclient sync

Compile steps for libwebrtc

Confirm that it is currently in the src.

git clone https://github.com/webrtc-sdk/libwebrtc

Modify webrtc's src/BUILD.gn file and add libwebrtc to group("default").

diff --git a/BUILD.gn b/BUILD.gn
index e60d7dd0bd..b9b6acab8b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -29,7 +29,7 @@ if (!build_with_chromium) {
   # 'ninja default' and then 'ninja all', the second build should do no work.
   group("default") {
     testonly = true
-    deps = [ ":webrtc" ]
+    deps = [ ":webrtc","//libwebrtc", ]
     if (rtc_build_examples) {
       deps += [ "examples" ]
     }

for Windows

Download and install the Visual Studio Community 2022

GN

set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_VERSION=2022
set GYP_GENERATORS=ninja,msvs-ninja
set GYP_MSVS_OVERRIDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2022\Community
cd src
gn gen out-debug/Windows-x64 --args="target_os=\"win\" target_cpu=\"x64\" is_component_build=false is_clang=true is_debug=true rtc_use_h264=true ffmpeg_branding=\"Chrome\" rtc_include_tests=false rtc_build_examples=false libwebrtc_desktop_capture=true" --ide=vs2022

Compile for windows

ninja -C out-debug/Windows-x64 libwebrtc

for Linux

export ARCH=x64 # x86, x64, arm, arm64
gn gen out/Linux-$ARCH --args="target_os=\"linux\" target_cpu=\"$ARCH\" is_debug=false rtc_include_tests=false rtc_use_h264=true ffmpeg_branding=\"Chrome\" is_component_build=false use_rtti=true use_custom_libcxx=false rtc_enable_protobuf=false"

Compile for Linux

ninja -C out-debug/Windows-x64 libwebrtc

libwebrtc's People

Contributors

cloudwebrtc avatar zjzhang-cn avatar k-wasniowski avatar xiaowei-guan avatar markdicks avatar wanchao-xu avatar nikohpng avatar ashellunts avatar dkubrakov avatar fourleaftec avatar pwinter1991 avatar netsy avatar wskfjtheqian 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.