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

Side by Side Diff: media/base/android/au_queue.h

Issue 1128383003: Implementation of MediaCodecPlayer stage 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_BASE_ANDROID_AU_QUEUE_H_
6 #define MEDIA_BASE_ANDROID_AU_QUEUE_H_
7
8 #include <deque>
9
10 #include "base/macros.h"
11 #include "base/synchronization/lock.h"
12 #include "media/base/android/demuxer_stream_player_params.h"
13
14 namespace media {
15
16 class AUQueue {
17 public:
18 struct Info {
19 const AccessUnit* front_unit;
20 const DemuxerConfigs* configs;
21 int length;
22 bool has_eos;
23
24 Info()
25 : front_unit(nullptr), configs(nullptr), length(0), has_eos(false) {}
26 };
27
28 AUQueue();
29 virtual ~AUQueue();
30
31 void PushBack(const DemuxerData& frames);
32 void PopFront();
33 void Flush();
34
35 // Looks for the first key frame and if it exists,
36 // removes prior frames an returns true. If it does not
37 // exist returns false.
38 bool SkipToKeyFrame();
39
40 void GetInfo(Info* info) const;
41
42 bool HasEOS() const;
43 int Length() const;
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(AUQueue);
47
48 std::deque<AccessUnit> access_units_;
49 std::deque<DemuxerConfigs> demuxer_configs_;
50 bool has_eos_;
51
52 mutable base::Lock lock_;
53
54 };
55
56 } // namespace media
57
58 // For logging
59 std::ostream& operator<<(std::ostream& os, const media::AccessUnit& au);
60
61 #endif // MEDIA_BASE_ANDROID_AU_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698