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

Issue 20326: Fixes a bug in the media pipeline that resulted in the video dimensions never... (Closed)

Created:
11 years, 10 months ago by ralphl
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fixes a bug in the media pipeline that resulted in the video dimensions never getting set. Includes a new unit test, along with new mocks for a video decoder and video renderer. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10006

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 23

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 25

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+351 lines, -54 lines) Patch
M media/base/mock_media_filters.h View 1 2 3 4 5 6 13 chunks +269 lines, -42 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 1 2 3 4 5 6 3 chunks +64 lines, -7 lines 0 comments Download
M media/filters/file_data_source_unittest.cc View 2 3 4 5 6 2 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
ralphl
When working on more unit tests I found a bug in the pipeline. It never ...
11 years, 10 months ago (2009-02-12 22:17:54 UTC) #1
scherkus (not reviewing)
In general, try to keep your mocks configurable. Other than that looking good so far. ...
11 years, 10 months ago (2009-02-13 03:13:24 UTC) #2
ralphl
Good feedback -- the mocks are now very configurable, and we can easily add more ...
11 years, 10 months ago (2009-02-13 21:11:57 UTC) #3
scherkus (not reviewing)
really liking the configurable mock! just some tiny comments http://codereview.chromium.org/20326/diff/28/1030 File media/base/mock_media_filters.h (right): http://codereview.chromium.org/20326/diff/28/1030#newcode47 Line ...
11 years, 10 months ago (2009-02-17 23:57:36 UTC) #4
ralphl
All changes have been made or comments as to why I don't think we should ...
11 years, 10 months ago (2009-02-18 01:17:33 UTC) #5
scherkus (not reviewing)
11 years, 10 months ago (2009-02-19 01:25:18 UTC) #6
I know it almost seems silly at this point, but consider using human-friendly
frame duration and a boolean flag instead of dual-purposing width.

Other than that LGTM

http://codereview.chromium.org/20326/diff/28/1030
File media/base/mock_media_filters.h (right):

http://codereview.chromium.org/20326/diff/28/1030#newcode50
Line 50: void set_no_video() {
How about we add a boolean flag instead of dual-purposing width?

On 2009/02/18 01:17:33, ralphl wrote:
> On 2009/02/17 23:57:37, scherkus wrote:
> > given we have public access to the variables, we could probably do away with
> > this
> > 
> > also bracket should go on next line
> 
> I like it for the sake of clarity for the client:
> MockFilterConfig config;
> config.set_no_video();
> 
> seems to be more obvious than
> 
> config.video_width_ = 0;
>

http://codereview.chromium.org/20326/diff/28/1031
File media/base/pipeline_impl_unittest.cc (right):

http://codereview.chromium.org/20326/diff/28/1031#newcode39
Line 39: h.TimedWait(base::TimeDelta::FromMilliseconds(300));
Got it!

On 2009/02/18 01:17:33, ralphl wrote:
> On 2009/02/17 23:57:37, scherkus wrote:
> > out of curiosity, why is this 300ms as opposed to 5 seconds?
> 
> I expect this test to hang, and I don't want it to take a long time.  1/3
second
> should be plenty of time to hang.  The other tests should complete quickly, so
I
> wait for a while to make sure... They normally complete in < 10ms, but this
one
> will hang for as long as it runs.
> 
> The purpose of the test is to make sure we can tear down the pipeline while
the
> nested message loop is running and you call stop().

Powered by Google App Engine
This is Rietveld 408576698