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

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

Issue 341083004: Introduce the playback time into the MSE garbage collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New flow to pass the media time to SourceBufferStream. Created 6 years, 6 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 | « media/filters/chunk_demuxer.cc ('k') | 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 12 matching lines...) Expand all
23 virtual ~FrameProcessor(); 23 virtual ~FrameProcessor();
24 24
25 // FrameProcessorBase implementation 25 // FrameProcessorBase implementation
26 virtual void SetSequenceMode(bool sequence_mode) OVERRIDE; 26 virtual void SetSequenceMode(bool sequence_mode) OVERRIDE;
27 virtual bool ProcessFrames(const StreamParser::BufferQueue& audio_buffers, 27 virtual bool ProcessFrames(const StreamParser::BufferQueue& audio_buffers,
28 const StreamParser::BufferQueue& video_buffers, 28 const StreamParser::BufferQueue& video_buffers,
29 const StreamParser::TextBufferQueueMap& text_map, 29 const StreamParser::TextBufferQueueMap& text_map,
30 base::TimeDelta append_window_start, 30 base::TimeDelta append_window_start,
31 base::TimeDelta append_window_end, 31 base::TimeDelta append_window_end,
32 bool* new_media_segment, 32 bool* new_media_segment,
33 base::TimeDelta* timestamp_offset) OVERRIDE; 33 base::TimeDelta* timestamp_offset,
34 base::TimeDelta media_time) OVERRIDE;
34 35
35 private: 36 private:
36 // Helper that processes one frame with the coded frame processing algorithm. 37 // Helper that processes one frame with the coded frame processing algorithm.
37 // Returns false on error or true on success. 38 // Returns false on error or true on success.
38 bool ProcessFrame(const scoped_refptr<StreamParserBuffer>& frame, 39 bool ProcessFrame(const scoped_refptr<StreamParserBuffer>& frame,
39 base::TimeDelta append_window_start, 40 base::TimeDelta append_window_start,
40 base::TimeDelta append_window_end, 41 base::TimeDelta append_window_end,
41 base::TimeDelta* timestamp_offset, 42 base::TimeDelta* timestamp_offset,
42 bool* new_media_segment); 43 bool* new_media_segment,
44 base::TimeDelta media_time);
43 45
44 // Tracks the MSE coded frame processing variable of same name. It stores the 46 // Tracks the MSE coded frame processing variable of same name. It stores the
45 // highest coded frame end timestamp across all coded frames in the current 47 // highest coded frame end timestamp across all coded frames in the current
46 // coded frame group. It is set to 0 when the SourceBuffer object is created 48 // coded frame group. It is set to 0 when the SourceBuffer object is created
47 // and gets updated by ProcessFrames(). 49 // and gets updated by ProcessFrames().
48 base::TimeDelta group_end_timestamp_; 50 base::TimeDelta group_end_timestamp_;
49 51
50 UpdateDurationCB update_duration_cb_; 52 UpdateDurationCB update_duration_cb_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(FrameProcessor); 54 DISALLOW_COPY_AND_ASSIGN(FrameProcessor);
53 }; 55 };
54 56
55 } // namespace media 57 } // namespace media
56 58
57 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_ 59 #endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/frame_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698