Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / media / cast / framer / framer.cc
index c0cc433..ef9b207 100644 (file)
@@ -17,9 +17,13 @@ Framer::Framer(base::TickClock* clock,
                bool decoder_faster_than_max_frame_rate,
                int max_unacked_frames)
     : decoder_faster_than_max_frame_rate_(decoder_faster_than_max_frame_rate),
-      cast_msg_builder_(new CastMessageBuilder(clock, incoming_payload_feedback,
-          &frame_id_map_, ssrc, decoder_faster_than_max_frame_rate,
-          max_unacked_frames)) {
+      cast_msg_builder_(
+          new CastMessageBuilder(clock,
+                                 incoming_payload_feedback,
+                                 &frame_id_map_,
+                                 ssrc,
+                                 decoder_faster_than_max_frame_rate,
+                                 max_unacked_frames)) {
   DCHECK(incoming_payload_feedback) << "Invalid argument";
 }
 
@@ -66,7 +70,6 @@ bool Framer::InsertPacket(const uint8* payload_data,
 
 // This does not release the frame.
 bool Framer::GetEncodedAudioFrame(transport::EncodedAudioFrame* audio_frame,
-                                  uint32* rtp_timestamp,
                                   bool* next_frame) {
   uint32 frame_id;
   // Find frame id.
@@ -82,14 +85,14 @@ bool Framer::GetEncodedAudioFrame(transport::EncodedAudioFrame* audio_frame,
 
   ConstFrameIterator it = frames_.find(frame_id);
   DCHECK(it != frames_.end());
-  if (it == frames_.end()) return false;
+  if (it == frames_.end())
+    return false;
 
-  return it->second->GetEncodedAudioFrame(audio_frame, rtp_timestamp);
+  return it->second->GetEncodedAudioFrame(audio_frame);
 }
 
 // This does not release the frame.
 bool Framer::GetEncodedVideoFrame(transport::EncodedVideoFrame* video_frame,
-                                  uint32* rtp_timestamp,
                                   bool* next_frame) {
   uint32 frame_id;
   // Find frame id.
@@ -98,7 +101,8 @@ bool Framer::GetEncodedVideoFrame(transport::EncodedVideoFrame* video_frame,
     *next_frame = true;
   } else {
     // Check if we can skip frames when our decoder is too slow.
-    if (!decoder_faster_than_max_frame_rate_) return false;
+    if (!decoder_faster_than_max_frame_rate_)
+      return false;
 
     if (!frame_id_map_.NextVideoFrameAllowingSkippingFrames(&frame_id)) {
       return false;
@@ -108,9 +112,10 @@ bool Framer::GetEncodedVideoFrame(transport::EncodedVideoFrame* video_frame,
 
   ConstFrameIterator it = frames_.find(frame_id);
   DCHECK(it != frames_.end());
-  if (it == frames_.end())  return false;
+  if (it == frames_.end())
+    return false;
 
-  return it->second->GetEncodedVideoFrame(video_frame, rtp_timestamp);
+  return it->second->GetEncodedVideoFrame(video_frame);
 }
 
 void Framer::Reset() {
@@ -126,7 +131,7 @@ void Framer::ReleaseFrame(uint32 frame_id) {
   // We have a frame - remove all frames with lower frame id.
   bool skipped_old_frame = false;
   FrameList::iterator it;
-  for (it = frames_.begin(); it != frames_.end(); ) {
+  for (it = frames_.begin(); it != frames_.end();) {
     if (IsOlderFrameId(it->first, frame_id)) {
       frames_.erase(it++);
       skipped_old_frame = true;
@@ -143,9 +148,7 @@ bool Framer::TimeToSendNextCastMessage(base::TimeTicks* time_to_send) {
   return cast_msg_builder_->TimeToSendNextCastMessage(time_to_send);
 }
 
-void Framer::SendCastMessage() {
-  cast_msg_builder_->UpdateCastMessage();
-}
+void Framer::SendCastMessage() { cast_msg_builder_->UpdateCastMessage(); }
 
 }  // namespace cast
 }  // namespace media