Code Monkey home page Code Monkey logo

hackwebrtc's Introduction

HackWebRTC

Let's hack into WebRTC :)

Use WebRTC static library

# CP='gcp' # mac
# CP='cp'  # linux

find api audio base call common_audio common_video logging media \
modules ortc p2p pc rtc_base rtc_tools sdk stats system_wrappers \
video -name "*.h" \
-exec $CP --parents '{}' <target dir> ';'
find . -maxdepth 1 -name "*.h" -exec $CP --parents '{}' <target dir> ';'

Tips:

  • Due to the file size limit of GitHub, I ignore libwebrtc.a, please extract it and put it under app/libs/webrtc/lib/armeabi-v7a/ before building.
  • It's important to disable RTTI in your project setting if you want to use WebRTC static library, otherwise linker will fail with something like undefined reference to 'typeinfo for rtc::MessageHandler'.
  • You also need add some definitions in your project, refer to here and here.
    • Android: WEBRTC_POSIX, WEBRTC_LINUX, WEBRTC_ANDROID
    • iOS: WEBRTC_POSIX, WEBRTC_MAC, WEBRTC_IOS

WebRTC src extractor

python webrtc_src_extractor.py <repo dir> <dst dir> <wanted src file, seperated by space>

If you only want use a small part of WebRTC code, this script could help you find all related sources and headers, and copy them into dst dir. Note that it's just a best effort script, you may still need copy several sources manually.

WebRTC classes and data flow

hackwebrtc's People

Contributors

piasy avatar

Watchers

 avatar  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.