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

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

Issue 1966673002: media: Fix WebM keyframe detection in BlockGroup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add unit tests with keyframe verification Created 4 years, 7 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 415b81ac5549c97832bfa41198acb2dc6986f06d..a050c1d7855c9cdc6309b04379298e7d025c0108 100644
--- a/media/formats/webm/webm_cluster_parser.h
+++ b/media/formats/webm/webm_cluster_parser.h
@@ -96,12 +96,6 @@ class MEDIA_EXPORT WebMClusterParser : public WebMParserClient {
// |ready_buffers_|.
void Reset();
- // Helper function used to inspect block data to determine if the
- // block is a keyframe.
- // |data| contains the bytes in the block.
- // |size| indicates the number of bytes in |data|.
- bool IsKeyframe(const uint8_t* data, int size) const;
-
base::TimeDelta default_duration() const { return default_duration_; }
private:
@@ -222,17 +216,18 @@ class MEDIA_EXPORT WebMClusterParser : public WebMParserClient {
const uint8_t* additional,
int additional_size,
int duration,
- int64_t discard_padding);
+ int64_t discard_padding,
+ bool reference_block_set);
bool OnBlock(bool is_simple_block,
int track_num,
int timecode,
int duration,
- int flags,
const uint8_t* data,
int size,
const uint8_t* additional,
int additional_size,
- int64_t discard_padding);
+ int64_t discard_padding,
+ bool is_keyframe);
// Resets the Track objects associated with each text track.
void ResetTextTracks();
@@ -298,6 +293,8 @@ class MEDIA_EXPORT WebMClusterParser : public WebMParserClient {
int64_t discard_padding_ = -1;
bool discard_padding_set_ = false;
+ bool reference_block_set_ = false;
+
int64_t cluster_timecode_ = -1;
base::TimeDelta cluster_start_time_;
bool cluster_ended_ = false;
« 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