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

Unified Diff: media/cast/framer/frame_buffer.cc

Issue 148663003: Cast: Refactor framer to Clang format (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/framer/cast_message_builder_unittest.cc ('k') | media/cast/framer/frame_buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/framer/frame_buffer.cc
diff --git a/media/cast/framer/frame_buffer.cc b/media/cast/framer/frame_buffer.cc
index 92e8a8720d32631f9aec6f4149e355ae0e0a9fed..c90062d9dc1985949a67a45b308fd10c1b048c8e 100644
--- a/media/cast/framer/frame_buffer.cc
+++ b/media/cast/framer/frame_buffer.cc
@@ -37,7 +37,8 @@ void FrameBuffer::InsertPacket(const uint8* payload_data,
rtp_timestamp_ = rtp_header.webrtc.header.timestamp;
}
// Is this the correct frame?
- if (rtp_header.frame_id != frame_id_) return;
+ if (rtp_header.frame_id != frame_id_)
+ return;
// Insert every packet only once.
if (packets_.find(rtp_header.packet_id) != packets_.end()) {
@@ -50,8 +51,8 @@ void FrameBuffer::InsertPacket(const uint8* payload_data,
// Insert the packet.
retval.first->second.resize(payload_size);
- std::copy(payload_data, payload_data + payload_size,
- retval.first->second.begin());
+ std::copy(
+ payload_data, payload_data + payload_size, retval.first->second.begin());
++num_packets_received_;
total_data_size_ += payload_size;
@@ -64,7 +65,8 @@ bool FrameBuffer::Complete() const {
bool FrameBuffer::GetEncodedAudioFrame(
transport::EncodedAudioFrame* audio_frame,
uint32* rtp_timestamp) const {
- if (!Complete()) return false;
+ if (!Complete())
+ return false;
*rtp_timestamp = rtp_timestamp_;
@@ -76,8 +78,8 @@ bool FrameBuffer::GetEncodedAudioFrame(
audio_frame->data.reserve(total_data_size_);
PacketMap::const_iterator it;
for (it = packets_.begin(); it != packets_.end(); ++it) {
- audio_frame->data.insert(audio_frame->data.end(),
- it->second.begin(), it->second.end());
+ audio_frame->data.insert(
+ audio_frame->data.end(), it->second.begin(), it->second.end());
}
return true;
}
@@ -85,7 +87,8 @@ bool FrameBuffer::GetEncodedAudioFrame(
bool FrameBuffer::GetEncodedVideoFrame(
transport::EncodedVideoFrame* video_frame,
uint32* rtp_timestamp) const {
- if (!Complete()) return false;
+ if (!Complete())
+ return false;
*rtp_timestamp = rtp_timestamp_;
@@ -99,8 +102,8 @@ bool FrameBuffer::GetEncodedVideoFrame(
video_frame->data.reserve(total_data_size_);
PacketMap::const_iterator it;
for (it = packets_.begin(); it != packets_.end(); ++it) {
- video_frame->data.insert(video_frame->data.end(),
- it->second.begin(), it->second.end());
+ video_frame->data.insert(
+ video_frame->data.end(), it->second.begin(), it->second.end());
}
return true;
}
« no previous file with comments | « media/cast/framer/cast_message_builder_unittest.cc ('k') | media/cast/framer/frame_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698