Chromium Code Reviews

Issue 113213: SeekableBuffer to implement a window of buffer which has short seeking ability. (Closed)

Created:
11 years, 7 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
Reviewers:
awong, scherkus (not reviewing)
CC:
chromium-reviews_googlegroups.com, awong, fbarchard
Visibility:
Public.

Description

SeekableBuffer to implement a window of buffer which has short seeking ability. Defined the base interface SeekableBuffer and a thread safe implemntation of ThreadSafeSeekableBuffer. This class is to be used for media resource loading that does the meat of buffer queueing and handles short seeking for short distance out-of-order read patterns. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=16348

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 74

Patch Set 7 : '' #

Total comments: 20

Patch Set 8 : '' #

Total comments: 8

Patch Set 9 : '' #

Total comments: 59

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 14

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 6

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Unified diffs Side-by-side diffs Stats (+611 lines, -0 lines)
A media/base/seekable_buffer.h View 1 chunk +132 lines, -0 lines 0 comments
A media/base/seekable_buffer.cc View 1 chunk +192 lines, -0 lines 0 comments
A media/base/seekable_buffer_unittest.cc View 1 chunk +284 lines, -0 lines 0 comments
M media/media.gyp View 2 chunks +3 lines, -0 lines 0 comments

Messages

Total messages: 18 (0 generated)
Alpha Left Google
11 years, 7 months ago (2009-05-11 20:32:51 UTC) #1
scherkus (not reviewing)
Lets talk about the design of this today a bit more before you write too ...
11 years, 7 months ago (2009-05-12 17:21:18 UTC) #2
Alpha Left Google
I have add the implementation. There's unit tests for read, write and short seek. But ...
11 years, 7 months ago (2009-05-14 00:56:43 UTC) #3
awong
Couple of architectural concerns. In general, I think we're taking the locks at too fine ...
11 years, 7 months ago (2009-05-14 19:04:48 UTC) #4
scherkus (not reviewing)
http://codereview.chromium.org/113213/diff/16/1006 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/16/1006#newcode13 Line 13: size_t backward_capacity, size_t forward_capacity) nit: wrap at parentheses ...
11 years, 7 months ago (2009-05-14 21:24:59 UTC) #5
scherkus (not reviewing)
http://codereview.chromium.org/113213/diff/16/1005 File media/base/seekable_buffer_unittest.cc (right): http://codereview.chromium.org/113213/diff/16/1005#newcode50 Line 50: while (read_position < kDataSize) { On 2009/05/14 21:25:00, ...
11 years, 7 months ago (2009-05-14 21:29:47 UTC) #6
Alpha Left Google
Big changes: 1. Got rid of lock, user of this class should lock 2. Use ...
11 years, 7 months ago (2009-05-14 22:48:39 UTC) #7
scherkus (not reviewing)
looking good! http://codereview.chromium.org/113213/diff/23/1012 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/23/1012#newcode24 Line 24: while (!buffers_.empty()) { actually stl_util-inl.h was ...
11 years, 7 months ago (2009-05-15 01:00:45 UTC) #8
Alpha Left Google
http://codereview.chromium.org/113213/diff/23/1012 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/23/1012#newcode24 Line 24: while (!buffers_.empty()) { On 2009/05/15 01:00:45, scherkus wrote: ...
11 years, 7 months ago (2009-05-15 09:37:24 UTC) #9
scherkus (not reviewing)
LGTM, just fix up the comment nits if you do end up moving EvictBackwardBuffer() make ...
11 years, 7 months ago (2009-05-16 00:14:22 UTC) #10
Alpha Left Google
http://codereview.chromium.org/113213/diff/29/1017 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/29/1017#newcode135 Line 135: EvictBackwardBuffers(); On 2009/05/16 00:14:23, scherkus wrote: > Can ...
11 years, 7 months ago (2009-05-16 00:33:16 UTC) #11
awong
http://codereview.chromium.org/113213/diff/1022/1025 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/1022/1025#newcode7 Line 7: #include "media/base/seekable_buffer.h" self-include always goes first. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Names_and_Order_of_Includes http://codereview.chromium.org/113213/diff/1022/1025#newcode25 ...
11 years, 7 months ago (2009-05-16 01:26:06 UTC) #12
Alpha Left Google
Fixed most of the comments, except for the SCOPED_TRACE will talk directly about this. http://codereview.chromium.org/113213/diff/1022/1025 ...
11 years, 7 months ago (2009-05-18 09:13:29 UTC) #13
awong
http://codereview.chromium.org/113213/diff/1022/1025 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/1022/1025#newcode38 Line 38: if (forward_bytes_ >= forward_capacity_) On 2009/05/18 09:13:29, Alpha ...
11 years, 7 months ago (2009-05-18 20:30:41 UTC) #14
Alpha Left Google
http://codereview.chromium.org/113213/diff/1022/1025 File media/base/seekable_buffer.cc (right): http://codereview.chromium.org/113213/diff/1022/1025#newcode38 Line 38: if (forward_bytes_ >= forward_capacity_) On 2009/05/18 20:30:41, awong ...
11 years, 7 months ago (2009-05-18 21:15:20 UTC) #15
Alpha Left Google
updated the unit tests, it should be pretty clear what the DCHECKS are doing now.
11 years, 7 months ago (2009-05-18 22:24:47 UTC) #16
awong
lgtm One small nit (repeated once). Also, I think you need to sync before submitting. ...
11 years, 7 months ago (2009-05-18 22:29:00 UTC) #17
Alpha Left Google
11 years, 7 months ago (2009-05-18 22:34:38 UTC) #18
http://codereview.chromium.org/113213/diff/60/62
File media/base/seekable_buffer_unittest.cc (right):

http://codereview.chromium.org/113213/diff/60/62#newcode56
Line 56: EXPECT_EQ(should_append, buffer_->forward_bytes() < kBufferSize) <<
On 2009/05/18 22:29:00, awong wrote:
> Unlike all other binary-operators, for <<, the newline is usually but before
the
> <<.

Done.

http://codereview.chromium.org/113213/diff/60/62#newcode250
Line 250: EXPECT_EQ(should_append, buffer_->forward_bytes() < kBufferSize) <<
On 2009/05/18 22:29:00, awong wrote:
> Same here

Done.

http://codereview.chromium.org/113213/diff/60/64
File media/media.gyp (right):

http://codereview.chromium.org/113213/diff/60/64#newcode76
Line 76: 'base/yuv_scale.h',
sync'ed in the last upload.

Powered by Google App Engine