py-tgcalls 2.1.0rc1__py3-none-any.whl → 2.1.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: py-tgcalls
3
- Version: 2.1.0rc1
3
+ Version: 2.1.0rc2
4
4
  Summary: Async client API for the Telegram Calls.
5
5
  Author-email: Laky-64 <iraci.matteo@gmail.com>
6
6
  License: GNU LESSER GENERAL PUBLIC LICENSE
@@ -1,5 +1,5 @@
1
1
  pytgcalls/__init__.py,sha256=qbfwN7rYwIdCegMOzdcbvwazeNjDzgmowgcqLFNqKIM,308
2
- pytgcalls/__version__.py,sha256=Dn7WV109gE8MzAKxrPkR_TxmNiYgdGbvgMFu0WyVZ68,26
2
+ pytgcalls/__version__.py,sha256=WU7MaPYaL-4qk-Vw8tQb_V5TySok6KjTjFI9Q3dw75k,26
3
3
  pytgcalls/environment.py,sha256=ctCHACvG6l8SdpPewSBhOvc70kbwpv18maC0TwLvZ08,1924
4
4
  pytgcalls/exceptions.py,sha256=0MmAktc53ajYAc7ThjD2tJ9PDyibUi0iHZMfUy2IoKs,4109
5
5
  pytgcalls/ffmpeg.py,sha256=tm6DBxyNfPh3h3an-b2s9x1UyX-cvkCdov9prlXxVZY,8649
@@ -49,9 +49,9 @@ pytgcalls/methods/utilities/ping.py,sha256=hhIMSHk2BzMB-IKpwLdZFVrsEvGm2ftJwKLs1
49
49
  pytgcalls/methods/utilities/resolve_chat_id.py,sha256=92x2LHbUlnJMm-kS3fXOYmzYpY2TZbqtQD2rw3eBXDY,382
50
50
  pytgcalls/methods/utilities/run.py,sha256=cnYQd2xB5Cr_WS0Q2cXJZPGiN6JOCULzj1r4xXVyrlg,152
51
51
  pytgcalls/methods/utilities/start.py,sha256=b3S3x5GpCL0FTisUysVlkmg_AvJqqSD2bFO_ybn-3tQ,13529
52
- pytgcalls/methods/utilities/stream_params.py,sha256=V9bKF3w4XLsbzYNAuCXrcjrojioGHLlFeZ3Jz9H3z-0,3235
52
+ pytgcalls/methods/utilities/stream_params.py,sha256=WfKffrxMDoDLb8k7CB3n5IuN4wo6PebGEX0rLP3OaLk,2883
53
53
  pytgcalls/mtproto/__init__.py,sha256=X4zvzFG7km7qHyE0fdvA550WcOVO_xl_p__gvIfDGmw,130
54
- pytgcalls/mtproto/bridged_client.py,sha256=ImMv7fv0d2j4WiG8PdipxsTPCSheF-j9We5Um9pbyrU,5883
54
+ pytgcalls/mtproto/bridged_client.py,sha256=hktnfpfBK7PEL2n7Y0kBZzI7dkLlsdrDwkYliZki8zQ,5915
55
55
  pytgcalls/mtproto/client_cache.py,sha256=Mt0827e_T8DXJHOTkXhkIQUT9EUBWjoLcFcXP1gBnZY,5973
56
56
  pytgcalls/mtproto/hydrogram_client.py,sha256=HWYhScpVd7dwfuwngYcohHcNNnPZxcQA0mHb_HAp7SE,23020
57
57
  pytgcalls/mtproto/mtproto_client.py,sha256=1C1Cc1GOrKom-70NqUOICKxjfjgpPZBSdKdwFUjZzBc,7616
@@ -76,7 +76,7 @@ pytgcalls/types/calls/group_call_config.py,sha256=auKH-hZJWj8PhTkyeQ_VK2z9NpNvNC
76
76
  pytgcalls/types/calls/raw_call_update.py,sha256=hpNw6HrTW8Z36Lh2HinS-wzprryRtsIxyIFbIfjGgeI,795
77
77
  pytgcalls/types/chats/__init__.py,sha256=v8pUp_vbr2kQpyHtAQc80N-YqzmXHe9SbllUsa6njkU,261
78
78
  pytgcalls/types/chats/chat_update.py,sha256=wh8v2I-pZxJWGNBjIwWRbhY-ZCI4v8qGabDTpuJaHu0,619
79
- pytgcalls/types/chats/group_call_participant.py,sha256=yYeBVEeUo7AoAySCKbFwWZxrSdPDNg4r25RSz51i0fk,1656
79
+ pytgcalls/types/chats/group_call_participant.py,sha256=XG4dekFV9GYHASqy_bSE6YnZ1uDunFFif-xLAy_eYGY,1711
80
80
  pytgcalls/types/chats/updated_group_call_participant.py,sha256=-KID-z-4e43fhYWQp0pNMKPfmZizbJHXyzn6yLtIGNg,291
81
81
  pytgcalls/types/raw/__init__.py,sha256=ROHsKFeUMUtlFbx2rhfrdB-TuVm0zBuvNo29Ccn5614,308
82
82
  pytgcalls/types/raw/audio_parameters.py,sha256=1DsBPwdn_Ukd2Tbkb3whP_ILo9xJY_3XNNmbO4_NO9Q,449
@@ -91,12 +91,12 @@ pytgcalls/types/stream/direction.py,sha256=gd10wUmpfsqx87kCAPZt6u8pFiPb09WZfHKcM
91
91
  pytgcalls/types/stream/external_media.py,sha256=RiuSX5tZGdNsQZ8LIRk5Lp4Ksv9oTvaccmInJRZYo4M,114
92
92
  pytgcalls/types/stream/frame.py,sha256=TXo5HZVHbbaVNBqulMhTqGODXH3bpBVlN_of1rosNUQ,586
93
93
  pytgcalls/types/stream/media_stream.py,sha256=sFlP8BMmCjhYp_A8U7XkGV4jbxR7PYsmJiII5Fxs0_A,11971
94
- pytgcalls/types/stream/record_stream.py,sha256=pp08OahflXJ5Cs281KxU-K2ULRP88ega5WBkJ7dwBjk,3038
94
+ pytgcalls/types/stream/record_stream.py,sha256=dE8nLrQaHu-L7G6FbTTwJgMIUy5qwycOwgeYO3ta28A,3035
95
95
  pytgcalls/types/stream/stream_ended.py,sha256=xR_kZwFf03hA6rw_nvI7Be7GwoCKzQf_1MKaGpPDXqY,716
96
96
  pytgcalls/types/stream/stream_frames.py,sha256=028ZhNV-mN3BGqMlmxusAV1xDQpXRYCeM0WXBZhRUhA,446
97
97
  pytgcalls/types/stream/video_quality.py,sha256=HBfWq005kh-D19MaVE9VzVdnODzrXf4IJUimCfslfiU,231
98
- py_tgcalls-2.1.0rc1.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
99
- py_tgcalls-2.1.0rc1.dist-info/METADATA,sha256=VS_LRVpSayNSHgrED8pI6U0Nk_k0aCedpMJa_pySMUs,14398
100
- py_tgcalls-2.1.0rc1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
101
- py_tgcalls-2.1.0rc1.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
102
- py_tgcalls-2.1.0rc1.dist-info/RECORD,,
98
+ py_tgcalls-2.1.0rc2.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
99
+ py_tgcalls-2.1.0rc2.dist-info/METADATA,sha256=va30-VM4T6aYlTTXnFFrN83jLGFRgo3CBfoefeKXZ6o,14398
100
+ py_tgcalls-2.1.0rc2.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
101
+ py_tgcalls-2.1.0rc2.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
102
+ py_tgcalls-2.1.0rc2.dist-info/RECORD,,
pytgcalls/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '2.1.0.rc1'
1
+ __version__ = '2.1.0.rc2'
@@ -26,20 +26,7 @@ class StreamParams:
26
26
  'MediaStream or a raw Stream',
27
27
  )
28
28
 
29
- return MediaDescription(
30
- microphone=StreamParams._parse_media_description(
31
- None if stream is None else stream.microphone,
32
- ),
33
- speaker=StreamParams._parse_media_description(
34
- None if stream is None else stream.speaker,
35
- ),
36
- camera=StreamParams._parse_media_description(
37
- None if stream is None else stream.camera,
38
- ),
39
- screen=StreamParams._parse_media_description(
40
- None if stream is None else stream.screen,
41
- ),
42
- )
29
+ return StreamParams._parse_stream_description(stream)
43
30
 
44
31
  @staticmethod
45
32
  def _parse_media_description(
@@ -64,15 +51,9 @@ class StreamParams:
64
51
  return None
65
52
 
66
53
  @staticmethod
67
- async def get_record_params(
68
- stream: Optional[Stream],
54
+ def _parse_stream_description(
55
+ stream: Stream,
69
56
  ) -> MediaDescription:
70
- if stream is not None:
71
- if isinstance(stream, MediaStream):
72
- raise ValueError(
73
- 'Stream should be an instance of '
74
- 'RecordStream or a raw Stream',
75
- )
76
57
  return MediaDescription(
77
58
  microphone=StreamParams._parse_media_description(
78
59
  None if stream is None else stream.microphone,
@@ -87,3 +68,15 @@ class StreamParams:
87
68
  None if stream is None else stream.screen,
88
69
  ),
89
70
  )
71
+
72
+ @staticmethod
73
+ async def get_record_params(
74
+ stream: Optional[Stream],
75
+ ) -> MediaDescription:
76
+ if stream is not None:
77
+ if isinstance(stream, MediaStream):
78
+ raise ValueError(
79
+ 'Stream should be an instance of '
80
+ 'RecordStream or a raw Stream',
81
+ )
82
+ return StreamParams._parse_stream_description(stream)
@@ -174,6 +174,7 @@ class BridgedClient(HandlersHolder):
174
174
  if participant.volume is not None else 100,
175
175
  bool(participant.just_joined),
176
176
  bool(participant.left),
177
+ participant.source,
177
178
  BridgedClient.parse_source(participant.video),
178
179
  BridgedClient.parse_source(participant.presentation),
179
180
  )
@@ -35,6 +35,7 @@ class GroupCallParticipant(PyObject):
35
35
  volume: int,
36
36
  joined: bool,
37
37
  left: bool,
38
+ source: int,
38
39
  video_info: Optional[SourceInfo],
39
40
  presentation_info: Optional[SourceInfo],
40
41
  ):
@@ -43,6 +44,7 @@ class GroupCallParticipant(PyObject):
43
44
  self.muted_by_admin: bool = muted_by_admin
44
45
  self.video: bool = video
45
46
  self.screen_sharing: bool = screen_sharing
47
+ self.source: int = source
46
48
  self.video_camera: bool = video_camera
47
49
  self.raised_hand: bool = raised_hand
48
50
  self.volume: int = volume
@@ -86,9 +86,9 @@ class RecordStream(Stream):
86
86
  media_source=MediaSource.EXTERNAL,
87
87
  path='',
88
88
  parameters=VideoParameters(
89
- width=-1,
90
- height=-1,
91
- frame_rate=-1,
89
+ width=0,
90
+ height=0,
91
+ frame_rate=0,
92
92
  ),
93
93
  )
94
94
  if enable