Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
ParaEncode
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
Linshizhi
ParaEncode
Commits
d3f05ff3
Commit
d3f05ff3
authored
May 16, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2ab6bb36
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
9 deletions
+10
-9
encWW.js
resources/workers/encWW.js
+3
-2
WW.js
src/WW.js
+1
-1
channel.js
src/channel.js
+0
-2
Channel.spec.js
tests/Channel.spec.js
+1
-1
WW.spec.js
tests/WW.spec.js
+4
-2
paraEncodeSpec.spec.js
tests/paraEncodeSpec.spec.js
+1
-1
No files found.
resources/workers/encWW.js
View file @
d3f05ff3
...
...
@@ -15,8 +15,8 @@ let elapsed = 0;
// from channel
const
RGBFrameSize
=
1920
*
1080
*
4
;
let
READ_SIZE
=
RGBFrameSize
;
const
SLEEP_INTERVAL
=
10
0
;
const
SPIN_TIMEOUT
=
3
0
;
const
SLEEP_INTERVAL
=
3
0
;
const
SPIN_TIMEOUT
=
9000
0
;
const
ENC_BUF_SIZE
=
RGBFrameSize
*
10
let
encBuf
=
null
;
...
...
@@ -120,6 +120,7 @@ async function step() {
await
EOFProcessing
();
return
true
;
}
return
false
;
}
...
...
src/WW.js
View file @
d3f05ff3
import
{
makeMsg
,
MESSAGE_TYPE
,
typeOfMsg
}
from
'./encGrooupMsg'
;
import
{
Observable
,
filter
}
from
'rxjs'
;
import
{
Observable
,
filter
}
from
'
./
rxjs'
;
export
class
WWInitError
extends
Error
{
...
...
src/channel.js
View file @
d3f05ff3
...
...
@@ -323,7 +323,6 @@ export class Channel {
}
push
(
data
/* Uint8Array */
)
{
if
(
this
.
#
writePhase
!=
WRITE_PHASE
.
NO_STEP_WRITE
)
{
throw
new
Error
(
"Unable to push into Channel during Step Write"
);
}
...
...
@@ -347,7 +346,6 @@ export class Channel {
for
(
let
key
in
schedule
)
{
plan
=
schedule
[
key
];
if
(
plan
.
size
==
0
)
continue
;
...
...
tests/Channel.spec.js
View file @
d3f05ff3
...
...
@@ -158,7 +158,7 @@ describe("Channel Spec", () => {
expect
(
channel
.
isEmpty
()).
toBe
(
true
);
});
f
it
(
"Two step transfer"
,
async
()
=>
{
it
(
"Two step transfer"
,
async
()
=>
{
let
unitSize
=
10
;
let
channel
=
new
Channel
(
unitSize
*
10
);
...
...
tests/WW.spec.js
View file @
d3f05ff3
...
...
@@ -48,7 +48,7 @@ describe("WW Spec", () => {
// Conntect two worker to do plus
// of an input number.
it
(
"Worker Connect"
,
async
()
=>
{
x
it
(
"Worker Connect"
,
async
()
=>
{
let
src
=
new
WW
(
'SRC'
,
'../resources/tests/workerSRC.js'
);
let
dst
=
new
WW
(
'DST'
,
'../resources/tests/workerDST.js'
);
...
...
@@ -145,7 +145,9 @@ describe("EncWW Specifications", () => {
// Send datas
for
(
let
i
=
0
;
i
<
30
;
++
i
)
{
chs
[
i
%
2
].
push
(
data
);
while
(
chs
[
i
%
2
].
push
(
data
)
==
false
)
{
console
.
log
(
"sleep"
);
}
}
// Send eof
...
...
tests/paraEncodeSpec.spec.js
View file @
d3f05ff3
...
...
@@ -18,7 +18,7 @@ const RGBAFrameSize = 1920*1080*4;
describe
(
"ParaEncoder"
,
()
=>
{
it
(
"Encode With ParaEncoder"
,
async
()
=>
{
x
it
(
"Encode With ParaEncoder"
,
async
()
=>
{
const
data
=
new
Uint8Array
([...
Array
(
RGBAFrameSize
).
keys
()]);
let
st
=
new
Date
();
...
...
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