This reverts commit 3e9068a6b488c63d98e5dd8a21caf7b83eb3744f. Reason for revert: Fixed Chrome compile in https://crrev.com/c/2207191. Original change's description: > Revert "Make TransformableVideoFrameInterface::GetMetadata pure virtual." > > This reverts commit 576ad5d510894040d7bbc041d5c86745c67f30f8. > > Reason for revert: Causes compile error in Chrome. > > Original change's description: > > Make TransformableVideoFrameInterface::GetMetadata pure virtual. > > > > GetMetadata() has been implemented downstream and can be made pure > > virtual. > > > > Bug: chromium:1069295 > > Change-Id: I62a3be6106552d2d82d8c413c6f523d31626b0d8 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175001 > > Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org> > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#31281} > > TBR=hta@webrtc.org,marinaciocea@webrtc.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: chromium:1069295 > Change-Id: I5915270d5b8dab9fc30a07f22fddedb29beca01a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175620 > Reviewed-by: Guido Urdaneta <guidou@webrtc.org> > Commit-Queue: Guido Urdaneta <guidou@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#31304} TBR=hta@webrtc.org,guidou@webrtc.org,marinaciocea@webrtc.org # Not skipping CQ checks because this is a reland. Bug: chromium:1069295 Change-Id: Icc192a38f2c17898d3547e0eb38aa399befe6250 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175624 Reviewed-by: Marina Ciocea <marinaciocea@webrtc.org> Commit-Queue: Marina Ciocea <marinaciocea@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31312}
How to write code in the api/ directory
Mostly, just follow the regular style guide, but:
- Note that
api/code is not exempt from the “.hand.ccfiles come in pairs” rule, so if you declare something inapi/path/to/foo.h, it should be defined inapi/path/to/foo.cc. - Headers in
api/should, if possible, not#includeheaders outsideapi/. It’s not always possible to avoid this, but be aware that it adds to a small mountain of technical debt that we’re trying to shrink. .ccfiles inapi/, on the other hand, are free to#includeheaders outsideapi/.
That is, the preferred way for api/ code to access non-api/ code is to call
it from a .cc file, so that users of our API headers won’t transitively
#include non-public headers.
For headers in api/ that need to refer to non-public types, forward
declarations are often a lesser evil than including non-public header files. The
usual rules still apply, though.
.cc files in api/ should preferably be kept reasonably small. If a
substantial implementation is needed, consider putting it with our non-public
code, and just call it from the api/ .cc file.