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

Issue 1171263004: Allow setting memory limits on media::DemuxerStream (Closed)

Created:
5 years, 6 months ago by servolk
Modified:
4 years, 7 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, Aaron Boodman, lcwu+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, feature-media-reviews_chromium.org, gunsch+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow setting memory limits on media::DemuxerStream See crbug.com/498482 for details. In short: We need to allow setting memory usage limits for demuxer streams via public DemuxerStream interface. This would be useful for unit tests and low-memory platforms that can't afford default memory limits. I've removed the old ChunkDemuxer::SetMemoryLimits API and replaced it with media::DemuxerStream::SetMemoryLimit, since it's trivial to obtain DemuxerStream* via public media::Demuxer::GetStream interface. BUG=498482

Patch Set 1 #

Patch Set 2 : Rebase to ToT #

Patch Set 3 : Update comments in FFmpegDemuxerStream #

Patch Set 4 : FFmpeg comment #

Patch Set 5 : Rebase #

Total comments: 5

Patch Set 6 : CR feedback #

Patch Set 7 : Include logging.h for NOTIMPLEMENTED definition #

Total comments: 8

Patch Set 8 : Rebase #

Patch Set 9 : Changed limit type to size_t and made interface functions pure virtual #

Patch Set 10 : Added Get/SetMemoryLimit in Chromecast test and Mojo adapter #

Patch Set 11 : whitespace cleanup #

Total comments: 4

Patch Set 12 : fixed typo #

Total comments: 16

Patch Set 13 : Merged CL that adds get/set buffer size on WMP #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -57 lines) Patch
M chromecast/media/cma/test/demuxer_stream_for_test.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chromecast/media/cma/test/demuxer_stream_for_test.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M content/renderer/media/android/media_source_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/android/media_source_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +34 lines, -0 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +28 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +23 lines, -0 lines 0 comments Download
M media/base/demuxer_stream.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M media/base/fake_demuxer_stream.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/fake_demuxer_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M media/base/fake_text_track_stream.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/fake_text_track_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/mock_filters.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +26 lines, -0 lines 0 comments Download
M media/filters/chunk_demuxer.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -10 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -34 lines 0 comments Download
M media/filters/chunk_demuxer_unittest.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -3 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -0 lines 0 comments Download
M media/filters/source_buffer_stream.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -2 lines 0 comments Download
M media/filters/source_buffer_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -7 lines 0 comments Download
M media/filters/source_buffer_stream_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M media/mojo/services/mojo_demuxer_stream_adapter.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/mojo/services/mojo_demuxer_stream_adapter.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (7 generated)
servolk
5 years, 6 months ago (2015-06-10 00:28:02 UTC) #2
servolk
On 2015/06/10 00:28:02, servolk wrote: PTAL I believe we should land this CL first, this ...
5 years, 6 months ago (2015-06-11 02:17:11 UTC) #4
philipj_slow
Non-owner LGTM, but I only took a quick peek. https://codereview.chromium.org/1171263004/diff/80001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/1171263004/diff/80001/media/base/demuxer_stream.h#newcode94 media/base/demuxer_stream.h:94: ...
5 years, 6 months ago (2015-06-11 08:44:05 UTC) #5
chcunningham
lgtm https://codereview.chromium.org/1171263004/diff/80001/media/base/fake_text_track_stream.cc File media/base/fake_text_track_stream.cc (right): https://codereview.chromium.org/1171263004/diff/80001/media/base/fake_text_track_stream.cc#newcode48 media/base/fake_text_track_stream.cc:48: NOTIMPLEMENTED(); We're having to do this same override ...
5 years, 6 months ago (2015-06-11 18:56:55 UTC) #6
wolenetz
On 2015/06/11 18:56:55, chcunningham wrote: > lgtm > > https://codereview.chromium.org/1171263004/diff/80001/media/base/fake_text_track_stream.cc > File media/base/fake_text_track_stream.cc (right): > ...
5 years, 6 months ago (2015-06-12 00:03:47 UTC) #7
servolk
https://codereview.chromium.org/1171263004/diff/80001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/1171263004/diff/80001/media/base/demuxer_stream.h#newcode94 media/base/demuxer_stream.h:94: // Get the maximum amount of data that this ...
5 years, 6 months ago (2015-06-12 00:50:48 UTC) #8
wolenetz
https://codereview.chromium.org/1171263004/diff/80001/media/base/fake_text_track_stream.cc File media/base/fake_text_track_stream.cc (right): https://codereview.chromium.org/1171263004/diff/80001/media/base/fake_text_track_stream.cc#newcode48 media/base/fake_text_track_stream.cc:48: NOTIMPLEMENTED(); On 2015/06/12 00:50:48, servolk wrote: > On 2015/06/11 ...
5 years, 6 months ago (2015-06-12 21:31:57 UTC) #9
servolk
Ok, I've changed the DemuxerStream interface definitions back to pure virtual and changed the memory ...
5 years, 6 months ago (2015-06-16 01:30:52 UTC) #10
servolk
On 2015/06/16 01:30:52, servolk wrote: > Ok, I've changed the DemuxerStream interface definitions back to ...
5 years, 6 months ago (2015-06-16 22:59:06 UTC) #11
wolenetz
On 2015/06/16 22:59:06, servolk wrote: > On 2015/06/16 01:30:52, servolk wrote: > > Ok, I've ...
5 years, 6 months ago (2015-06-16 23:03:06 UTC) #12
wolenetz
lgtm % nits. It looks like OWNER reviewer for //chromecast is missing, though. https://codereview.chromium.org/1171263004/diff/200001/media/filters/ffmpeg_demuxer.cc File ...
5 years, 6 months ago (2015-06-16 23:17:17 UTC) #13
servolk
On 2015/06/16 23:17:17, wolenetz wrote: > lgtm % nits. It looks like OWNER reviewer for ...
5 years, 6 months ago (2015-06-16 23:23:06 UTC) #15
servolk
https://codereview.chromium.org/1171263004/diff/200001/media/filters/ffmpeg_demuxer.cc File media/filters/ffmpeg_demuxer.cc (right): https://codereview.chromium.org/1171263004/diff/200001/media/filters/ffmpeg_demuxer.cc#newcode486 media/filters/ffmpeg_demuxer.cc:486: // currently is has a hard-coded limit of 150Mb ...
5 years, 6 months ago (2015-06-16 23:27:07 UTC) #16
lcwu1
lgtm
5 years, 6 months ago (2015-06-17 01:32:55 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1171263004/220001
5 years, 6 months ago (2015-06-17 01:38:55 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/100093)
5 years, 6 months ago (2015-06-17 03:29:02 UTC) #22
ddorwin
I would rather that this not be committed until we can work through some of ...
5 years, 6 months ago (2015-06-17 21:02:17 UTC) #24
wolenetz
On 2015/06/17 21:02:17, ddorwin wrote: > I would rather that this not be committed until ...
5 years, 6 months ago (2015-06-17 21:11:47 UTC) #25
wolenetz
On 2015/06/17 21:11:47, wolenetz wrote: > On 2015/06/17 21:02:17, ddorwin wrote: > > I would ...
5 years, 6 months ago (2015-06-17 21:20:41 UTC) #26
servolk
https://codereview.chromium.org/1171263004/diff/220001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/1171263004/diff/220001/media/base/demuxer_stream.h#newcode94 media/base/demuxer_stream.h:94: // Get the data buffer size limit, in bytes. ...
5 years, 6 months ago (2015-06-17 22:13:48 UTC) #27
ddorwin
https://codereview.chromium.org/1171263004/diff/220001/media/base/demuxer_stream.h File media/base/demuxer_stream.h (right): https://codereview.chromium.org/1171263004/diff/220001/media/base/demuxer_stream.h#newcode94 media/base/demuxer_stream.h:94: // Get the data buffer size limit, in bytes. ...
5 years, 6 months ago (2015-06-20 01:50:26 UTC) #28
ddorwin
The more I think about this and https://codereview.chromium.org/1182183004/, the more concerned I am about this ...
5 years, 6 months ago (2015-06-20 01:58:26 UTC) #29
chcunningham
4 years, 9 months ago (2016-03-23 04:21:47 UTC) #30
On 2015/06/20 01:58:26, ddorwin wrote:
> The more I think about this and https://codereview.chromium.org/1182183004/,
the
> more concerned I am about this approach. I think we need to step back and
think
> about what it is you are trying to accomplish (presumably limiting total
memory
> usage) and how best to solve that (across SourceBuffers, streams, media
> elements, etc.).

Hey Servolk, Can we close this?

Powered by Google App Engine
This is Rietveld 408576698