Chromium Code Reviews| Index: remoting/protocol/rtp_utils.h |
| diff --git a/remoting/protocol/rtp_utils.h b/remoting/protocol/rtp_utils.h |
| index f1275a91014241deb07d2d76185dff7e2651bd16..b2dd3f8f4ed78c8b24a324ad5331fdd23a57a723 100644 |
| --- a/remoting/protocol/rtp_utils.h |
| +++ b/remoting/protocol/rtp_utils.h |
| @@ -24,17 +24,39 @@ struct RtpHeader { |
| uint32 source_id[15]; |
| }; |
| +struct Vp8Descriptor { |
| + enum FragmentationInfo { |
|
Alpha Left Google
2010/11/15 23:46:35
Need explanation for these values
Sergey Ulanov
2010/11/16 00:22:55
These are documented in the spec. Added comment wi
|
| + NOT_FRAGMENTED = 0, |
| + FIRST_FRAGMENT = 1, |
| + MIDDLE_FRAGMENT = 2, |
| + LAST_FRAGMENT = 3, |
| + }; |
| + |
| + bool non_reference_frame; |
| + uint8 fragmentation_info; |
| + bool frame_beginning; |
| + |
| + // PictureID is considered to be absent if |picture_id| is set to kuint32max. |
| + uint32 picture_id; |
| +}; |
| + |
| // Returns size of RTP header for the specified number of sources. |
| -int GetRtpHeaderSize(int sources); |
| +int GetRtpHeaderSize(const RtpHeader& header); |
| // Packs RTP header into the buffer. |
| -void PackRtpHeader(uint8* buffer, int buffer_size, |
| - const RtpHeader& header); |
| +void PackRtpHeader(const RtpHeader& header, uint8* buffer, int buffer_size); |
| // Unpacks RTP header and stores unpacked values in |header|. If the header |
| // is not valid returns -1, otherwise returns size of the header. |
| -int UnpackRtpHeader(const uint8* buffer, int buffer_size, |
| - RtpHeader* header); |
| +int UnpackRtpHeader(const uint8* buffer, int buffer_size, RtpHeader* header); |
| + |
| +int GetVp8DescriptorSize(const Vp8Descriptor& descriptor); |
| + |
| +void PackVp8Descriptor(const Vp8Descriptor& descriptor, uint8* buffer, |
| + int buffer_size); |
| + |
| +int UnpackVp8Descriptor(const uint8* buffer, int buffer_size, |
| + Vp8Descriptor* descriptor); |
| } // namespace protocol |
| } // namespace remoting |