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

Unified Diff: media/filters/frame_processor.h

Issue 1670033002: Reland: MSE: Relax the 'media segment must begin with keyframe' requirement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undid patch set 9's test change, since FrameProcessor *can* produce that output Created 4 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
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/frame_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/frame_processor.h
diff --git a/media/filters/frame_processor.h b/media/filters/frame_processor.h
index 68148f4ff47271b6382baa5f8c673194adcd0fa5..0a1ecc641858840226f4ac11b1160de591a5bd4e 100644
--- a/media/filters/frame_processor.h
+++ b/media/filters/frame_processor.h
@@ -49,9 +49,6 @@ class MEDIA_EXPORT FrameProcessor {
// |append_window_start| and |append_window_end| correspond to the MSE spec's
// similarly named source buffer attributes that are used in coded frame
// processing.
- // |*new_media_segment| tracks whether the next buffers processed within the
- // append window represent the start of a new media segment. This method may
- // both use and update this flag.
// Uses |*timestamp_offset| according to the coded frame processing algorithm,
// including updating it as required in 'sequence' mode frame processing.
bool ProcessFrames(const StreamParser::BufferQueue& audio_buffers,
@@ -59,7 +56,6 @@ class MEDIA_EXPORT FrameProcessor {
const StreamParser::TextBufferQueueMap& text_map,
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
- bool* new_media_segment,
base::TimeDelta* timestamp_offset);
// Signals the frame processor to update its group start timestamp to be
@@ -93,15 +89,17 @@ class MEDIA_EXPORT FrameProcessor {
void OnPossibleAudioConfigUpdate(const AudioDecoderConfig& config);
private:
+ friend class FrameProcessorTest;
+
typedef std::map<StreamParser::TrackId, MseTrackBuffer*> TrackBufferMap;
// If |track_buffers_| contains |id|, returns a pointer to the associated
// MseTrackBuffer. Otherwise, returns NULL.
MseTrackBuffer* FindTrack(StreamParser::TrackId id);
- // Signals all track buffers' streams that a new media segment is starting
- // with decode timestamp |segment_timestamp|.
- void NotifyNewMediaSegmentStarting(DecodeTimestamp segment_timestamp);
+ // Signals all track buffers' streams that a coded frame group is starting
+ // with decode timestamp |start_timestamp|.
+ void NotifyStartOfCodedFrameGroup(DecodeTimestamp start_timestamp);
// Helper that signals each track buffer to append any processed, but not yet
// appended, frames to its stream. Returns true on success, or false if one or
@@ -134,8 +132,7 @@ class MEDIA_EXPORT FrameProcessor {
bool ProcessFrame(const scoped_refptr<StreamParserBuffer>& frame,
base::TimeDelta append_window_start,
base::TimeDelta append_window_end,
- base::TimeDelta* timestamp_offset,
- bool* new_media_segment);
+ base::TimeDelta* timestamp_offset);
// TrackId-indexed map of each track's stream.
TrackBufferMap track_buffers_;
@@ -155,6 +152,12 @@ class MEDIA_EXPORT FrameProcessor {
// set to false ("segments").
bool sequence_mode_ = false;
+ // Flag to track whether or not the next processed frame is a continuation of
+ // a coded frame group. This flag resets to false upon detection of
+ // discontinuity, and becomes true once a processed coded frame for the
+ // current coded frame group is sent to its track buffer.
+ bool in_coded_frame_group_ = false;
+
// Tracks the MSE coded frame processing variable of same name.
// Initially kNoTimestamp(), meaning "unset".
base::TimeDelta group_start_timestamp_;
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/frame_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698