Index: talk/session/media/mediasession.h |
diff --git a/talk/session/media/mediasession.h b/talk/session/media/mediasession.h |
index d329dcdf27b72271ee16496b93104e65fa1ec51e..5bcc8cc55bd6cd29245af1c71308763f49987269 100644 |
--- a/talk/session/media/mediasession.h |
+++ b/talk/session/media/mediasession.h |
@@ -547,6 +547,25 @@ const VideoContentDescription* GetFirstVideoContentDescription( |
const DataContentDescription* GetFirstDataContentDescription( |
const SessionDescription* sdesc); |
+// Functions for translating media candidate names. |
+ |
+// For converting between media ICE component and G-ICE channel |
+// names. For example: |
+// "rtp" <=> 1 |
+// "rtcp" <=> 2 |
+// "video_rtp" <=> 1 |
+// "video_rtcp" <=> 2 |
+// Will not convert in the general case of arbitrary channel names, |
+// but is useful for cases where we have candidates for media |
+// channels. |
+// returns false if there is no mapping. |
+bool GetMediaChannelNameFromComponent( |
+ int component, cricket::MediaType media_type, std::string* channel_name); |
+bool GetMediaComponentFromChannelName( |
+ const std::string& channel_name, int* component); |
+bool GetMediaTypeFromChannelName( |
+ const std::string& channel_name, cricket::MediaType* media_type); |
+ |
void GetSupportedAudioCryptoSuites(std::vector<std::string>* crypto_suites); |
void GetSupportedVideoCryptoSuites(std::vector<std::string>* crypto_suites); |
void GetSupportedDataCryptoSuites(std::vector<std::string>* crypto_suites); |