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

Issue 164233005: Cap the memory usage in FFMpegDemuxer. (Closed)

Created:
6 years, 10 months ago by damienv1
Modified:
6 years, 10 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, Ami GONE FROM CHROMIUM
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Cap the memory usage in FFMpegDemuxer. Abort the playback if a specific stream triggers some high memory usage. BUG=343304 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252259

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Address comments from patch set #2. #

Total comments: 2

Patch Set 4 : #

Total comments: 5

Patch Set 5 : Address comments from patch set #4. #

Patch Set 6 : Forgot to address a nit from patch set #3. #

Patch Set 7 : Revert to IsMaxMemoryUsage api style in FFMpegDemuxer. #

Total comments: 7

Patch Set 8 : Use size_t instead of int. #

Total comments: 4

Patch Set 9 : Address comments from patch set #8. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -2 lines) Patch
media/base/decoder_buffer_queue.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
media/base/decoder_buffer_queue.cc View 1 2 3 4 5 6 7 4 chunks +13 lines, -1 line 0 comments Download
media/base/decoder_buffer_queue_unittest.cc View 1 2 3 4 5 6 7 2 chunks +31 lines, -0 lines 0 comments Download
media/filters/ffmpeg_demuxer.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
media/filters/ffmpeg_demuxer.cc View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
damienv1
PTAL.
6 years, 10 months ago (2014-02-14 02:39:51 UTC) #1
Ami GONE FROM CHROMIUM
are there UMA stats that say this is a problem worth solving? To unsubscribe from ...
6 years, 10 months ago (2014-02-14 02:56:55 UTC) #2
damienv1
* From UMA, it's hard to tell how much memory is used specifically by FFMpegDemuxer: ...
6 years, 10 months ago (2014-02-14 17:23:33 UTC) #3
Ami GONE FROM CHROMIUM
The "tradeoff" is not between (possibly infrequent) OOMs and the LOC delta of this CL. ...
6 years, 10 months ago (2014-02-14 17:39:50 UTC) #4
damienv1
1) I now understand your point regarding the threshold. So far, I use the same ...
6 years, 10 months ago (2014-02-14 17:52:33 UTC) #5
Ami GONE FROM CHROMIUM
I had misread your video limit as 15M instead of 150M. I don't have a ...
6 years, 10 months ago (2014-02-14 17:59:56 UTC) #6
Ami GONE FROM CHROMIUM
+acolwell to R line, move fischman to CC.
6 years, 10 months ago (2014-02-14 18:00:30 UTC) #7
acolwell GONE FROM CHROMIUM
I wonder if we should use time-based limits instead of memory based ones. Is the ...
6 years, 10 months ago (2014-02-18 22:16:20 UTC) #8
damienv1
Thanks for the feedback: 1) I think what matters here is really the memory usage ...
6 years, 10 months ago (2014-02-18 23:12:51 UTC) #9
damienv1
https://codereview.chromium.org/164233005/diff/140001/media/base/decoder_buffer_queue.cc File media/base/decoder_buffer_queue.cc (left): https://codereview.chromium.org/164233005/diff/140001/media/base/decoder_buffer_queue.cc#oldcode12 media/base/decoder_buffer_queue.cc:12: On 2014/02/14 17:23:33, damienv1 wrote: > #include <limits> Done. ...
6 years, 10 months ago (2014-02-18 23:38:03 UTC) #10
acolwell GONE FROM CHROMIUM
lgtm % nit https://codereview.chromium.org/164233005/diff/260001/media/base/decoder_buffer_queue_unittest.cc File media/base/decoder_buffer_queue_unittest.cc (right): https://codereview.chromium.org/164233005/diff/260001/media/base/decoder_buffer_queue_unittest.cc#newcode138 media/base/decoder_buffer_queue_unittest.cc:138: TEST(DecoderBufferQueueTest, Size) { nit: s/Size/DataSize/ https://codereview.chromium.org/164233005/diff/330001/media/filters/ffmpeg_demuxer.cc ...
6 years, 10 months ago (2014-02-18 23:57:48 UTC) #11
damienv1
https://codereview.chromium.org/164233005/diff/330001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/164233005/diff/330001/media/filters/ffmpeg_demuxer.cc#newcode918 media/filters/ffmpeg_demuxer.cc:918: bool FFmpegDemuxer::IsMaxMemoryReached() { Better design: have a MemoryUsage function ...
6 years, 10 months ago (2014-02-19 00:15:09 UTC) #12
damienv1
https://codereview.chromium.org/164233005/diff/330001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/164233005/diff/330001/media/filters/ffmpeg_demuxer.cc#newcode918 media/filters/ffmpeg_demuxer.cc:918: bool FFmpegDemuxer::IsMaxMemoryReached() { On 2014/02/19 00:15:09, damienv1 wrote: > ...
6 years, 10 months ago (2014-02-19 00:27:12 UTC) #13
damienv1
https://codereview.chromium.org/164233005/diff/260001/media/base/decoder_buffer_queue_unittest.cc File media/base/decoder_buffer_queue_unittest.cc (right): https://codereview.chromium.org/164233005/diff/260001/media/base/decoder_buffer_queue_unittest.cc#newcode138 media/base/decoder_buffer_queue_unittest.cc:138: TEST(DecoderBufferQueueTest, Size) { On 2014/02/18 23:57:48, acolwell wrote: > ...
6 years, 10 months ago (2014-02-19 00:33:58 UTC) #14
damienv1
Please let me know if you have additional feedback. Otherwise, I plan to merge the ...
6 years, 10 months ago (2014-02-19 18:22:41 UTC) #15
acolwell GONE FROM CHROMIUM
lgtm
6 years, 10 months ago (2014-02-19 18:34:39 UTC) #16
DaleCurtis
I defer to acolwell@'s judgement on the merits of this, but I have a couple ...
6 years, 10 months ago (2014-02-19 18:59:25 UTC) #17
damienv1
Dale, I can do the change to size_t. However for consistency, I preferred using "int". ...
6 years, 10 months ago (2014-02-19 19:21:09 UTC) #18
DaleCurtis
My preference is for your new code to be size_t w/ checked cast of DecoderBuffer's ...
6 years, 10 months ago (2014-02-19 19:23:54 UTC) #19
damienv1
https://codereview.chromium.org/164233005/diff/520001/media/base/decoder_buffer_queue_unittest.cc File media/base/decoder_buffer_queue_unittest.cc (right): https://codereview.chromium.org/164233005/diff/520001/media/base/decoder_buffer_queue_unittest.cc#newcode21 media/base/decoder_buffer_queue_unittest.cc:21: static scoped_refptr<DecoderBuffer> CreateBuffer(int timestamp, int size = 0) { ...
6 years, 10 months ago (2014-02-19 20:24:32 UTC) #20
DaleCurtis
lgtm https://codereview.chromium.org/164233005/diff/720001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/164233005/diff/720001/media/filters/ffmpeg_demuxer.cc#newcode326 media/filters/ffmpeg_demuxer.cc:326: size_t FFmpegDemuxerStream::MemoryUsage() const { You can declare this ...
6 years, 10 months ago (2014-02-19 20:56:20 UTC) #21
damienv1
https://codereview.chromium.org/164233005/diff/720001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/164233005/diff/720001/media/filters/ffmpeg_demuxer.cc#newcode326 media/filters/ffmpeg_demuxer.cc:326: size_t FFmpegDemuxerStream::MemoryUsage() const { On 2014/02/19 20:56:21, DaleCurtis wrote: ...
6 years, 10 months ago (2014-02-19 22:07:27 UTC) #22
damienv1
The CQ bit was checked by damienv@chromium.org
6 years, 10 months ago (2014-02-20 00:42:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/damienv@chromium.org/164233005/810001
6 years, 10 months ago (2014-02-20 01:43:51 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/damienv@chromium.org/164233005/810001
6 years, 10 months ago (2014-02-20 05:14:03 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/damienv@chromium.org/164233005/810001
6 years, 10 months ago (2014-02-20 09:10:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/damienv@chromium.org/164233005/810001
6 years, 10 months ago (2014-02-20 12:31:00 UTC) #27
commit-bot: I haz the power
6 years, 10 months ago (2014-02-20 16:13:27 UTC) #28
Message was sent while issue was closed.
Change committed as 252259

Powered by Google App Engine
This is Rietveld 408576698