Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
SexhackmeStreamer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SexHackMe
SexhackmeStreamer
Commits
27682f28
Commit
27682f28
authored
Oct 02, 2024
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test file to test windows pipe pergormances
parent
f8539531
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
16 deletions
+42
-16
pipe2.py
pipe2.py
+19
-0
shmvcam.py
shmvcam.py
+23
-16
No files found.
pipe2.py
0 → 100644
View file @
27682f28
import
sys
import
time
frame
=
b
""
print
(
time
.
time
)
num
=
0
while
True
:
frame
=
sys
.
stdin
.
buffer
.
read
(
1920
*
1080
*
3
)
#frame = frame + pkt
sys
.
stdin
.
buffer
.
flush
()
if
len
(
frame
)
>=
1920
*
1080
*
3
:
frane
=
frame
[
1920
*
1080
*
3
:]
num
=
num
+
1
if
num
>
600
:
print
(
"ANTANI!"
,
time
.
time
(),
num
)
sys
.
exit
(
0
)
time
.
sleep
(
0.01
)
shmvcam.py
View file @
27682f28
...
@@ -90,16 +90,22 @@ class RemoteProcessFLVWriter:
...
@@ -90,16 +90,22 @@ class RemoteProcessFLVWriter:
stderr
=
asyncio
.
subprocess
.
PIPE
,
stderr
=
asyncio
.
subprocess
.
PIPE
,
)
)
self
.
stdout
=
asyncio
.
create_task
(
self
.
_read_to_vcam
(
self
.
proc
.
stdout
))
self
.
stdout
=
asyncio
.
create_task
(
self
.
_read_to_vcam
(
self
.
proc
.
stdout
))
self
.
stderr
=
asyncio
.
create_task
(
self
.
_read_to_file
(
stderr_log
,
self
.
proc
.
stderr
))
#self.stderr = asyncio.create_task(self._read_to_file(stderr_log, self.proc.stderr))
#self.stdout = asyncio.create_task(self._read_to_vcam(self.proc))
async
def
_read_to_vcam
(
self
,
stream
:
StreamReader
):
async
def
_read_to_vcam
(
self
,
stream
:
StreamReader
):
with
pyvirtualcam
.
Camera
(
1920
,
1080
,
30
,
fmt
=
PixelFormat
.
BGR
,
device
=
args
.
device
,
print_fps
=
30
)
as
cam
:
with
pyvirtualcam
.
Camera
(
1920
,
1080
,
30
,
fmt
=
PixelFormat
.
BGR
,
device
=
args
.
device
,
print_fps
=
30
)
as
cam
:
frame
=
""
frame
=
b
''
frames
=
0
frames
=
0
last
=
time
.
time
()
last
=
time
.
time
()
while
not
stream
.
at_eof
():
while
not
stream
.
at_eof
():
frame
=
await
stream
.
readexactly
(
1920
*
1080
*
3
)
#pkt = await stream.read(1920*1080*3)
#print(len(pkt))
pkt
=
await
stream
.
readexactly
(
1920
*
1080
*
3
)
#pkt, stderr = await stream.communicate()
if
pkt
:
frame
=
frame
+
pkt
#print(len(frame))
if
len
(
frame
)
>=
1920
*
1080
*
3
:
if
len
(
frame
)
>=
1920
*
1080
*
3
:
if
time
.
time
()
-
last
>=
1
:
if
time
.
time
()
-
last
>=
1
:
last
=
time
.
time
()
last
=
time
.
time
()
...
@@ -111,6 +117,7 @@ class RemoteProcessFLVWriter:
...
@@ -111,6 +117,7 @@ class RemoteProcessFLVWriter:
#cam.sleep_until_next_frame()
#cam.sleep_until_next_frame()
frames
=
frames
+
1
frames
=
frames
+
1
frame
=
frame
[
1920
*
1080
*
3
:]
time
.
sleep
(
.01
)
time
.
sleep
(
.01
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment