1Name: ffmpeg
2URL: http://ffmpeg.org/
3License: LGPL 2.1
4License File: CREDITS.chromium
5Upstream Git: git://source.ffmpeg.org/ffmpeg.git
6Last Upstream Merge: acbd950ed297fded711481a4059a83b085f888ae, Feb 19 2020
7
8This file documents the layout of the Chromium copy of FFmpeg, some common
9tasks, and how to create the build files and related configurations.
10
11FFmpeg Layout:
12==============
13
14Chromium's copy of FFmpeg is a fork of the upstream git repository, see the
15tags above for the latest merged upstream revision.  All of the
16Chromium-specific bits, minus the gn files, are located under the chromium/
17folder off the root.
18
19    BUILD.gn: Has the targets for building FFmpeg for Chrome.
20
21    ffmpeg_generated.gni: Pregenerated listing of files necessary to build
22      every platform.  See chromium/scripts/generate_gn.py for more details.
23
24    chromium/scripts: Utilities for building the gn and config files.
25
26    chromium/config/...: Pregenerated FFmpeg config options for each platform
27      and architecture; e.g., ChromeOS: ARM-Neon, Linux: X64, etc.
28
29    chromium/patches/README: Details of Chromium-specific changes that haven't
30      yet made it upstream.
31
32
33Help w/ Common Tasks:
34=====================
35
36-- Submitting changes to Chromium's FFmpeg Git repository.
37
38The goal of Chromium's FFmpeg repository is to just be a mirror of the upstream
39Git repository.  This means every change made must be upstreamed.  If you make
40a change, please add an entry to chromium/patches/README with a link to the
41tracking issue and code review for your change. Reviews are performed with
42Gerrit at https://chromium-review.googlesource.com.
43
44  1) Create a branch and make a local, single commit. Gerrit differs from
45     Rietveld in that you must have a single commit, so use git commit --amend
46     if you need to make changes. Verify that your commit contains a
47     Change-Id field, which is how Gerrit coalesces separate patch sets into the
48     same code review.
49
50  2) Upload for review:
51     git cl upload
52
53  3) Commit via https://chromium-review.googlesource.com once approved.
54
55  4) If needed, submit a Chromium-side change to update DEPS.
56
57-- Upstreaming a patch.
58
59  <checkout copy of upstream repo>
60  git checkout <hash of last Chromium FFmpeg, see tag above> -b my_patch
61  git apply <patch. pulled from code review or cherry-picked from this repo>
62  git rebase origin/master
63  < Follow FFmpeg guide: http://ffmpeg.org/developer.html#Submitting-patches-1 >
64
65Once your change has been upstreamed, please update the chromium/patches/README
66file with the status.  The next time an upstream merge is done, the committer
67will clear out all the patches which have been upstreamed.
68
69-- Cherry-picking a patch from upstream.
70
71  # Tell our repo about the upstream one.
72  git remote add upstream git://source.ffmpeg.org/ffmpeg.git
73  git fetch upstream
74
75  # Create a new branch based off of master for committing our patch.
76  git checkout origin/master -b my_new_branch
77
78  # Pull the patch out of upstream.
79  git cherry-pick -x <hash of commit in upstream>
80
81  <Follow rest of "Submitting changes to Chromium's FFmpeg Git repository.">
82
83
84Performing An Upstream Merge
85============================
86
87Currently this is an extremely tedious process that requires access to a Linux,
88Mac, and Windows development machine and lot of blood, sweat, and tears.
89
90The instructions are also prone to going stale, so in the interest of
91collaboration and sharing tips we have moved to a public document:
92https://docs.google.com/a/chromium.org/document/d/14bqZ9NISsyEO3948wehhJ7wc9deTIz-yHUhF1MQp7Po/edit#
93