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

Side by Side Diff: media/base/pts_heap.h

Issue 7601002: Revert r95841 due to failing media_unittests on linux_shared bot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/base/pipeline_impl.h ('k') | media/base/pts_stream.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BASE_PTS_HEAP_H_ 5 #ifndef MEDIA_BASE_PTS_HEAP_H_
6 #define MEDIA_BASE_PTS_HEAP_H_ 6 #define MEDIA_BASE_PTS_HEAP_H_
7 7
8 // The compressed frame are often in decode timestamp (dts) order, which 8 // The compressed frame are often in decode timestamp (dts) order, which
9 // may not always be in presentation timestamp (pts) order. However, the 9 // may not always be in presentation timestamp (pts) order. However, the
10 // decoded frames will always be returned in pts order. Ideally, the pts could 10 // decoded frames will always be returned in pts order. Ideally, the pts could
11 // be attached as metadata to each comprsesed frame, and the decoder would 11 // be attached as metadata to each comprsesed frame, and the decoder would
(...skipping 12 matching lines...) Expand all
24 // 5 6 4 <-' incorrect, which is why we sort and 24 // 5 6 4 <-' incorrect, which is why we sort and
25 // 6 5 5 queue incoming timestamps 25 // 6 5 5 queue incoming timestamps
26 // 26 //
27 // The PtsHeap expects that for every Pop(), there was a corresponding Push(). 27 // The PtsHeap expects that for every Pop(), there was a corresponding Push().
28 // It will CHECK fail otherwise. 28 // It will CHECK fail otherwise.
29 29
30 #include <queue> 30 #include <queue>
31 #include <vector> 31 #include <vector>
32 32
33 #include "base/time.h" 33 #include "base/time.h"
34 #include "media/base/media_export.h"
35 34
36 namespace media { 35 namespace media {
37 36
38 class MEDIA_EXPORT PtsHeap { 37 class PtsHeap {
39 public: 38 public:
40 PtsHeap(); 39 PtsHeap();
41 ~PtsHeap(); 40 ~PtsHeap();
42 41
43 void Push(const base::TimeDelta& pts); 42 void Push(const base::TimeDelta& pts);
44 void Pop(); 43 void Pop();
45 44
46 const base::TimeDelta& Top() const { return queue_.top(); } 45 const base::TimeDelta& Top() const { return queue_.top(); }
47 bool IsEmpty() const { return queue_.empty(); } 46 bool IsEmpty() const { return queue_.empty(); }
48 47
(...skipping 11 matching lines...) Expand all
60 PtsHeapOrdering> TimeQueue; 59 PtsHeapOrdering> TimeQueue;
61 60
62 TimeQueue queue_; 61 TimeQueue queue_;
63 62
64 DISALLOW_COPY_AND_ASSIGN(PtsHeap); 63 DISALLOW_COPY_AND_ASSIGN(PtsHeap);
65 }; 64 };
66 65
67 } // namespace media 66 } // namespace media
68 67
69 #endif // MEDIA_BASE_PTS_HEAP_H_ 68 #endif // MEDIA_BASE_PTS_HEAP_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.h ('k') | media/base/pts_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698