Commit graph

3 commits

Author SHA1 Message Date
Steve Anton
b1c1de17d4 Use the SDP ContentInfo helpers to avoid downcasting
This changes all internal code to use the media_description() helper
for ContentInfo along with the as_audio, as_video, and as_data casting
methods introduced in a previous CL. Reduces the total number of
pointer static_casts in pc/ from 351 to 122.

Bug: webrtc:8620
Change-Id: I996f49b55f1501c758a9e5223e30539a9f8d4eac
Reviewed-on: https://webrtc-review.googlesource.com/35921
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21419}
2017-12-22 00:17:53 +00:00
Steve Anton
5adfafdbf6 Make ContentInfo/ContentDescription slightly more ergonomic
This makes the following changes:
- Replaces ContentDescription with its only subclass,
    MediaContentDescription
- Adds helpers to cast a MediaContentDescription to its
    audio, video, and data subclasses.
- Changes ContentInfo.type to a new enum, MediaProtocolType.

Bug: webrtc:8620
Change-Id: I5eb0811cb16a51b0b9d73ecc4fe8edc7037f1aed
Reviewed-on: https://webrtc-review.googlesource.com/35100
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21401}
2017-12-21 01:35:57 +00:00
Steve Anton
4ab68eec96 Move sessiondescription.h/cc from p2p/base to pc/
SDP is a detail of PeerConnection and is not used by anything in p2p, so
it belongs in the pc/ directory. This also allows
MediaContentDescription to be inlined in the future.

Bug: webrtc:8620
Change-Id: I38b65ede9942e29eb15035ab29f2be988da1e5ce
Reviewed-on: https://webrtc-review.googlesource.com/33781
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21376}
2017-12-20 00:21:52 +00:00
Renamed from p2p/base/sessiondescription.cc (Browse further)