Lines Matching defs:queue

36   DecoderBufferQueue queue;
37 EXPECT_TRUE(queue.IsEmpty());
39 queue.Push(CreateBuffer(0));
40 EXPECT_FALSE(queue.IsEmpty());
44 DecoderBufferQueue queue;
45 queue.Push(CreateBuffer(0));
46 queue.Push(CreateBuffer(1));
47 EXPECT_FALSE(queue.IsEmpty());
48 EXPECT_EQ(1, queue.Duration().InSeconds());
50 queue.Clear();
51 EXPECT_TRUE(queue.IsEmpty());
52 EXPECT_EQ(0, queue.Duration().InSeconds());
56 DecoderBufferQueue queue;
57 EXPECT_EQ(0, queue.Duration().InSeconds());
59 queue.Push(CreateBuffer(0));
60 EXPECT_EQ(0, queue.Duration().InSeconds());
62 queue.Push(CreateBuffer(1));
63 EXPECT_EQ(1, queue.Duration().InSeconds());
65 queue.Push(CreateBuffer(2));
66 EXPECT_EQ(2, queue.Duration().InSeconds());
68 queue.Push(CreateBuffer(4));
69 EXPECT_EQ(4, queue.Duration().InSeconds());
71 queue.Pop();
72 EXPECT_EQ(3, queue.Duration().InSeconds());
74 queue.Pop();
75 EXPECT_EQ(2, queue.Duration().InSeconds());
77 queue.Pop();
78 EXPECT_EQ(0, queue.Duration().InSeconds());
80 queue.Pop();
81 EXPECT_EQ(0, queue.Duration().InSeconds());
85 DecoderBufferQueue queue;
86 queue.Push(CreateBuffer(10));
87 queue.Push(CreateBuffer(12));
88 EXPECT_EQ(2, queue.Duration().InSeconds());
91 queue.Push(CreateBuffer(8));
92 EXPECT_EQ(2, queue.Duration().InSeconds());
96 queue.Pop();
97 EXPECT_EQ(0, queue.Duration().InSeconds());
101 queue.Pop();
102 EXPECT_EQ(0, queue.Duration().InSeconds());
106 queue.Push(CreateBuffer(11));
107 EXPECT_EQ(0, queue.Duration().InSeconds());
111 queue.Push(CreateBuffer(14));
112 EXPECT_EQ(0, queue.Duration().InSeconds());
115 queue.Push(CreateBuffer(17));
116 EXPECT_EQ(3, queue.Duration().InSeconds());
121 DecoderBufferQueue queue;
122 queue.Push(CreateBuffer(0));
123 queue.Push(CreateBuffer(4));
124 EXPECT_EQ(4, queue.Duration().InSeconds());
126 queue.Push(CreateBuffer(-1));
127 EXPECT_EQ(4, queue.Duration().InSeconds());
129 queue.Push(CreateBuffer(6));
130 EXPECT_EQ(6, queue.Duration().InSeconds());
132 queue.Pop();
133 EXPECT_EQ(2, queue.Duration().InSeconds());
135 queue.Pop();
136 EXPECT_EQ(0, queue.Duration().InSeconds());
138 queue.Pop();
139 EXPECT_EQ(0, queue.Duration().InSeconds());
141 queue.Pop();
142 EXPECT_EQ(0, queue.Duration().InSeconds());
146 DecoderBufferQueue queue;
147 EXPECT_EQ(queue.data_size(), 0u);
149 queue.Push(CreateBuffer(0, 1200u));
150 EXPECT_EQ(queue.data_size(), 1200u);
152 queue.Push(CreateBuffer(1, 1000u));
153 EXPECT_EQ(queue.data_size(), 2200u);
155 queue.Pop();
156 EXPECT_EQ(queue.data_size(), 1000u);
158 queue.Push(CreateBuffer(2, 999u));
159 queue.Push(CreateBuffer(3, 999u));
160 EXPECT_EQ(queue.data_size(), 2998u);
162 queue.Clear();
163 EXPECT_EQ(queue.data_size(), 0u);
165 queue.Push(CreateBuffer(4, 1400u));
166 EXPECT_EQ(queue.data_size(), 1400u);