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

Unified Diff: media/formats/webm/webm_cluster_parser.h

Issue 238273002: Adds WebMClusterParserTest coverage for duration default/estimation/fallback logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cast to int to compare enum values in COMPILE_ASSERTs Created 6 years, 8 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
« no previous file with comments | « media/formats/webm/cluster_builder.cc ('k') | media/formats/webm/webm_cluster_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/webm/webm_cluster_parser.h
diff --git a/media/formats/webm/webm_cluster_parser.h b/media/formats/webm/webm_cluster_parser.h
index 5657e9054701e3115be3025f9e7a1511e5496dee..add21f23f91d432a20efd47cc32bbaa1e8d8bfc1 100644
--- a/media/formats/webm/webm_cluster_parser.h
+++ b/media/formats/webm/webm_cluster_parser.h
@@ -24,6 +24,15 @@ class MEDIA_EXPORT WebMClusterParser : public WebMParserClient {
public:
typedef StreamParser::TrackId TrackId;
+ // Arbitrarily-chosen numbers to estimate the duration of a buffer if none is
+ // set and there is not enough information to get a better estimate.
+ // TODO(wolenetz/acolwell): Parse audio codebook to determine missing audio
+ // frame durations. See http://crbug.com/351166.
+ enum {
+ kDefaultAudioBufferDurationInMs = 23, // Common 1k samples @44.1kHz
+ kDefaultVideoBufferDurationInMs = 42 // Low 24fps to reduce stalls
+ };
+
private:
// Helper class that manages per-track state.
class Track {
« no previous file with comments | « media/formats/webm/cluster_builder.cc ('k') | media/formats/webm/webm_cluster_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698