py-tgcalls 2.0.5__py3-none-any.whl → 2.1.0__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.
- {py_tgcalls-2.0.5.dist-info → py_tgcalls-2.1.0.dist-info}/METADATA +11 -16
- py_tgcalls-2.1.0.dist-info/RECORD +106 -0
- {py_tgcalls-2.0.5.dist-info → py_tgcalls-2.1.0.dist-info}/WHEEL +1 -1
- pytgcalls/__init__.py +2 -0
- pytgcalls/__version__.py +1 -1
- pytgcalls/exceptions.py +7 -24
- pytgcalls/ffmpeg.py +2 -2
- pytgcalls/filters.py +52 -7
- pytgcalls/handlers/handlers_holder.py +1 -1
- pytgcalls/media_devices/__init__.py +6 -2
- pytgcalls/media_devices/device_info.py +8 -15
- pytgcalls/media_devices/input_device.py +11 -0
- pytgcalls/media_devices/media_devices.py +41 -92
- pytgcalls/media_devices/screen_device.py +10 -0
- pytgcalls/media_devices/speaker_device.py +10 -0
- pytgcalls/methods/calls/change_volume_call.py +3 -0
- pytgcalls/methods/calls/get_participants.py +5 -1
- pytgcalls/methods/calls/leave_call.py +3 -1
- pytgcalls/methods/stream/__init__.py +14 -10
- pytgcalls/methods/stream/{mute_stream.py → mute.py} +2 -2
- pytgcalls/methods/stream/{pause_stream.py → pause.py} +2 -2
- pytgcalls/methods/stream/play.py +27 -21
- pytgcalls/methods/stream/record.py +49 -0
- pytgcalls/methods/stream/{resume_stream.py → resume.py} +2 -2
- pytgcalls/methods/stream/send_frame.py +38 -0
- pytgcalls/methods/stream/{played_time.py → time.py} +5 -3
- pytgcalls/methods/stream/{unmute_stream.py → unmute.py} +2 -2
- pytgcalls/methods/utilities/__init__.py +6 -0
- pytgcalls/methods/utilities/call_holder.py +5 -2
- pytgcalls/methods/utilities/join_presentation.py +50 -0
- pytgcalls/methods/utilities/log_retries.py +14 -0
- pytgcalls/methods/utilities/start.py +136 -16
- pytgcalls/methods/utilities/stream_params.py +69 -22
- pytgcalls/methods/utilities/update_sources.py +42 -0
- pytgcalls/mtproto/bridged_client.py +36 -2
- pytgcalls/mtproto/client_cache.py +46 -16
- pytgcalls/mtproto/hydrogram_client.py +72 -23
- pytgcalls/mtproto/mtproto_client.py +32 -4
- pytgcalls/mtproto/pyrogram_client.py +72 -23
- pytgcalls/mtproto/telethon_client.py +97 -33
- pytgcalls/scaffold.py +15 -0
- pytgcalls/types/__init__.py +14 -4
- pytgcalls/types/calls/__init__.py +2 -0
- pytgcalls/types/calls/call.py +5 -3
- pytgcalls/types/calls/call_sources.py +4 -0
- pytgcalls/types/chats/group_call_participant.py +23 -0
- pytgcalls/types/py_object.py +9 -10
- pytgcalls/types/raw/audio_stream.py +3 -3
- pytgcalls/types/raw/stream.py +8 -4
- pytgcalls/types/raw/video_stream.py +5 -4
- pytgcalls/types/stream/__init__.py +14 -4
- pytgcalls/types/stream/device.py +36 -0
- pytgcalls/types/stream/direction.py +25 -0
- pytgcalls/types/stream/external_media.py +8 -0
- pytgcalls/types/stream/frame.py +26 -0
- pytgcalls/types/stream/media_stream.py +178 -107
- pytgcalls/types/stream/record_stream.py +99 -0
- pytgcalls/types/stream/stream_ended.py +32 -0
- pytgcalls/types/stream/stream_frames.py +20 -0
- py_tgcalls-2.0.5.dist-info/RECORD +0 -93
- pytgcalls/media_devices/screen_info.py +0 -45
- pytgcalls/types/stream/stream_audio_ended.py +0 -9
- pytgcalls/types/stream/stream_video_ended.py +0 -9
- {py_tgcalls-2.0.5.dist-info → py_tgcalls-2.1.0.dist-info}/LICENSE +0 -0
- {py_tgcalls-2.0.5.dist-info → py_tgcalls-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Union
|
|
3
|
+
|
|
4
|
+
from ntgcalls import MediaSource
|
|
5
|
+
|
|
6
|
+
from ...media_devices.speaker_device import SpeakerDevice
|
|
7
|
+
from ...statictypes import statictypes
|
|
8
|
+
from ..raw.audio_parameters import AudioParameters
|
|
9
|
+
from ..raw.audio_stream import AudioStream
|
|
10
|
+
from ..raw.stream import Stream
|
|
11
|
+
from ..raw.video_parameters import VideoParameters
|
|
12
|
+
from ..raw.video_stream import VideoStream
|
|
13
|
+
from ..stream.audio_quality import AudioQuality
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RecordStream(Stream):
|
|
17
|
+
@statictypes
|
|
18
|
+
def __init__(
|
|
19
|
+
self,
|
|
20
|
+
audio: Union[bool, str, Path, SpeakerDevice] = False,
|
|
21
|
+
audio_parameters: Union[
|
|
22
|
+
AudioParameters,
|
|
23
|
+
AudioQuality,
|
|
24
|
+
] = AudioQuality.HIGH,
|
|
25
|
+
camera: bool = False,
|
|
26
|
+
screen: bool = False,
|
|
27
|
+
):
|
|
28
|
+
raw_audio_parameters = (
|
|
29
|
+
audio_parameters
|
|
30
|
+
if isinstance(audio_parameters, AudioParameters)
|
|
31
|
+
else AudioParameters(*audio_parameters.value)
|
|
32
|
+
if isinstance(audio_parameters, AudioQuality)
|
|
33
|
+
else ValueError('Invalid audio parameters')
|
|
34
|
+
)
|
|
35
|
+
super().__init__(
|
|
36
|
+
microphone=self._get_audio_stream(audio, raw_audio_parameters),
|
|
37
|
+
speaker=None,
|
|
38
|
+
camera=self._get_video_stream(camera),
|
|
39
|
+
screen=self._get_video_stream(screen),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
@staticmethod
|
|
43
|
+
def _get_audio_stream(audio, raw_audio_parameters):
|
|
44
|
+
if isinstance(audio, bool) and audio:
|
|
45
|
+
return AudioStream(
|
|
46
|
+
media_source=MediaSource.EXTERNAL,
|
|
47
|
+
path='',
|
|
48
|
+
parameters=raw_audio_parameters,
|
|
49
|
+
)
|
|
50
|
+
if isinstance(audio, Path):
|
|
51
|
+
audio = str(audio)
|
|
52
|
+
if isinstance(audio, str):
|
|
53
|
+
is_lossless = raw_audio_parameters.bitrate > 48000
|
|
54
|
+
commands = [
|
|
55
|
+
'ffmpeg',
|
|
56
|
+
'-y',
|
|
57
|
+
'-loglevel',
|
|
58
|
+
'quiet',
|
|
59
|
+
'-f',
|
|
60
|
+
's16le',
|
|
61
|
+
'-ar',
|
|
62
|
+
str(raw_audio_parameters.bitrate),
|
|
63
|
+
'-ac',
|
|
64
|
+
str(raw_audio_parameters.channels),
|
|
65
|
+
'-i',
|
|
66
|
+
'pipe:0',
|
|
67
|
+
'-codec:a',
|
|
68
|
+
'flac' if is_lossless else 'libmp3lame',
|
|
69
|
+
'-flush_packets',
|
|
70
|
+
'1',
|
|
71
|
+
audio,
|
|
72
|
+
]
|
|
73
|
+
return AudioStream(
|
|
74
|
+
media_source=MediaSource.SHELL,
|
|
75
|
+
path=' '.join(commands),
|
|
76
|
+
parameters=raw_audio_parameters,
|
|
77
|
+
)
|
|
78
|
+
if isinstance(audio, SpeakerDevice):
|
|
79
|
+
return AudioStream(
|
|
80
|
+
media_source=MediaSource.DEVICE,
|
|
81
|
+
path=audio.metadata,
|
|
82
|
+
parameters=raw_audio_parameters,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
@staticmethod
|
|
86
|
+
def _get_video_stream(enable):
|
|
87
|
+
return (
|
|
88
|
+
VideoStream(
|
|
89
|
+
media_source=MediaSource.EXTERNAL,
|
|
90
|
+
path='',
|
|
91
|
+
parameters=VideoParameters(
|
|
92
|
+
width=-1,
|
|
93
|
+
height=-1,
|
|
94
|
+
frame_rate=0,
|
|
95
|
+
),
|
|
96
|
+
)
|
|
97
|
+
if enable
|
|
98
|
+
else None
|
|
99
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from enum import auto
|
|
2
|
+
|
|
3
|
+
from ntgcalls import StreamType
|
|
4
|
+
|
|
5
|
+
from ...types.update import Update
|
|
6
|
+
from ..flag import Flag
|
|
7
|
+
from .device import Device
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class StreamEnded(Update):
|
|
11
|
+
|
|
12
|
+
class Type(Flag):
|
|
13
|
+
AUDIO = auto()
|
|
14
|
+
VIDEO = auto()
|
|
15
|
+
|
|
16
|
+
@staticmethod
|
|
17
|
+
def from_raw(kind: StreamType):
|
|
18
|
+
if kind == StreamType.AUDIO:
|
|
19
|
+
return StreamEnded.Type.AUDIO
|
|
20
|
+
if kind == StreamType.VIDEO:
|
|
21
|
+
return StreamEnded.Type.VIDEO
|
|
22
|
+
return None
|
|
23
|
+
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
chat_id: int,
|
|
27
|
+
stream_type: Type,
|
|
28
|
+
device: Device,
|
|
29
|
+
):
|
|
30
|
+
super().__init__(chat_id)
|
|
31
|
+
self.stream_type = stream_type
|
|
32
|
+
self.device = device
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
from ...types.update import Update
|
|
4
|
+
from .device import Device
|
|
5
|
+
from .direction import Direction
|
|
6
|
+
from .frame import Frame
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class StreamFrames(Update):
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
chat_id: int,
|
|
13
|
+
direction: Direction,
|
|
14
|
+
device: Device,
|
|
15
|
+
frames: List[Frame],
|
|
16
|
+
):
|
|
17
|
+
super().__init__(chat_id)
|
|
18
|
+
self.direction = direction
|
|
19
|
+
self.device = device
|
|
20
|
+
self.frames = frames
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
pytgcalls/__init__.py,sha256=TfZGf1enqqs50mBB406vygB6zYgn3vAjBYFUDO4Pviw,248
|
|
2
|
-
pytgcalls/__version__.py,sha256=dVcGCZ5wUWMpOJgTrQrOvt6L6HdIhykCRMVFZFr-q20,22
|
|
3
|
-
pytgcalls/environment.py,sha256=ctCHACvG6l8SdpPewSBhOvc70kbwpv18maC0TwLvZ08,1924
|
|
4
|
-
pytgcalls/exceptions.py,sha256=0MmAktc53ajYAc7ThjD2tJ9PDyibUi0iHZMfUy2IoKs,4109
|
|
5
|
-
pytgcalls/ffmpeg.py,sha256=uAqFDPwWoABW_WfubxeulpIh5vWpylxFARgYokn3ff8,8640
|
|
6
|
-
pytgcalls/filters.py,sha256=MH3VOJJowA-i0nkOiHOL0yFWTXfiUF4cf36n1kIWMrI,4779
|
|
7
|
-
pytgcalls/mtproto_required.py,sha256=6B-31p5qH_6oekUgypV4nK3hqPS6Nr-pA8S81wjnbaY,630
|
|
8
|
-
pytgcalls/mutex.py,sha256=Frjji5Ctzlk4AXEBuBLnDK-7HbtreoV6zuyKpFpMNI4,236
|
|
9
|
-
pytgcalls/pytgcalls.py,sha256=oBcWgBwusnXmjHrLEE99VVXARReVyrXdn9SyeBWHbVo,1479
|
|
10
|
-
pytgcalls/pytgcalls_session.py,sha256=_BGJWvf7t3mki2DhlEPjh9cypvYuSFkMSxzTsfepwUk,2719
|
|
11
|
-
pytgcalls/scaffold.py,sha256=LihXRBl1kSqJSQvEoH5rAXJXrbnnIqSMBYrhXpW5hHs,958
|
|
12
|
-
pytgcalls/statictypes.py,sha256=CdlqgQNhTZ_uTE8-B8m01fJ7TlD2B42EI2QBPxDdAtA,3842
|
|
13
|
-
pytgcalls/sync.py,sha256=IsOH3TD7cxUg_-zdGt12HoS8sBlXvcGayPZAoxxKM48,3396
|
|
14
|
-
pytgcalls/version_manager.py,sha256=egeGgvb66zWlLTMuw2U-b0x8MfnRzMm1xAEVN87HF5c,296
|
|
15
|
-
pytgcalls/ytdlp.py,sha256=jRA-mKQEXleWvaoGv9wtMa77aRjxsyQxn6_0tXI3-sA,2435
|
|
16
|
-
pytgcalls/custom_api/__init__.py,sha256=ZT8d0lc2YrDuw_YSFAXXHHMewoXGFZ-ANOBIAr0vGFQ,60
|
|
17
|
-
pytgcalls/custom_api/custom_api.py,sha256=Ko3aS6psrwPmOhRPxvG0fepXt4STrA0StvINSxz4Cj8,1890
|
|
18
|
-
pytgcalls/handlers/__init__.py,sha256=pubbxI4pLqQpAKf8-toD6ija4cpSvbCJOQFjTiDjX1E,75
|
|
19
|
-
pytgcalls/handlers/handlers_holder.py,sha256=ve83ydtKM5BjhsQmQ3mridD-3RnSVEi05-oDeiWv28w,1176
|
|
20
|
-
pytgcalls/media_devices/__init__.py,sha256=H6uUA6akUqp8WCiT2gLrqUtFdqpd9rcfqDviP5Vhrls,183
|
|
21
|
-
pytgcalls/media_devices/device_info.py,sha256=KueJCRVXXDcxQJzoGfkzcD2kL58pkMUn7Fr3aUwnNtQ,489
|
|
22
|
-
pytgcalls/media_devices/media_devices.py,sha256=KG4fKfubpeMQZVm9IuQmzDaLhsvKzKRdE3zIYRAhEHM,3227
|
|
23
|
-
pytgcalls/media_devices/screen_info.py,sha256=ARD5nQoYDUt1rU-kOK8G5O5byGXGeFbZWWdDswdCDHc,1107
|
|
24
|
-
pytgcalls/methods/__init__.py,sha256=hk1blAT5u_Isemdrg0nqInLsdRzTTZnak5NdAfkBPAk,217
|
|
25
|
-
pytgcalls/methods/calls/__init__.py,sha256=xg4DZZClEnxwaj-DAq3e8gSR-g-MiYBdUEBth64lSXA,214
|
|
26
|
-
pytgcalls/methods/calls/change_volume_call.py,sha256=viA3yHVxPJ421yE1dfFTh-kNEFTxMlaVFxVjC-PeX-0,719
|
|
27
|
-
pytgcalls/methods/calls/get_participants.py,sha256=gKUAzvha1RpvbtSI_n-GlBQkOONxzibCaCr4aA17Mag,567
|
|
28
|
-
pytgcalls/methods/calls/leave_call.py,sha256=e3lYJKFD29Qg1qgolmLKUk9_X1uApOT1pGYF8ZgwMqQ,1369
|
|
29
|
-
pytgcalls/methods/decorators/__init__.py,sha256=TCGaEVZnHjtOwv-3PNfaCVm0kyFhJApUPUNntt6MwyM,78
|
|
30
|
-
pytgcalls/methods/decorators/on_update.py,sha256=ZTL4YcQk0N4Ru56a5WItUvkSN5SAqr6_RDZvXmZMIHs,316
|
|
31
|
-
pytgcalls/methods/stream/__init__.py,sha256=_4j-CEby4_2Kadva86tFMC4GSSzhBBjKLXfrgTk4gzo,343
|
|
32
|
-
pytgcalls/methods/stream/mute_stream.py,sha256=auo2aAazfEC90Ab6MzaiPdddiJ1w4fN_9HaORkAeOBY,570
|
|
33
|
-
pytgcalls/methods/stream/pause_stream.py,sha256=z_AIWABrQMHmTwvlah_PrH9EjXbro8gKxZni4Km5ICg,573
|
|
34
|
-
pytgcalls/methods/stream/play.py,sha256=38eWJSXFYgq7VRm4AH6e1NJfe6nYTyJ71PbK3mFijHs,7280
|
|
35
|
-
pytgcalls/methods/stream/played_time.py,sha256=IkUdyHrqpzpRl9uf0uZhg1COo4zsHnQOPu3nipjVatI,570
|
|
36
|
-
pytgcalls/methods/stream/resume_stream.py,sha256=z_DgP4cDExjEqEeX_ZL--50MXQ9lrATK876SIwE71PQ,576
|
|
37
|
-
pytgcalls/methods/stream/unmute_stream.py,sha256=KUMhfMbhsPmZsmpF4cGWC1FVW7YwXha2MmQnqrBhM8s,576
|
|
38
|
-
pytgcalls/methods/utilities/__init__.py,sha256=JcKwqNo6fFXXfuab94fNEraKF1P9fnSSgr0WQDRjF2w,339
|
|
39
|
-
pytgcalls/methods/utilities/cache_peer.py,sha256=Ylt0wCCJOoNKf1wZEXjfE8aBZKUIIgdRUFOMTGA5DfE,140
|
|
40
|
-
pytgcalls/methods/utilities/call_holder.py,sha256=MQxAYL3fDDWhf3UFRyLhJD_FVYOeWUNkr8pAII46htQ,972
|
|
41
|
-
pytgcalls/methods/utilities/compose.py,sha256=Nzdv8orMmka5NIBZ1SW1nsqXRzArZl4m6FdZU7syaR4,334
|
|
42
|
-
pytgcalls/methods/utilities/cpu_usage.py,sha256=Mbga4MFCIwuh7WC8sqBbv1Pa6ALcp5AIDyfYMH_Bix4,162
|
|
43
|
-
pytgcalls/methods/utilities/idle.py,sha256=MDdzHTv1ws2yBhsvhBUnssGdghkZ2KwR0HUCPOwV38o,814
|
|
44
|
-
pytgcalls/methods/utilities/ping.py,sha256=hhIMSHk2BzMB-IKpwLdZFVrsEvGm2ftJwKLs1k4anh8,244
|
|
45
|
-
pytgcalls/methods/utilities/resolve_chat_id.py,sha256=92x2LHbUlnJMm-kS3fXOYmzYpY2TZbqtQD2rw3eBXDY,382
|
|
46
|
-
pytgcalls/methods/utilities/run.py,sha256=cnYQd2xB5Cr_WS0Q2cXJZPGiN6JOCULzj1r4xXVyrlg,152
|
|
47
|
-
pytgcalls/methods/utilities/start.py,sha256=7mHp6RkfhuYC6i0JYmQvxK4KYRmkcvOs9kSrClPhNnk,9342
|
|
48
|
-
pytgcalls/methods/utilities/stream_params.py,sha256=hYcNxx__McmPeHgOUDEuNcN7ThgDjukejQYHrfmWm-A,1519
|
|
49
|
-
pytgcalls/mtproto/__init__.py,sha256=X4zvzFG7km7qHyE0fdvA550WcOVO_xl_p__gvIfDGmw,130
|
|
50
|
-
pytgcalls/mtproto/bridged_client.py,sha256=kK22n-CKjtfmtNE6bXCpuL6kWAUK2_Ul7cGgx_HNuHQ,4975
|
|
51
|
-
pytgcalls/mtproto/client_cache.py,sha256=1yA5CFAmWZUsWdpqk5vlaN3j1RV1rIN-X7EcqmsnlfY,5087
|
|
52
|
-
pytgcalls/mtproto/hydrogram_client.py,sha256=x0s0ZmD_cVT_TtEUIT5qO0OueZg719TkfyraaUWJze0,21290
|
|
53
|
-
pytgcalls/mtproto/mtproto_client.py,sha256=LO71RqgxZ3bYxSFb6l9cc4ks6_peyqHN4i_z478c7yw,6883
|
|
54
|
-
pytgcalls/mtproto/pyrogram_client.py,sha256=oXKEoChpEpt3xS1NuM3rfXbmFcpWgBFyibgqm_Pp6D4,21479
|
|
55
|
-
pytgcalls/mtproto/telethon_client.py,sha256=j2Ybibhg67IL8M2LXBWXIJwpc6dTDMz5_9MRYsOVcuw,20373
|
|
56
|
-
pytgcalls/types/__init__.py,sha256=yJVJZoH9M9u9VgpZGUX-MF4NzE-vKp4KrId21YQbcGE,910
|
|
57
|
-
pytgcalls/types/browsers.py,sha256=47Kr5q96n4Q4WvVhA6IUlS2egEcA9GRLlDeFcQYyc9M,9545
|
|
58
|
-
pytgcalls/types/cache.py,sha256=FfsOcmYnsBGPlJoTPIXXYcUSpGE3rhx6cjIH77hyUL0,1059
|
|
59
|
-
pytgcalls/types/dict.py,sha256=lAo9hu4VlVJa9S7P8Y81BYmKtvz0rH7hwpGcH3ynHUw,78
|
|
60
|
-
pytgcalls/types/flag.py,sha256=dQPcQmTgTQzcOLTvGe8t_e9mY4qsVnCZFrrTk17b2Xw,132
|
|
61
|
-
pytgcalls/types/list.py,sha256=UjP_XxxMpPkLlu6yEy29JYqOM5VITFwwJcDm0wZni1c,78
|
|
62
|
-
pytgcalls/types/participant_list.py,sha256=LmGjU63MK1v3SS2_4xNbk04OOjmukNdAXYLRn2L-730,916
|
|
63
|
-
pytgcalls/types/py_object.py,sha256=VlazuMP0cFpExKimW8BtWR66LDewnNdQSLC7r_t7JIM,842
|
|
64
|
-
pytgcalls/types/update.py,sha256=wPCzWLhrsScZ3ksRTyt8IuDaaG5YI-ItG_Yw-OqzK2Y,157
|
|
65
|
-
pytgcalls/types/user_agent.py,sha256=sSfeGqUe0v0wqBgdVszNFK0iOC_0Tdyto9CglBXlY4U,1086
|
|
66
|
-
pytgcalls/types/calls/__init__.py,sha256=6O2wp7I3d2YGLNeMgXTRyG37Y6BESafneLdr9n37_4s,346
|
|
67
|
-
pytgcalls/types/calls/call.py,sha256=wxa3L3nZnbTKtZbezCaA3iUt4rZ5IriQyMMrgRlp7GA,485
|
|
68
|
-
pytgcalls/types/calls/call_config.py,sha256=b6P43YTGF2t7E2CyD1mSYPJDUBvYYeHoxB3hSbTVyOY,120
|
|
69
|
-
pytgcalls/types/calls/call_data.py,sha256=-qPj2QhWv32Xs7LyFQY4hiWDqJ21B8VBvdzREK8bDvY,544
|
|
70
|
-
pytgcalls/types/calls/call_protocol.py,sha256=OVIQs1VgdY-DWbZbNr41hjLA4pGQvHx8Rgom1_NhJxQ,408
|
|
71
|
-
pytgcalls/types/calls/group_call_config.py,sha256=auKH-hZJWj8PhTkyeQ_VK2z9NpNvNC7Scl_IhEUMnQM,353
|
|
72
|
-
pytgcalls/types/calls/raw_call_update.py,sha256=hpNw6HrTW8Z36Lh2HinS-wzprryRtsIxyIFbIfjGgeI,795
|
|
73
|
-
pytgcalls/types/chats/__init__.py,sha256=v8pUp_vbr2kQpyHtAQc80N-YqzmXHe9SbllUsa6njkU,261
|
|
74
|
-
pytgcalls/types/chats/chat_update.py,sha256=wh8v2I-pZxJWGNBjIwWRbhY-ZCI4v8qGabDTpuJaHu0,619
|
|
75
|
-
pytgcalls/types/chats/group_call_participant.py,sha256=HQ2EVZKE1_uEjtUKdUA8yJemdc189IN4mioSP-KDEiY,1020
|
|
76
|
-
pytgcalls/types/chats/updated_group_call_participant.py,sha256=-KID-z-4e43fhYWQp0pNMKPfmZizbJHXyzn6yLtIGNg,291
|
|
77
|
-
pytgcalls/types/raw/__init__.py,sha256=ROHsKFeUMUtlFbx2rhfrdB-TuVm0zBuvNo29Ccn5614,308
|
|
78
|
-
pytgcalls/types/raw/audio_parameters.py,sha256=1DsBPwdn_Ukd2Tbkb3whP_ILo9xJY_3XNNmbO4_NO9Q,449
|
|
79
|
-
pytgcalls/types/raw/audio_stream.py,sha256=wEMa93hHt0VBUSuS6gPJlFIGZp5GdNU94O2C2u4AXnY,476
|
|
80
|
-
pytgcalls/types/raw/stream.py,sha256=jCvFUSAdHupqMqfG1E36CgKijKoy0o2LUbgcVjj5Mz0,491
|
|
81
|
-
pytgcalls/types/raw/video_parameters.py,sha256=nUl9gkfYTVU0iLNGTtlZ5cZg8K6F7odIi9n8POJXCK4,639
|
|
82
|
-
pytgcalls/types/raw/video_stream.py,sha256=2Chrk7NFWF1H9V7hH71RZ5rF3iBhT53syFkHKw4-5gc,433
|
|
83
|
-
pytgcalls/types/stream/__init__.py,sha256=xfF-9ZulOLk3E6G1nw1Ky0ZRWXlFuER0Uj8HQn3650w,338
|
|
84
|
-
pytgcalls/types/stream/audio_quality.py,sha256=4X94ErmTeLP4TVcE3eLtPPdtluSPxgxbgTosuNJOVhc,141
|
|
85
|
-
pytgcalls/types/stream/media_stream.py,sha256=YoG-vISvDga1n4IHs4hdF03ldtqyojFMvwB3To_39kE,8931
|
|
86
|
-
pytgcalls/types/stream/stream_audio_ended.py,sha256=2_EFa98F0vWu0d0jBmLtzp4NH_xBkDO_6yP9UtyKuCs,164
|
|
87
|
-
pytgcalls/types/stream/stream_video_ended.py,sha256=9YFTTZPMDpB95eb815rGtgDrzBGfTeazJ5mZwP6Hvks,164
|
|
88
|
-
pytgcalls/types/stream/video_quality.py,sha256=HBfWq005kh-D19MaVE9VzVdnODzrXf4IJUimCfslfiU,231
|
|
89
|
-
py_tgcalls-2.0.5.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
90
|
-
py_tgcalls-2.0.5.dist-info/METADATA,sha256=iY2yXiN74vk3mSszXj8of-T_AH-2U_D1qE3wg03MGVc,14356
|
|
91
|
-
py_tgcalls-2.0.5.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
92
|
-
py_tgcalls-2.0.5.dist-info/top_level.txt,sha256=IUDUwn0KkcbUYZbCe9R5AUb2Ob-lmllNUGQqyeXXd8A,10
|
|
93
|
-
py_tgcalls-2.0.5.dist-info/RECORD,,
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
from sys import platform
|
|
2
|
-
|
|
3
|
-
from ..types.py_object import PyObject
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class ScreenInfo(PyObject):
|
|
7
|
-
def __init__(
|
|
8
|
-
self,
|
|
9
|
-
x: int,
|
|
10
|
-
y: int,
|
|
11
|
-
width: int,
|
|
12
|
-
height: int,
|
|
13
|
-
is_primary: bool,
|
|
14
|
-
title: str,
|
|
15
|
-
):
|
|
16
|
-
self.offset_x = x
|
|
17
|
-
self.offset_y = y
|
|
18
|
-
self.width = width
|
|
19
|
-
self.height = height
|
|
20
|
-
self.is_primary = is_primary
|
|
21
|
-
self.title = title
|
|
22
|
-
self.ffmpeg_parameters = ['-f']
|
|
23
|
-
|
|
24
|
-
def build_ffmpeg_command(self, frame_rate: int):
|
|
25
|
-
if platform == 'win32':
|
|
26
|
-
path = 'desktop'
|
|
27
|
-
|
|
28
|
-
self.ffmpeg_parameters += [
|
|
29
|
-
'gdigrab',
|
|
30
|
-
'-offset_x',
|
|
31
|
-
str(self.offset_x),
|
|
32
|
-
'-offset_y',
|
|
33
|
-
str(self.offset_y),
|
|
34
|
-
]
|
|
35
|
-
else:
|
|
36
|
-
path = f':0.0+{self.offset_x},{self.offset_y}'
|
|
37
|
-
self.ffmpeg_parameters += ['x11grab']
|
|
38
|
-
|
|
39
|
-
self.ffmpeg_parameters += [
|
|
40
|
-
'-video_size',
|
|
41
|
-
f'{self.width}x{self.height}',
|
|
42
|
-
'-framerate',
|
|
43
|
-
str(frame_rate),
|
|
44
|
-
]
|
|
45
|
-
return path
|
|
File without changes
|
|
File without changes
|