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

Side by Side Diff: media/filters/frame_processor.h

Issue 381443002: MSE: Optimize frame processor appends to streams (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments and rebase Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/frame_processor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FILTERS_FRAME_PROCESSOR_H_ 5 #ifndef MEDIA_FILTERS_FRAME_PROCESSOR_H_
6 #define MEDIA_FILTERS_FRAME_PROCESSOR_H_ 6 #define MEDIA_FILTERS_FRAME_PROCESSOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 typedef std::map<StreamParser::TrackId, MseTrackBuffer*> TrackBufferMap; 94 typedef std::map<StreamParser::TrackId, MseTrackBuffer*> TrackBufferMap;
95 95
96 // If |track_buffers_| contains |id|, returns a pointer to the associated 96 // If |track_buffers_| contains |id|, returns a pointer to the associated
97 // MseTrackBuffer. Otherwise, returns NULL. 97 // MseTrackBuffer. Otherwise, returns NULL.
98 MseTrackBuffer* FindTrack(StreamParser::TrackId id); 98 MseTrackBuffer* FindTrack(StreamParser::TrackId id);
99 99
100 // Signals all track buffers' streams that a new media segment is starting 100 // Signals all track buffers' streams that a new media segment is starting
101 // with timestamp |segment_timestamp|. 101 // with timestamp |segment_timestamp|.
102 void NotifyNewMediaSegmentStarting(base::TimeDelta segment_timestamp); 102 void NotifyNewMediaSegmentStarting(base::TimeDelta segment_timestamp);
103 103
104 // Helper that signals each track buffer to append any processed, but not yet
105 // appended, frames to its stream. Returns true on success, or false if one or
106 // more of the appends failed.
107 bool FlushProcessedFrames();
108
104 // Handles partial append window trimming of |buffer|. Returns true if the 109 // Handles partial append window trimming of |buffer|. Returns true if the
105 // given |buffer| can be partially trimmed or have preroll added; otherwise, 110 // given |buffer| can be partially trimmed or have preroll added; otherwise,
106 // returns false. 111 // returns false.
107 // 112 //
108 // If |buffer| overlaps |append_window_start|, the portion of |buffer| before 113 // If |buffer| overlaps |append_window_start|, the portion of |buffer| before
109 // |append_window_start| will be marked for post-decode discard. Further, if 114 // |append_window_start| will be marked for post-decode discard. Further, if
110 // |audio_preroll_buffer_| exists and abuts |buffer|, it will be set as 115 // |audio_preroll_buffer_| exists and abuts |buffer|, it will be set as
111 // preroll on |buffer| and |audio_preroll_buffer_| will be cleared. If the 116 // preroll on |buffer| and |audio_preroll_buffer_| will be cleared. If the
112 // preroll buffer does not abut |buffer|, it will be discarded, but not used. 117 // preroll buffer does not abut |buffer|, it will be discarded, but not used.
113 // 118 //
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 base::TimeDelta group_end_timestamp_; 161 base::TimeDelta group_end_timestamp_;
157 162
158 UpdateDurationCB update_duration_cb_; 163 UpdateDurationCB update_duration_cb_;
159 164
160 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); 165 DISALLOW_COPY_AND_ASSIGN(FrameProcessor);
161 }; 166 };
162 167
163 } // namespace media 168 } // namespace media
164 169
165 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ 170 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/frame_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698