Remove use of RtpHeaderExtension and clean up

Currently there are two structs that are identical and track extension details:
webrtc::RtpExtension
cricket::RtpHeaderExtension

The use of the structs is mixed in the code to track the extensions being
supported. This results in duplicate definition of
the URI constants and there is code to convert between the two structs.

Clean up to use a single RtpHeader throughout the codebase. The actual location
of RtpHeader may change in future (perhaps to be located in api/). Additionally,
this CL renames some of the constants to clarify Uri and Id use.

BUG= webrtc:5895

Review-Url: https://codereview.webrtc.org/1984983002
Cr-Commit-Position: refs/heads/master@{#12924}
diff --git a/webrtc/api/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc
index fa05241..b2e75a2 100644
--- a/webrtc/api/webrtcsdp.cc
+++ b/webrtc/api/webrtcsdp.cc
@@ -27,6 +27,8 @@
 #include "webrtc/base/logging.h"
 #include "webrtc/base/messagedigest.h"
 #include "webrtc/base/stringutils.h"
+// for RtpExtension
+#include "webrtc/config.h"
 #include "webrtc/media/base/codec.h"
 #include "webrtc/media/base/cryptoparams.h"
 #include "webrtc/media/base/mediaconstants.h"
@@ -64,7 +66,7 @@
 using cricket::kCodecParamAssociatedPayloadType;
 using cricket::MediaContentDescription;
 using cricket::MediaType;
-using cricket::RtpHeaderExtension;
+using cricket::RtpHeaderExtensions;
 using cricket::SsrcGroup;
 using cricket::StreamParams;
 using cricket::StreamParamsVec;
@@ -73,8 +75,6 @@
 using cricket::VideoContentDescription;
 using rtc::SocketAddress;
 
-typedef std::vector<RtpHeaderExtension> RtpHeaderExtensions;
-
 namespace cricket {
 class SessionDescription;
 }
@@ -309,7 +309,7 @@
                             std::vector<std::string>* transport_options,
                             SdpParseError* error);
 static bool ParseExtmap(const std::string& line,
-                        RtpHeaderExtension* extmap,
+                        RtpExtension* extmap,
                         SdpParseError* error);
 static bool ParseFingerprintAttribute(const std::string& line,
                                       rtc::SSLFingerprint** fingerprint,
@@ -1168,7 +1168,8 @@
   return true;
 }
 
-bool ParseExtmap(const std::string& line, RtpHeaderExtension* extmap,
+bool ParseExtmap(const std::string& line,
+                 RtpExtension* extmap,
                  SdpParseError* error) {
   // RFC 5285
   // a=extmap:<value>["/"<direction>] <URI> <extensionattributes>
@@ -1192,7 +1193,7 @@
     return false;
   }
 
-  *extmap = RtpHeaderExtension(uri, value);
+  *extmap = RtpExtension(uri, value);
   return true;
 }
 
@@ -2015,7 +2016,7 @@
       desc->set_msid_supported(
           CaseInsensitiveFind(semantics, kMediaStreamSemantic));
     } else if (HasAttribute(line, kAttributeExtmap)) {
-      RtpHeaderExtension extmap;
+      RtpExtension extmap;
       if (!ParseExtmap(line, &extmap, error)) {
         return false;
       }
@@ -2703,7 +2704,7 @@
       } else if (HasAttribute(line, kAttributeSendRecv)) {
         media_desc->set_direction(cricket::MD_SENDRECV);
       } else if (HasAttribute(line, kAttributeExtmap)) {
-        RtpHeaderExtension extmap;
+        RtpExtension extmap;
         if (!ParseExtmap(line, &extmap, error)) {
           return false;
         }