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

Issue 1094403002: Add power monitoring to the Cast VideoToolbox encoder. (Closed)

Created:
5 years, 8 months ago by jfroy
Modified:
5 years, 8 months ago
Reviewers:
miu
CC:
chromium-reviews, hclam+watch_chromium.org, imcheng+watch_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, feature-media-reviews_chromium.org, hubbe+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add power monitoring to the Cast VideoToolbox encoder. Chromium provides PowerObserver and PowerMonitor objects to allow subsystems to react to power suspend and resume events. On iOS this actually tracks app lifecycle events for backgrounding. The patch adds a power observer that destroys the compression session on power suspend events and re-initializes the compression session on power resume events. This allows the encoder to properly transition to the background on iOS and resume when the app comes back to the foreground. Note that for this to work overall, the sender client must create a background task to allow networking to continue. Otherwise the receiver will timeout per spec. R=miu@chromium.org BUG=477895 Committed: https://crrev.com/5f83e5beada49c0c18e2162478992098f4f3323d Cr-Commit-Position: refs/heads/master@{#326938}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move PowerObserver implementation directly in the encoder. #

Total comments: 2

Patch Set 3 : Prevent session reset while power suspended. Unit tests. #

Total comments: 2

Patch Set 4 : Rebase on latest version of 1094403002. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -8 lines) Patch
M media/cast/sender/h264_vt_encoder.h View 1 2 4 chunks +12 lines, -2 lines 0 comments Download
M media/cast/sender/h264_vt_encoder.cc View 1 2 3 4 chunks +48 lines, -0 lines 0 comments Download
M media/cast/sender/h264_vt_encoder_unittest.cc View 1 2 5 chunks +101 lines, -6 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
jfroy
This is stacked on https://codereview.chromium.org/1100643002. I'm not sure if there is a formal way to ...
5 years, 8 months ago (2015-04-21 23:22:37 UTC) #1
miu
All of the implementation looks good. Just one comment about class structure: https://codereview.chromium.org/1094403002/diff/1/media/cast/sender/h264_vt_encoder.h File media/cast/sender/h264_vt_encoder.h ...
5 years, 8 months ago (2015-04-22 04:02:58 UTC) #2
jfroy
https://codereview.chromium.org/1094403002/diff/1/media/cast/sender/h264_vt_encoder.h File media/cast/sender/h264_vt_encoder.h (right): https://codereview.chromium.org/1094403002/diff/1/media/cast/sender/h264_vt_encoder.h#newcode85 media/cast/sender/h264_vt_encoder.h:85: class PowerObserver : public base::PowerObserver { On 2015/04/22 04:02:58, ...
5 years, 8 months ago (2015-04-22 04:18:46 UTC) #3
jfroy
PTAL The diff is a clean rebase on top of the latest version of https://codereview.chromium.org/1100643002/.
5 years, 8 months ago (2015-04-22 05:53:41 UTC) #4
miu
lgtm, but a few comments to consider: 1. Should the pool be set to null ...
5 years, 8 months ago (2015-04-22 17:38:54 UTC) #5
jfroy
On 2015/04/22 17:38:54, miu wrote: > lgtm, but a few comments to consider: > > ...
5 years, 8 months ago (2015-04-22 17:51:50 UTC) #6
miu
On 2015/04/22 17:51:50, jfroy wrote: > On 2015/04/22 17:38:54, miu wrote: > > 2. Should ...
5 years, 8 months ago (2015-04-22 18:15:28 UTC) #7
miu
https://codereview.chromium.org/1094403002/diff/20001/media/cast/sender/h264_vt_encoder.cc File media/cast/sender/h264_vt_encoder.cc (right): https://codereview.chromium.org/1094403002/diff/20001/media/cast/sender/h264_vt_encoder.cc#newcode635 media/cast/sender/h264_vt_encoder.cc:635: ResetCompressionSession(); I just realized: You shouldn't call ResetCompressionSession() if ...
5 years, 8 months ago (2015-04-22 18:18:47 UTC) #8
jfroy
On 2015/04/22 18:15:28, miu wrote: > On 2015/04/22 17:51:50, jfroy wrote: > > On 2015/04/22 ...
5 years, 8 months ago (2015-04-22 18:22:45 UTC) #9
jfroy
https://codereview.chromium.org/1094403002/diff/20001/media/cast/sender/h264_vt_encoder.cc File media/cast/sender/h264_vt_encoder.cc (right): https://codereview.chromium.org/1094403002/diff/20001/media/cast/sender/h264_vt_encoder.cc#newcode635 media/cast/sender/h264_vt_encoder.cc:635: ResetCompressionSession(); On 2015/04/22 18:18:47, miu wrote: > I just ...
5 years, 8 months ago (2015-04-22 18:24:36 UTC) #10
jfroy
PTAL at PS 3. It adds power suspension state tracking to prevent compression session resets ...
5 years, 8 months ago (2015-04-23 06:00:28 UTC) #11
miu
lgtm https://codereview.chromium.org/1094403002/diff/40001/media/cast/sender/h264_vt_encoder_unittest.cc File media/cast/sender/h264_vt_encoder_unittest.cc (right): https://codereview.chromium.org/1094403002/diff/40001/media/cast/sender/h264_vt_encoder_unittest.cc#newcode195 media/cast/sender/h264_vt_encoder_unittest.cc:195: void NoopFrameEncodedCallback( FYI--No change needed here, but just ...
5 years, 8 months ago (2015-04-24 20:38:41 UTC) #12
jfroy
https://codereview.chromium.org/1094403002/diff/40001/media/cast/sender/h264_vt_encoder_unittest.cc File media/cast/sender/h264_vt_encoder_unittest.cc (right): https://codereview.chromium.org/1094403002/diff/40001/media/cast/sender/h264_vt_encoder_unittest.cc#newcode195 media/cast/sender/h264_vt_encoder_unittest.cc:195: void NoopFrameEncodedCallback( On 2015/04/24 20:38:40, miu wrote: > FYI--No ...
5 years, 8 months ago (2015-04-24 20:42:26 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1094403002/60001
5 years, 8 months ago (2015-04-24 23:12:18 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 8 months ago (2015-04-24 23:56:19 UTC) #17
commit-bot: I haz the power
5 years, 8 months ago (2015-04-24 23:57:13 UTC) #18
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/5f83e5beada49c0c18e2162478992098f4f3323d
Cr-Commit-Position: refs/heads/master@{#326938}

Powered by Google App Engine
This is Rietveld 408576698