Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/selkies/webrtc/__init__.py: 95%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

19 statements  

1# ruff: noqa: F401 

2 

3# This Source Code Form is subject to the terms of the Mozilla Public 

4# License, v. 2.0. If a copy of the MPL was not distributed with this 

5# file, You can obtain one at https://mozilla.org/MPL/2.0/. 

6# 

7# This file incorporates work covered by the following copyright and 

8# permission notice: 

9# 

10# Copyright (c) Jeremy Lainé. 

11# All rights reserved. 

12# 

13# Redistribution and use in source and binary forms, with or without 

14# modification, are permitted provided that the following conditions are met: 

15# 

16# * Redistributions of source code must retain the above copyright notice, 

17# this list of conditions and the following disclaimer. 

18# * Redistributions in binary form must reproduce the above copyright notice, 

19# this list of conditions and the following disclaimer in the documentation 

20# and/or other materials provided with the distribution. 

21# * Neither the name of aiortc nor the names of its contributors may 

22# be used to endorse or promote products derived from this software without 

23# specific prior written permission. 

24# 

25# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 

26# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 

27# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 

28# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 

29# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 

30# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 

31# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 

32# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 

33# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 

34# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

35 

36import logging 

37 

38from .exceptions import InvalidAccessError, InvalidStateError 

39from .mediastreams import ( 

40 AudioStreamTrack, 

41 MediaStreamError, 

42 MediaStreamTrack, 

43 VideoStreamTrack, 

44) 

45from .rtcconfiguration import RTCBundlePolicy, RTCConfiguration, RTCIceServer 

46from .rtcdatachannel import RTCDataChannel, RTCDataChannelParameters 

47from .rtcdtlstransport import ( 

48 RTCCertificate, 

49 RTCDtlsFingerprint, 

50 RTCDtlsParameters, 

51 RTCDtlsTransport, 

52) 

53from .rtcicetransport import ( 

54 RTCIceCandidate, 

55 RTCIceGatherer, 

56 RTCIceParameters, 

57 RTCIceTransport, 

58) 

59from .rtcpeerconnection import RTCPeerConnection 

60from .rtcrtpparameters import ( 

61 RTCRtcpParameters, 

62 RTCRtpCapabilities, 

63 RTCRtpCodecCapability, 

64 RTCRtpCodecParameters, 

65 RTCRtpHeaderExtensionCapability, 

66 RTCRtpHeaderExtensionParameters, 

67 RTCRtpParameters, 

68) 

69from .rtcrtpreceiver import ( 

70 RTCRtpContributingSource, 

71 RTCRtpReceiver, 

72 RTCRtpSynchronizationSource, 

73) 

74from .rtcrtpsender import RTCRtpSender 

75from .rtcrtptransceiver import RTCRtpTransceiver 

76from .rtcsctptransport import RTCSctpCapabilities, RTCSctpTransport 

77from .rtcsessiondescription import RTCSessionDescription 

78from .stats import ( 

79 RTCInboundRtpStreamStats, 

80 RTCOutboundRtpStreamStats, 

81 RTCRemoteInboundRtpStreamStats, 

82 RTCRemoteOutboundRtpStreamStats, 

83 RTCStatsReport, 

84 RTCTransportStats, 

85) 

86 

87__version__ = "1.15.0" 

88 

89# Set default logging handler to avoid "No handler found" warnings. 

90logging.getLogger(__name__).addHandler(logging.NullHandler()) 

91 

92__all__ = [ 

93 "AudioStreamTrack", 

94 "InvalidAccessError", 

95 "InvalidStateError", 

96 "MediaStreamError", 

97 "MediaStreamTrack", 

98 "RTCBundlePolicy", 

99 "RTCCertificate", 

100 "RTCConfiguration", 

101 "RTCDataChannel", 

102 "RTCDataChannelParameters", 

103 "RTCDtlsFingerprint", 

104 "RTCDtlsParameters", 

105 "RTCDtlsTransport", 

106 "RTCIceCandidate", 

107 "RTCIceGatherer", 

108 "RTCIceParameters", 

109 "RTCIceServer", 

110 "RTCIceTransport", 

111 "RTCInboundRtpStreamStats", 

112 "RTCOutboundRtpStreamStats", 

113 "RTCPeerConnection", 

114 "RTCRemoteInboundRtpStreamStats", 

115 "RTCRemoteOutboundRtpStreamStats", 

116 "RTCRtcpParameters", 

117 "RTCRtpCapabilities", 

118 "RTCRtpCodecCapability", 

119 "RTCRtpCodecParameters", 

120 "RTCRtpContributingSource", 

121 "RTCRtpHeaderExtensionCapability", 

122 "RTCRtpHeaderExtensionParameters", 

123 "RTCRtpParameters", 

124 "RTCRtpReceiver", 

125 "RTCRtpSender", 

126 "RTCRtpSynchronizationSource", 

127 "RTCRtpTransceiver", 

128 "RTCSctpCapabilities", 

129 "RTCSctpTransport", 

130 "RTCSessionDescription", 

131 "RTCStatsReport", 

132 "RTCTransportStats", 

133 "VideoStreamTrack", 

134]