This reverts commit e6eded31e642b3b986fef478315603b5f398c227. Reason for revert: A better method for communicating encoded frames in VideoTrackSourceInterface surfaced. Original change's description: > VideoFrame: Store a reference to an encoded frame > > Enable webrtc::VideoFrame to store a reference to an encoded frame. > > Bug: chromium:1013590 > Change-Id: Id5a06f1c7249f104dfd328f08677cf8001958f0d > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158788 > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > Reviewed-by: Philip Eliasson <philipel@webrtc.org> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> > Reviewed-by: Niels Moller <nisse@webrtc.org> > Commit-Queue: Markus Handell <handellm@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#29809} TBR=ilnik@webrtc.org,nisse@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,handellm@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:1013590 Change-Id: I46384b7997e7b1cd3a2a2042cf17890fc977cca3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160204 Reviewed-by: Markus Handell <handellm@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29863}
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.