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

Issue 206103004: Remove HasAudio(), HasVideo(), GetInitialNaturalSize() from media::Pipeline. (Closed)

Created:
6 years, 9 months ago by sandersd (OOO until July 31)
Modified:
6 years, 9 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Remove HasAudio(), HasVideo(), GetInitialNaturalSize() from media::Pipeline. This splits PipelineBufferingStateCB in two: PipelineMetadataCB, which includes the available tracks and natural size in a PipelineMetadata struct; and PipelinePrerollCompleted, with no parameters. Now WebMediaPlayerImpl can cache the metadata and the accessors are not required. BUG=148541 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259154

Patch Set 1 #

Total comments: 2

Patch Set 2 : Switch to PipelineMetadata struct. #

Patch Set 3 : Split BufferingStateCB. #

Total comments: 24

Patch Set 4 : New names. #

Total comments: 1

Patch Set 5 : Added tests. #

Total comments: 3

Patch Set 6 : Rebase. #

Patch Set 7 : Rebase /again/. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -204 lines) Patch
M content/renderer/media/webmediaplayer_impl.h View 1 2 3 4 5 6 3 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/media/webmediaplayer_impl.cc View 1 2 3 4 5 6 5 chunks +34 lines, -32 lines 0 comments Download
M media/base/pipeline.h View 1 2 3 9 chunks +25 lines, -48 lines 0 comments Download
M media/base/pipeline.cc View 1 2 3 4 12 chunks +35 lines, -64 lines 0 comments Download
M media/base/pipeline_unittest.cc View 1 2 3 4 22 chunks +33 lines, -35 lines 0 comments Download
M media/filters/pipeline_integration_test.cc View 1 2 3 4 3 chunks +11 lines, -10 lines 0 comments Download
M media/filters/pipeline_integration_test_base.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M media/filters/pipeline_integration_test_base.cc View 1 2 3 4 4 chunks +12 lines, -11 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
sandersd (OOO until July 31)
6 years, 9 months ago (2014-03-20 18:26:03 UTC) #1
scherkus (not reviewing)
https://codereview.chromium.org/206103004/diff/1/content/renderer/media/webmediaplayer_impl.cc File content/renderer/media/webmediaplayer_impl.cc (right): https://codereview.chromium.org/206103004/diff/1/content/renderer/media/webmediaplayer_impl.cc#newcode995 content/renderer/media/webmediaplayer_impl.cc:995: natural_size_ = pipeline_.GetInitialNaturalSize(); ahh this is the TODO I ...
6 years, 9 months ago (2014-03-20 23:16:22 UTC) #2
sandersd (OOO until July 31)
https://codereview.chromium.org/206103004/diff/1/content/renderer/media/webmediaplayer_impl.cc File content/renderer/media/webmediaplayer_impl.cc (right): https://codereview.chromium.org/206103004/diff/1/content/renderer/media/webmediaplayer_impl.cc#newcode995 content/renderer/media/webmediaplayer_impl.cc:995: natural_size_ = pipeline_.GetInitialNaturalSize(); > 1) Define that struct (could ...
6 years, 9 months ago (2014-03-21 19:53:03 UTC) #3
scherkus (not reviewing)
looking good! some nits on naming 'n stuff https://codereview.chromium.org/206103004/diff/30001/content/renderer/media/webmediaplayer_impl.cc File content/renderer/media/webmediaplayer_impl.cc (right): https://codereview.chromium.org/206103004/diff/30001/content/renderer/media/webmediaplayer_impl.cc#newcode153 content/renderer/media/webmediaplayer_impl.cc:153: pipeline_metadata_(), ...
6 years, 9 months ago (2014-03-21 22:26:10 UTC) #4
sandersd (OOO until July 31)
I'll get started on the tests right away. https://codereview.chromium.org/206103004/diff/30001/content/renderer/media/webmediaplayer_impl.cc File content/renderer/media/webmediaplayer_impl.cc (right): https://codereview.chromium.org/206103004/diff/30001/content/renderer/media/webmediaplayer_impl.cc#newcode153 content/renderer/media/webmediaplayer_impl.cc:153: pipeline_metadata_(), ...
6 years, 9 months ago (2014-03-21 23:30:34 UTC) #5
scherkus (not reviewing)
https://codereview.chromium.org/206103004/diff/30001/media/base/pipeline.cc File media/base/pipeline.cc (right): https://codereview.chromium.org/206103004/diff/30001/media/base/pipeline.cc#newcode465 media/base/pipeline.cc:465: PipelineMetadata metadata; On 2014/03/21 23:30:35, Dan Sanders wrote: > ...
6 years, 9 months ago (2014-03-21 23:36:36 UTC) #6
scherkus (not reviewing)
also don't forget to update the CL description: - you also removed GetInitialXXX() - mention ...
6 years, 9 months ago (2014-03-21 23:38:37 UTC) #7
sandersd (OOO until July 31)
I've updated the tests as well now. Note that PipelineTest.DisableAudioRendererDuringInit (pipeline_unittest.cc:648) has semantically changed as ...
6 years, 9 months ago (2014-03-22 00:40:59 UTC) #8
scherkus (not reviewing)
lgtm! nice job! https://codereview.chromium.org/206103004/diff/70001/media/base/pipeline_unittest.cc File media/base/pipeline_unittest.cc (right): https://codereview.chromium.org/206103004/diff/70001/media/base/pipeline_unittest.cc#newcode648 media/base/pipeline_unittest.cc:648: EXPECT_TRUE(metadata_.has_audio); awesome! https://codereview.chromium.org/206103004/diff/70001/media/filters/pipeline_integration_test_base.cc File media/filters/pipeline_integration_test_base.cc (right): ...
6 years, 9 months ago (2014-03-22 01:04:05 UTC) #9
sandersd (OOO until July 31)
The CQ bit was checked by sandersd@chromium.org
6 years, 9 months ago (2014-03-24 17:46:57 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sandersd@chromium.org/206103004/70001
6 years, 9 months ago (2014-03-24 17:48:03 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-24 21:40:48 UTC) #12
commit-bot: I haz the power
Failed to apply patch for content/renderer/media/webmediaplayer_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-24 21:40:49 UTC) #13
sandersd (OOO until July 31)
The CQ bit was checked by sandersd@chromium.org
6 years, 9 months ago (2014-03-24 22:09:42 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sandersd@chromium.org/206103004/90001
6 years, 9 months ago (2014-03-24 22:09:45 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 00:29:22 UTC) #16
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=287192
6 years, 9 months ago (2014-03-25 00:29:22 UTC) #17
sandersd (OOO until July 31)
The CQ bit was checked by sandersd@chromium.org
6 years, 9 months ago (2014-03-25 01:18:34 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sandersd@chromium.org/206103004/110001
6 years, 9 months ago (2014-03-25 01:19:07 UTC) #19
commit-bot: I haz the power
Change committed as 259154
6 years, 9 months ago (2014-03-25 05:02:58 UTC) #20
viettrungluu
6 years, 9 months ago (2014-03-25 05:35:14 UTC) #21
Message was sent while issue was closed.
On 2014/03/25 05:02:58, I haz the power (commit-bot) wrote:
> Change committed as 259154

Agh, I believe this broke lots of compiles (e.g.,
http://build.chromium.org/p/chromium/builders/Linux/builds/48480/steps/compil...)
-- don't know why the CQ/trybots are happy with it:

FAILED: c++ -MMD -MF obj/media/tools/player_x11/player_x11.player_x11.o.d
-DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME
-D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DTOOLKIT_VIEWS=1
-DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_CAIRO=1 -DUSE_GLIB=1
-DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_MOJO=1 -DUSE_X11=1
-DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DUSE_XI2_MT=2
-DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS
-DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS
-DUSE_UDEV -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1
-DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1
-DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1
-DENABLE_AUTOMATION=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2
-DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1
-DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1
-DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1
-DGL_GLEXT_PROTOTYPES -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1
'-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"'
-DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1
-DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_LEGACY_LAYERRASTERIZER_API=1
-DSK_WILL_NEVER_DRAW_PERSPECTIVE_TEXT
-DSK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG=1
-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1
-DSK_SUPPORT_LEGACY_READPIXELSCONFIG -DSK_SUPPORT_LEGACY_GETCLIPTYPE
-DSK_SUPPORT_LEGACY_GETTOTALCLIP -DSK_SUPPORT_LEGACY_GETTOPDEVICE
-DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1
-DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DUSE_NSS=1
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND
-DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -I../../third_party/khronos
-I../../gpu -I../.. -I../../skia/config -Igen/ui/gl
-I../../third_party/mesa/src/include -I../../third_party/skia/src/core
-I../../third_party/skia/include/core -I../../third_party/skia/include/effects
-I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu
-I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops
-I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports
-I../../third_party/skia/include/utils -I../../skia/ext
-I../../third_party/icu/source/i18n -I../../third_party/icu/source/common
-fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-exceptions
-fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers
-fvisibility=hidden -pipe -fPIC -pthread -I/usr/include/glib-2.0
-I/usr/lib/i386-linux-gnu/glib-2.0/include -Wno-unknown-pragmas -msse2
-mfpmath=sse -mmmx -m32 -O2 -fno-ident -fdata-sections -ffunction-sections
-funwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden
-Wsign-compare  -c ../../media/tools/player_x11/player_x11.cc -o
obj/media/tools/player_x11/player_x11.player_x11.o
../../media/tools/player_x11/player_x11.cc:96:47: error: variable or field
'OnBufferingState' declared void
../../media/tools/player_x11/player_x11.cc:96:30: error: 'BufferingState' is not
a member of 'media::Pipeline'
../../media/tools/player_x11/player_x11.cc: In function 'void
InitPipeline(media::Pipeline*, const
scoped_refptr<base::SingleThreadTaskRunner>&, media::Demuxer*, const PaintCB&,
bool, base::MessageLoop*)':
../../media/tools/player_x11/player_x11.cc:149:19: error: 'OnBufferingState' was
not declared in this scope
../../media/tools/player_x11/player_x11.cc: In function 'int main(int, char**)':
../../media/tools/player_x11/player_x11.cc:295:17: error: 'class
media::Pipeline' has no member named 'HasVideo'

Powered by Google App Engine
This is Rietveld 408576698