Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: content/renderer/media/video_track_recorder.cc

Issue 2325833002: Handle frames sent from peer connection in VideoTrackRecorder (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/video_track_recorder.cc
diff --git a/content/renderer/media/video_track_recorder.cc b/content/renderer/media/video_track_recorder.cc
index f66343f31ab0d62d39d40d1d4d621a5296e41a0f..d924f1bfcf1feb2ed343ad8a43cccfcd6766f97f 100644
--- a/content/renderer/media/video_track_recorder.cc
+++ b/content/renderer/media/video_track_recorder.cc
@@ -626,8 +626,11 @@ void VEAEncoder::EncodeOnEncodingTaskRunner(
// Lower resolutions may fall back to SW encoder in some platforms, i.e. Mac.
// In that case, the encoder expects more frames before returning result.
// Therefore, a copy is necessary to release the current frame.
+ // Only STORAGE_SHMEM backed frames can be shared with GPU process, therefore
+ // a copy is required for other storage types.
scoped_refptr<media::VideoFrame> video_frame = frame;
- if (vea_requested_input_size_ != input_size_ ||
+ if (video_frame->storage_type() != VideoFrame::STORAGE_SHMEM ||
+ vea_requested_input_size_ != input_size_ ||
input_size_.width() < kVEAEncoderMinResolutionWidth ||
input_size_.height() < kVEAEncoderMinResolutionHeight) {
// Create SharedMemory backed input buffers as necessary. These SharedMemory
« no previous file with comments | « content/browser/webrtc/webrtc_media_recorder_browsertest.cc ('k') | content/test/data/media/mediarecorder_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698