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
dbd3435c
Commit
dbd3435c
authored
May 17, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e599e52c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
channel.js
src/channel.js
+1
-1
ENCH264Group.spec.js
tests/ENCH264Group.spec.js
+32
-0
No files found.
src/channel.js
View file @
dbd3435c
import
{
assert
,
NEED_TO_IMPLEMENT
}
from
'./utils.js'
;
import
{
assert
,
NEED_TO_IMPLEMENT
}
from
'./utils.js'
;
class
ChnlStepConflictError
extends
Error
{
export
class
ChnlStepConflictError
extends
Error
{
constructor
()
{
constructor
()
{
super
(
"Channel Step error"
);
super
(
"Channel Step error"
);
}
}
...
...
tests/ENCH264Group.spec.js
View file @
dbd3435c
...
@@ -38,4 +38,36 @@ describe("H264EncWWGroup Spec", () => {
...
@@ -38,4 +38,36 @@ describe("H264EncWWGroup Spec", () => {
grp
.
terminate
();
grp
.
terminate
();
},
3000000
)
},
3000000
)
fit
(
"Encode By H264EncWWGroup with direct write"
,
async
()
=>
{
const
RGBAFrameSize
=
1920
*
1080
*
4
;
let
grp
=
new
H264EncWWGroup
(
"h264enc"
,
2
,
{
encchnlsize
:
RGBAFrameSize
*
10
,
bridgechnlsize
:
Math
.
pow
(
2
,
25
),
blockbased
:
true
,
blocksize
:
RGBAFrameSize
,
});
await
grp
.
start
();
const
data
=
new
Uint8Array
([...
Array
(
RGBAFrameSize
).
keys
()]);
for
(
let
i
=
0
;
i
<
30
;
++
i
)
{
let
buffers
=
[];
while
(
true
)
{
buffers
=
grp
.
directWPrepare
(
RGBAFrameSize
);
if
(
buffers
>
0
)
break
;
else
{
console
.
log
(
"Sleep"
);
await
sleep
(
30
);
}
}
expect
(
buffers
.
length
).
toBe
(
1
);
buffers
[
0
].
set
(
data
,
0
);
grp
.
directWConfirm
();
}
grp
.
terminate
();
},
30000
);
})
})
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