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

Issue 74133002: Cast: Removed unnecessary ref counters. (Closed)

Created:
7 years, 1 month ago by pwestin
Modified:
7 years, 1 month ago
Reviewers:
Alpha Left Google
CC:
chromium-reviews, feature-media-reviews_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Cast: Removed unnecessary ref counters. AudioDecoder and VideoEncoder objects inherited RefCountedThreadSafe for no valid reason. AudioDecoder need no Refcounter or Weak ptr. The VideoEncoder can accomplish the same using a weak ptr. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=236887

Patch Set 1 #

Patch Set 2 : Fixed nits #

Total comments: 2

Patch Set 3 : Added TODO #

Total comments: 2

Patch Set 4 : Changed to lock form atomic int #

Total comments: 2

Patch Set 5 : Added comment #

Patch Set 6 : Merge TOT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -31 lines) Patch
M media/cast/audio_receiver/audio_decoder.h View 1 2 3 3 chunks +7 lines, -7 lines 0 comments Download
M media/cast/audio_receiver/audio_decoder.cc View 1 2 3 4 2 chunks +12 lines, -1 line 0 comments Download
M media/cast/audio_receiver/audio_decoder_unittest.cc View 3 chunks +11 lines, -8 lines 0 comments Download
M media/cast/audio_receiver/audio_receiver.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M media/cast/audio_receiver/audio_receiver.cc View 1 2 3 4 5 3 chunks +4 lines, -1 line 0 comments Download
M media/cast/video_sender/video_encoder.h View 1 2 3 4 5 5 chunks +4 lines, -7 lines 0 comments Download
M media/cast/video_sender/video_encoder.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M media/cast/video_sender/video_encoder_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M media/cast/video_sender/video_sender.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M media/cast/video_sender/video_sender.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
pwestin
Please review
7 years, 1 month ago (2013-11-15 17:44:34 UTC) #1
Alpha Left Google
https://codereview.chromium.org/74133002/diff/30001/media/cast/audio_receiver/audio_decoder.cc File media/cast/audio_receiver/audio_decoder.cc (right): https://codereview.chromium.org/74133002/diff/30001/media/cast/audio_receiver/audio_decoder.cc#newcode55 media/cast/audio_receiver/audio_decoder.cc:55: if (!base::subtle::NoBarrier_Load(&have_received_packets_)) return false; We very rarely use atomicops. ...
7 years, 1 month ago (2013-11-15 19:40:38 UTC) #2
pwestin
Answer to question https://codereview.chromium.org/74133002/diff/30001/media/cast/audio_receiver/audio_decoder.cc File media/cast/audio_receiver/audio_decoder.cc (right): https://codereview.chromium.org/74133002/diff/30001/media/cast/audio_receiver/audio_decoder.cc#newcode55 media/cast/audio_receiver/audio_decoder.cc:55: if (!base::subtle::NoBarrier_Load(&have_received_packets_)) return false; On 2013/11/15 ...
7 years, 1 month ago (2013-11-15 19:48:06 UTC) #3
Alpha Left Google
> I was looking for other options but did not find any simpler approach. > ...
7 years, 1 month ago (2013-11-15 19:52:09 UTC) #4
pwestin
On 2013/11/15 19:52:09, Alpha wrote: > > I was looking for other options but did ...
7 years, 1 month ago (2013-11-15 19:58:22 UTC) #5
Alpha Left Google
> Yes we could to that at the cost of another thread context switch. WDYT ...
7 years, 1 month ago (2013-11-15 20:01:08 UTC) #6
pwestin
On 2013/11/15 20:01:08, Alpha wrote: > > Yes we could to that at the cost ...
7 years, 1 month ago (2013-11-15 20:49:54 UTC) #7
Alpha Left Google
https://codereview.chromium.org/74133002/diff/120001/media/cast/audio_receiver/audio_decoder.h File media/cast/audio_receiver/audio_decoder.h (right): https://codereview.chromium.org/74133002/diff/120001/media/cast/audio_receiver/audio_decoder.h#newcode46 media/cast/audio_receiver/audio_decoder.h:46: base::subtle::Atomic32 have_received_packets_; Is there a difference in terms of ...
7 years, 1 month ago (2013-11-18 22:01:13 UTC) #8
pwestin
PTAL https://codereview.chromium.org/74133002/diff/120001/media/cast/audio_receiver/audio_decoder.h File media/cast/audio_receiver/audio_decoder.h (right): https://codereview.chromium.org/74133002/diff/120001/media/cast/audio_receiver/audio_decoder.h#newcode46 media/cast/audio_receiver/audio_decoder.h:46: base::subtle::Atomic32 have_received_packets_; On 2013/11/18 22:01:14, Alpha wrote: > ...
7 years, 1 month ago (2013-11-22 19:16:28 UTC) #9
Alpha Left Google
https://codereview.chromium.org/74133002/diff/190001/media/cast/audio_receiver/audio_decoder.cc File media/cast/audio_receiver/audio_decoder.cc (right): https://codereview.chromium.org/74133002/diff/190001/media/cast/audio_receiver/audio_decoder.cc#newcode55 media/cast/audio_receiver/audio_decoder.cc:55: // Get a local copy under lock. Do you ...
7 years, 1 month ago (2013-11-22 20:03:52 UTC) #10
pwestin
https://codereview.chromium.org/74133002/diff/190001/media/cast/audio_receiver/audio_decoder.cc File media/cast/audio_receiver/audio_decoder.cc (right): https://codereview.chromium.org/74133002/diff/190001/media/cast/audio_receiver/audio_decoder.cc#newcode55 media/cast/audio_receiver/audio_decoder.cc:55: // Get a local copy under lock. On 2013/11/22 ...
7 years, 1 month ago (2013-11-22 21:16:36 UTC) #11
Alpha Left Google
On 2013/11/22 21:16:36, pwestin wrote: > https://codereview.chromium.org/74133002/diff/190001/media/cast/audio_receiver/audio_decoder.cc > File media/cast/audio_receiver/audio_decoder.cc (right): > > https://codereview.chromium.org/74133002/diff/190001/media/cast/audio_receiver/audio_decoder.cc#newcode55 > ...
7 years, 1 month ago (2013-11-22 21:17:52 UTC) #12
pwestin
Done
7 years, 1 month ago (2013-11-22 21:51:32 UTC) #13
Alpha Left Google
LGTM.
7 years, 1 month ago (2013-11-22 21:53:55 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pwestin@google.com/74133002/340002
7 years, 1 month ago (2013-11-22 22:37:53 UTC) #15
commit-bot: I haz the power
7 years, 1 month ago (2013-11-23 00:59:17 UTC) #16
Message was sent while issue was closed.
Change committed as 236887

Powered by Google App Engine
This is Rietveld 408576698