Chinese Yellow Pages | Classifieds | Knowledge | Tax | IME

how to submit a patch to google’s webrtc native

I recently submitted a patch to webrtc native.

https://webrtc-review.googlesource.com/c/src/+/143841

https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/discuss-webrtc/zn4kmjflvt4

The process is not that difficult, but there could be some caveats depending on your os version etc.

Here is my notes/steps:

 

Read official doc

Basically you should follow this official doc is at:

https://webrtc.org/contributing/

 

install depot_tools

mkdir webrtc && cd webrtc

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=$PATH:/path/to/depot_tools

checkout webrtc native code

mkdir webrtc-checkout
cd webrtc-checkout

fetch –nohooks webrtc ( will pull down the webrtc source etc. maybe others)

build webrtc native code

gclient sync ( what does it do? Installing Debian sid i386 root image,Downloading src/resources/near16_stereo.pcm … )
./build/install-build-deps.sh ( may need to looks some errors, in my case need to some pkgs manually, since I am on debian 10, need change to php7.3 in that install-build-deps.sh file )

-if package_exists php7.2-cgi; then
+if package_exists php7.3-cgi; then
+ dev_list=”${dev_list} php7.3-cgi libapache2-mod-php7.3″
+elif package_exists php7.2-cgi; then
dev_list=”${dev_list} php7.2-cgi libapache2-mod-php7.2″
elif package_exists php7.1-cgi; then
dev_list=”${dev_list} php7.1-cgi libapache2-mod-php7.1″

git checkout master
git pull origin master

cd ./build/; git stash; cd ../ # need to cd ./build, and git stash otherwise it will  complains my changes for that install-build-deps.sh

gclient sync

gn gen out/Default
ninja -C out/Default

sign up contributor agreement and commit user/pw

follow: https://webrtc.org/contributing/#contributor-agreement

  1. Go to https://webrtc.googlesource.com/new-password and login with your email account. This should be the same account as is returned by git config user.email.
  2. Follow the instructions on how to store the credentials in the .gitcookies file in your home directory.
  3. git cl creds-check

to file a bug

https://webrtc.org/bugs/

 

Fix and upload fix

# Assuming you’re on the master branch:
git checkout -b my-work-branch
# Make changes, build locally, run tests locally
git commit -am “Changed x, and it is working”
git cl upload

run the unitest test

./out/Default/rtc_unittests –gtest_filter=StunServerTest*

get a CL link and get a review etc.

  1. The command will print a link like https://webrtc-review.googlesource.com/c/src/+/53121 if everything goes well.
  2. Click the CL link.

Find reviewer

You could use : git cl owners

to find reviewer/committer for you.

The review people were nice and very helpful,  seems could  responded within couple of hours.

more details at:

https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md

 

Running Automation tests

They call  it tryjobs, but first time submitter usually do not have permission/rights to submit tryjobs, you can ask one of the reviewer to help/submit for you.

 

Call it a day (Fishish)

After several back and forth between you and reviewers, your patch could be accepted.

 

Please rate this


Comments are closed here.