OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CAST_FRAMER_FRAMER_H_ | 5 #ifndef MEDIA_CAST_FRAMER_FRAMER_H_ |
6 #define MEDIA_CAST_FRAMER_FRAMER_H_ | 6 #define MEDIA_CAST_FRAMER_FRAMER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 | 42 |
43 // Extracts a complete encoded frame - will only return a complete and | 43 // Extracts a complete encoded frame - will only return a complete and |
44 // decodable frame. Returns false if no such frames exist. | 44 // decodable frame. Returns false if no such frames exist. |
45 // |next_frame| will be set to true if the returned frame is the very | 45 // |next_frame| will be set to true if the returned frame is the very |
46 // next frame. |have_multiple_complete_frames| will be set to true | 46 // next frame. |have_multiple_complete_frames| will be set to true |
47 // if there are more decodadble frames available. | 47 // if there are more decodadble frames available. |
48 bool GetEncodedFrame(EncodedFrame* video_frame, | 48 bool GetEncodedFrame(EncodedFrame* video_frame, |
49 bool* next_frame, | 49 bool* next_frame, |
50 bool* have_multiple_complete_frames); | 50 bool* have_multiple_complete_frames); |
51 | 51 |
52 // TODO(hubbe): Move this elsewhere. | |
Alpha Left Google
2014/08/25 23:23:44
This comment doesn't add much value. Please give m
hubbe
2014/08/27 04:14:03
Done.
| |
53 void AckFrame(uint32 frame_id); | |
54 | |
52 void ReleaseFrame(uint32 frame_id); | 55 void ReleaseFrame(uint32 frame_id); |
53 | 56 |
54 // Reset framer state to original state and flush all pending buffers. | 57 // Reset framer state to original state and flush all pending buffers. |
55 void Reset(); | 58 void Reset(); |
56 bool TimeToSendNextCastMessage(base::TimeTicks* time_to_send); | 59 bool TimeToSendNextCastMessage(base::TimeTicks* time_to_send); |
57 void SendCastMessage(); | 60 void SendCastMessage(); |
58 | 61 |
59 private: | 62 private: |
60 const bool decoder_faster_than_max_frame_rate_; | 63 const bool decoder_faster_than_max_frame_rate_; |
61 FrameList frames_; | 64 FrameList frames_; |
62 FrameIdMap frame_id_map_; | 65 FrameIdMap frame_id_map_; |
63 | 66 |
64 scoped_ptr<CastMessageBuilder> cast_msg_builder_; | 67 scoped_ptr<CastMessageBuilder> cast_msg_builder_; |
65 | 68 |
66 DISALLOW_COPY_AND_ASSIGN(Framer); | 69 DISALLOW_COPY_AND_ASSIGN(Framer); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace cast | 72 } // namespace cast |
70 } // namespace media | 73 } // namespace media |
71 | 74 |
72 #endif // MEDIA_CAST_FRAMER_FRAMER_H_ | 75 #endif // MEDIA_CAST_FRAMER_FRAMER_H_ |
OLD | NEW |