summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 23:13:47 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 23:13:47 +0000
commit2879a90031e5025d366b7305d8b7d9f401dcf97a (patch)
treeeb12a82a55efe85e1d1d0a5b0f0ae5efb1da3d8b /media
parenta0da02ccdaa6f90b921b41249e972beee42a4e90 (diff)
downloadchromium_src-2879a90031e5025d366b7305d8b7d9f401dcf97a.zip
chromium_src-2879a90031e5025d366b7305d8b7d9f401dcf97a.tar.gz
chromium_src-2879a90031e5025d366b7305d8b7d9f401dcf97a.tar.bz2
Mark all of media/cast as chromium_code.
Fix various small issues (mostly int/size_t, initialization order). R=hclam@chromium.org Review URL: https://codereview.chromium.org/218683005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/cast/cast_receiver.gyp3
-rw-r--r--media/cast/cast_receiver_impl.cc7
-rw-r--r--media/cast/cast_sender.gyp3
-rw-r--r--media/cast/framer/framer.gyp3
-rw-r--r--media/cast/logging/logging.gyp3
-rw-r--r--media/cast/rtcp/rtcp.cc2
-rw-r--r--media/cast/rtcp/rtcp.gyp3
-rw-r--r--media/cast/rtcp/rtcp_sender.cc4
-rw-r--r--media/cast/rtp_receiver/rtp_parser/rtp_parser.cc4
-rw-r--r--media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp3
-rw-r--r--media/cast/rtp_receiver/rtp_receiver.gyp3
-rw-r--r--media/cast/test/utility/audio_utility.cc4
-rw-r--r--media/cast/test/utility/barcode.cc1
-rw-r--r--media/cast/test/utility/udp_proxy.cc7
-rw-r--r--media/cast/test/utility/utility.gyp3
-rw-r--r--media/cast/test/utility/video_utility.cc1
-rw-r--r--media/cast/transport/utility/utility.gyp5
-rw-r--r--media/cast/video_receiver/codecs/vp8/vp8_decoder.gyp3
-rw-r--r--media/cast/video_receiver/video_receiver.cc2
-rw-r--r--media/cast/video_sender/codecs/vp8/vp8_encoder.cc2
-rw-r--r--media/cast/video_sender/external_video_encoder.cc4
21 files changed, 45 insertions, 25 deletions
diff --git a/media/cast/cast_receiver.gyp b/media/cast/cast_receiver.gyp
index c6087ac..087b219 100644
--- a/media/cast/cast_receiver.gyp
+++ b/media/cast/cast_receiver.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'includes': [
'audio_receiver/audio_receiver.gypi',
'video_receiver/video_receiver.gypi',
diff --git a/media/cast/cast_receiver_impl.cc b/media/cast/cast_receiver_impl.cc
index f015239..2712d7a 100644
--- a/media/cast/cast_receiver_impl.cc
+++ b/media/cast/cast_receiver_impl.cc
@@ -12,13 +12,6 @@
namespace media {
namespace cast {
-// The callback should not be used, as the receiver is using the external
-// transport. Implementation is required as the pacer is common to sender and
-// receiver.
-static void DoNothingCastTransportStatus(
- transport::CastTransportStatus status) {
- NOTREACHED() << "Internal transport used in CastReceiver";
-}
// The video and audio receivers should only be called from the main thread.
// LocalFrameReciever posts tasks to the main thread, making the cast interface
// thread safe.
diff --git a/media/cast/cast_sender.gyp b/media/cast/cast_sender.gyp
index 5738106..bc4e825 100644
--- a/media/cast/cast_sender.gyp
+++ b/media/cast/cast_sender.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'includes': [
'audio_sender/audio_sender.gypi',
'congestion_control/congestion_control.gypi',
diff --git a/media/cast/framer/framer.gyp b/media/cast/framer/framer.gyp
index e1f35cd..e72ac84 100644
--- a/media/cast/framer/framer.gyp
+++ b/media/cast/framer/framer.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_framer',
diff --git a/media/cast/logging/logging.gyp b/media/cast/logging/logging.gyp
index 30e8119..29a96d8 100644
--- a/media/cast/logging/logging.gyp
+++ b/media/cast/logging/logging.gyp
@@ -2,6 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_common_logging',
diff --git a/media/cast/rtcp/rtcp.cc b/media/cast/rtcp/rtcp.cc
index bb19f3e..c5fbbad 100644
--- a/media/cast/rtcp/rtcp.cc
+++ b/media/cast/rtcp/rtcp.cc
@@ -169,8 +169,8 @@ Rtcp::Rtcp(scoped_refptr<CastEnvironment> cast_environment,
remote_ssrc_(remote_ssrc),
c_name_(c_name),
rtp_receiver_statistics_(rtp_receiver_statistics),
- receiver_feedback_(new LocalRtcpReceiverFeedback(this, cast_environment)),
rtt_feedback_(new LocalRtcpRttFeedback(this)),
+ receiver_feedback_(new LocalRtcpReceiverFeedback(this, cast_environment)),
rtcp_sender_(new RtcpSender(cast_environment, paced_packet_sender,
local_ssrc, c_name)),
last_report_received_(0),
diff --git a/media/cast/rtcp/rtcp.gyp b/media/cast/rtcp/rtcp.gyp
index 8ce90d4..d6e3e64 100644
--- a/media/cast/rtcp/rtcp.gyp
+++ b/media/cast/rtcp/rtcp.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_rtcp',
diff --git a/media/cast/rtcp/rtcp_sender.cc b/media/cast/rtcp/rtcp_sender.cc
index dc5b8c8..cb41c2f 100644
--- a/media/cast/rtcp/rtcp_sender.cc
+++ b/media/cast/rtcp/rtcp_sender.cc
@@ -129,7 +129,7 @@ bool BuildRtcpReceiverLogMessage(
std::vector<RtcpReceiverEventLogMessage>::reverse_iterator sorted_rit =
sorted_log_messages.rbegin();
base::TimeTicks first_event_timestamp = sorted_rit->event_timestamp;
- int events_in_frame = 0;
+ size_t events_in_frame = 0;
while (sorted_rit != sorted_log_messages.rend() &&
events_in_frame < kRtcpMaxReceiverLogMessages &&
remaining_space >= kRtcpReceiverEventLogSize) {
@@ -803,7 +803,7 @@ void RtcpSender::BuildReceiverLog(
receiver_log_message.pop_front();
}
}
- DCHECK_EQ(total_number_of_messages_to_send, 0);
+ DCHECK_EQ(total_number_of_messages_to_send, 0u);
}
} // namespace cast
diff --git a/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc b/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
index 31fae9a..b0d27a2 100644
--- a/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
+++ b/media/cast/rtp_receiver/rtp_parser/rtp_parser.cc
@@ -88,8 +88,8 @@ bool RtpParser::ParseCast(const uint8* packet,
// Extract header.
const uint8* data_ptr = packet;
size_t data_length = length;
- rtp_header->is_key_frame = (data_ptr[0] & kCastKeyFrameBitMask);
- rtp_header->is_reference = (data_ptr[0] & kCastReferenceFrameIdBitMask);
+ rtp_header->is_key_frame = !!(data_ptr[0] & kCastKeyFrameBitMask);
+ rtp_header->is_reference = !!(data_ptr[0] & kCastReferenceFrameIdBitMask);
rtp_header->frame_id = frame_id_wrap_helper_.MapTo32bitsFrameId(data_ptr[1]);
base::BigEndianReader big_endian_reader(
diff --git a/media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp b/media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp
index 54bb93d..533533f 100644
--- a/media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp
+++ b/media/cast/rtp_receiver/rtp_parser/rtp_parser.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_rtp_parser',
diff --git a/media/cast/rtp_receiver/rtp_receiver.gyp b/media/cast/rtp_receiver/rtp_receiver.gyp
index 3fb454a..bd1c1fa 100644
--- a/media/cast/rtp_receiver/rtp_receiver.gyp
+++ b/media/cast/rtp_receiver/rtp_receiver.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_rtp_receiver',
diff --git a/media/cast/test/utility/audio_utility.cc b/media/cast/test/utility/audio_utility.cc
index b1c0190..e3a913d 100644
--- a/media/cast/test/utility/audio_utility.cc
+++ b/media/cast/test/utility/audio_utility.cc
@@ -133,7 +133,7 @@ bool EncodeTimestamp(uint16 timestamp,
// gray-code the number
timestamp = (timestamp >> 1) ^ timestamp;
std::vector<double> frequencies;
- for (int i = 0; i < kNumBits; i++) {
+ for (size_t i = 0; i < kNumBits; i++) {
if ((timestamp >> i) & 1) {
frequencies.push_back(kBaseFrequency * (i+1));
}
@@ -185,7 +185,7 @@ bool DecodeTimestamp(const std::vector<int16>& samples, uint16* timestamp) {
if (sense < kMinSense) continue;
bool success = true;
uint16 gray_coded = 0;
- for (int bit = 0; success && bit < kNumBits; bit++) {
+ for (size_t bit = 0; success && bit < kNumBits; bit++) {
double signal_strength = DecodeOneFrequency(
&samples[start],
kSamplesToAnalyze,
diff --git a/media/cast/test/utility/barcode.cc b/media/cast/test/utility/barcode.cc
index fbb17f1..cf27937 100644
--- a/media/cast/test/utility/barcode.cc
+++ b/media/cast/test/utility/barcode.cc
@@ -123,7 +123,6 @@ bool DecodeBarcode(const scoped_refptr<VideoFrame>& frame,
if (i[2] > unit_size * 2 || i[2] < unit_size / 2) valid = false;
if (i[3] > unit_size * 2 || i[3] < unit_size / 2) valid = false;
i += 4;
- uint64 return_value = 0;
for (size_t bit = 0; valid && bit < output->size(); bit++) {
if (i[0] > unit_size / 2 && i[0] <= unit_size * 1.5 &&
i[1] > unit_size * 1.5 && i[1] <= unit_size * 3) {
diff --git a/media/cast/test/utility/udp_proxy.cc b/media/cast/test/utility/udp_proxy.cc
index 8f8c41b..62b492b 100644
--- a/media/cast/test/utility/udp_proxy.cc
+++ b/media/cast/test/utility/udp_proxy.cc
@@ -326,6 +326,7 @@ class PacketSender : public PacketPipe {
int result;
if (destination_->address().empty()) {
VLOG(1) << "Destination has not been set yet.";
+ result = net::ERR_INVALID_ARGUMENT;
} else {
VLOG(1) << "Destination:" << destination_->ToString();
result = udp_socket_->SendTo(buf,
@@ -410,12 +411,12 @@ class UDPProxyImpl : public UDPProxy {
scoped_ptr<PacketPipe> to_dest_pipe,
scoped_ptr<PacketPipe> from_dest_pipe,
net::NetLog* net_log) :
- proxy_thread_("media::cast::test::UdpProxy Thread"),
local_port_(local_port),
destination_(destination),
- start_event_(false, false),
+ proxy_thread_("media::cast::test::UdpProxy Thread"),
to_dest_pipe_(to_dest_pipe.Pass()),
- from_dest_pipe_(to_dest_pipe.Pass()) {
+ from_dest_pipe_(to_dest_pipe.Pass()),
+ start_event_(false, false) {
proxy_thread_.StartWithOptions(
base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
proxy_thread_.message_loop_proxy()->PostTask(
diff --git a/media/cast/test/utility/utility.gyp b/media/cast/test/utility/utility.gyp
index 698579c..e8deb80 100644
--- a/media/cast/test/utility/utility.gyp
+++ b/media/cast/test/utility/utility.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_test_utility',
diff --git a/media/cast/test/utility/video_utility.cc b/media/cast/test/utility/video_utility.cc
index 742be6f..81475d8 100644
--- a/media/cast/test/utility/video_utility.cc
+++ b/media/cast/test/utility/video_utility.cc
@@ -36,7 +36,6 @@ double I420PSNR(const scoped_refptr<media::VideoFrame>& frame1,
}
void PopulateVideoFrame(VideoFrame* frame, int start_value) {
- int width = frame->coded_size().width();
int height = frame->coded_size().height();
int stride_y = frame->stride(VideoFrame::kYPlane);
int stride_u = frame->stride(VideoFrame::kUPlane);
diff --git a/media/cast/transport/utility/utility.gyp b/media/cast/transport/utility/utility.gyp
index 35b6aa0..9be4068 100644
--- a/media/cast/transport/utility/utility.gyp
+++ b/media/cast/transport/utility/utility.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'transport_utility',
@@ -20,4 +23,4 @@
],
},
],
-} \ No newline at end of file
+}
diff --git a/media/cast/video_receiver/codecs/vp8/vp8_decoder.gyp b/media/cast/video_receiver/codecs/vp8/vp8_decoder.gyp
index 4bc9434..c1209ff 100644
--- a/media/cast/video_receiver/codecs/vp8/vp8_decoder.gyp
+++ b/media/cast/video_receiver/codecs/vp8/vp8_decoder.gyp
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'chromium_code': 1,
+ },
'targets': [
{
'target_name': 'cast_vp8_decoder',
diff --git a/media/cast/video_receiver/video_receiver.cc b/media/cast/video_receiver/video_receiver.cc
index bf8844b..95b1d51 100644
--- a/media/cast/video_receiver/video_receiver.cc
+++ b/media/cast/video_receiver/video_receiver.cc
@@ -21,7 +21,6 @@ namespace {
static const int64 kMinSchedulingDelayMs = 1;
static const int64 kMinTimeBetweenOffsetUpdatesMs = 1000;
static const int kTimeOffsetMaxCounter = 10;
-static const int64_t kMinProcessIntervalMs = 5;
} // namespace
@@ -176,7 +175,6 @@ void VideoReceiver::GetEncodedVideoFrame(
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
scoped_ptr<transport::EncodedVideoFrame> encoded_frame(
new transport::EncodedVideoFrame());
- uint32 rtp_timestamp = 0;
bool next_frame = false;
if (!framer_->GetEncodedVideoFrame(encoded_frame.get(), &next_frame)) {
diff --git a/media/cast/video_sender/codecs/vp8/vp8_encoder.cc b/media/cast/video_sender/codecs/vp8/vp8_encoder.cc
index a073b9f0..a822dc9 100644
--- a/media/cast/video_sender/codecs/vp8/vp8_encoder.cc
+++ b/media/cast/video_sender/codecs/vp8/vp8_encoder.cc
@@ -294,7 +294,7 @@ uint32 Vp8Encoder::GetLatestFrameIdToReference() {
Vp8Encoder::Vp8Buffers Vp8Encoder::GetNextBufferToUpdate() {
// Update at most one buffer, except for key-frames.
- Vp8Buffers buffer_to_update;
+ Vp8Buffers buffer_to_update = kNoBuffer;
if (number_of_repeated_buffers_ < max_number_of_repeated_buffers_in_a_row_) {
// TODO(pwestin): experiment with this. The issue with only this change is
// that we can end up with only 4 frames in flight when we expect 6.
diff --git a/media/cast/video_sender/external_video_encoder.cc b/media/cast/video_sender/external_video_encoder.cc
index 4b59379..aa3c267 100644
--- a/media/cast/video_sender/external_video_encoder.cc
+++ b/media/cast/video_sender/external_video_encoder.cc
@@ -23,7 +23,7 @@ class LocalVideoEncodeAcceleratorClient;
} // namespace media
namespace {
-static const int kOutputBufferCount = 3;
+static const size_t kOutputBufferCount = 3;
void LogFrameEncodedEvent(
const scoped_refptr<media::cast::CastEnvironment>& cast_environment,
@@ -181,7 +181,7 @@ class LocalVideoEncodeAcceleratorClient
DCHECK(encoder_task_runner_->RunsTasksOnCurrentThread());
DCHECK(video_encode_accelerator_);
- for (int j = 0; j < kOutputBufferCount; ++j) {
+ for (size_t j = 0; j < kOutputBufferCount; ++j) {
create_video_encode_memory_cb_.Run(
output_buffer_size,
base::Bind(&LocalVideoEncodeAcceleratorClient::OnCreateSharedMemory,