Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: webrtc/pc/mediasession.h

Issue 2761143002: Support encrypted RTP extensions (RFC 6904) (Closed)
Patch Set: More updates + support for adding/changing encrypted extensions. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 const DataCodecs& data_codecs() const { return data_codecs_; } 457 const DataCodecs& data_codecs() const { return data_codecs_; }
458 void set_data_codecs(const DataCodecs& codecs) { data_codecs_ = codecs; } 458 void set_data_codecs(const DataCodecs& codecs) { data_codecs_ = codecs; }
459 SecurePolicy secure() const { return secure_; } 459 SecurePolicy secure() const { return secure_; }
460 void set_secure(SecurePolicy s) { secure_ = s; } 460 void set_secure(SecurePolicy s) { secure_ = s; }
461 // Decides if a StreamParams shall be added to the audio and video media 461 // Decides if a StreamParams shall be added to the audio and video media
462 // content in SessionDescription when CreateOffer and CreateAnswer is called 462 // content in SessionDescription when CreateOffer and CreateAnswer is called
463 // even if |options| don't include a Stream. This is needed to support legacy 463 // even if |options| don't include a Stream. This is needed to support legacy
464 // applications. |add_legacy_| is true per default. 464 // applications. |add_legacy_| is true per default.
465 void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; } 465 void set_add_legacy_streams(bool add_legacy) { add_legacy_ = add_legacy; }
466 466
467 void set_enable_encrypted_rtp_header_extensions(bool enable) {
468 enable_encrypted_rtp_header_extensions_ = enable;
469 }
470
467 SessionDescription* CreateOffer( 471 SessionDescription* CreateOffer(
468 const MediaSessionOptions& options, 472 const MediaSessionOptions& options,
469 const SessionDescription* current_description) const; 473 const SessionDescription* current_description) const;
470 SessionDescription* CreateAnswer( 474 SessionDescription* CreateAnswer(
471 const SessionDescription* offer, 475 const SessionDescription* offer,
472 const MediaSessionOptions& options, 476 const MediaSessionOptions& options,
473 const SessionDescription* current_description) const; 477 const SessionDescription* current_description) const;
474 478
475 private: 479 private:
476 const AudioCodecs& GetAudioCodecsForOffer( 480 const AudioCodecs& GetAudioCodecsForOffer(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 560
557 AudioCodecs audio_send_codecs_; 561 AudioCodecs audio_send_codecs_;
558 AudioCodecs audio_recv_codecs_; 562 AudioCodecs audio_recv_codecs_;
559 AudioCodecs audio_sendrecv_codecs_; 563 AudioCodecs audio_sendrecv_codecs_;
560 RtpHeaderExtensions audio_rtp_extensions_; 564 RtpHeaderExtensions audio_rtp_extensions_;
561 VideoCodecs video_codecs_; 565 VideoCodecs video_codecs_;
562 RtpHeaderExtensions video_rtp_extensions_; 566 RtpHeaderExtensions video_rtp_extensions_;
563 DataCodecs data_codecs_; 567 DataCodecs data_codecs_;
564 SecurePolicy secure_; 568 SecurePolicy secure_;
565 bool add_legacy_; 569 bool add_legacy_;
570 bool enable_encrypted_rtp_header_extensions_ = false;
566 std::string lang_; 571 std::string lang_;
567 const TransportDescriptionFactory* transport_desc_factory_; 572 const TransportDescriptionFactory* transport_desc_factory_;
568 }; 573 };
569 574
570 // Convenience functions. 575 // Convenience functions.
571 bool IsMediaContent(const ContentInfo* content); 576 bool IsMediaContent(const ContentInfo* content);
572 bool IsAudioContent(const ContentInfo* content); 577 bool IsAudioContent(const ContentInfo* content);
573 bool IsVideoContent(const ContentInfo* content); 578 bool IsVideoContent(const ContentInfo* content);
574 bool IsDataContent(const ContentInfo* content); 579 bool IsDataContent(const ContentInfo* content);
575 const ContentInfo* GetFirstMediaContent(const ContentInfos& contents, 580 const ContentInfo* GetFirstMediaContent(const ContentInfos& contents,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, 620 void GetSupportedVideoCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
616 std::vector<std::string>* crypto_suite_names); 621 std::vector<std::string>* crypto_suite_names);
617 void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, 622 void GetSupportedDataCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
618 std::vector<std::string>* crypto_suite_names); 623 std::vector<std::string>* crypto_suite_names);
619 void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options, 624 void GetDefaultSrtpCryptoSuiteNames(const rtc::CryptoOptions& crypto_options,
620 std::vector<std::string>* crypto_suite_names); 625 std::vector<std::string>* crypto_suite_names);
621 626
622 } // namespace cricket 627 } // namespace cricket
623 628
624 #endif // WEBRTC_PC_MEDIASESSION_H_ 629 #endif // WEBRTC_PC_MEDIASESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698