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

Unified Diff: media/filters/ffmpeg_demuxer.h

Issue 164233005: Cap the memory usage in FFMpegDemuxer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to IsMaxMemoryUsage api style in FFMpegDemuxer. Created 6 years, 10 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: media/filters/ffmpeg_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index ea2b9085f5d9a9e73b31887f459c3cd2df7c917b..7f66a472d9a988809ebd1498b98e91baf7007eab 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -94,6 +94,9 @@ class FFmpegDemuxerStream : public DemuxerStream {
// Returns true if this stream has capacity for additional data.
bool HasAvailableCapacity();
+ // Returns the total buffer size FFMpegDemuxerStream is holding onto.
+ int MemoryUsage() const;
DaleCurtis 2014/02/19 18:59:25 size_t again.
damienv1 2014/02/19 20:24:33 Done.
+
TextKind GetTextKind() const;
// Returns the value associated with |key| in the metadata for the avstream.
@@ -182,6 +185,9 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
// go over capacity depending on how the file is muxed.
bool StreamsHaveAvailableCapacity();
+ // Returns true if the maximum allowed memory usage has been reached.
+ bool IsMaxMemoryUsageReached() const;
+
// Signal all FFmpegDemuxerStreams that the stream has ended.
void StreamHasEnded();

Powered by Google App Engine
This is Rietveld 408576698