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
69150b38
Commit
69150b38
authored
May 08, 2022
by
NzSN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flush encoder in EOFProcessing
parent
ae3cc906
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
encWW.js
resources/workers/encWW.js
+3
-5
No files found.
resources/workers/encWW.js
View file @
69150b38
...
@@ -161,17 +161,14 @@ async function steps() {
...
@@ -161,17 +161,14 @@ async function steps() {
async
function
EOFProcessing
()
{
async
function
EOFProcessing
()
{
let
ret
=
0
,
size_
;
let
ret
=
0
,
size_
;
console
.
log
(
ident
+
" EOF"
);
encoder
.
_flushEncoder
(
);
while
(
true
)
{
while
(
true
)
{
ret
=
encoder
.
_getPackets
(
encBuf
,
ENC_BUF_SIZE
,
size
);
ret
=
encoder
.
_getPackets
(
encBuf
,
ENC_BUF_SIZE
,
size
);
size_
=
encoder
.
getValue
(
size
,
'i32'
);
size_
=
encoder
.
getValue
(
size
,
'i32'
);
if
(
ret
==
1
)
{
if
(
size_
==
0
)
{
/* No more frames here */
break
;
break
;
}
else
if
(
ret
>
0
)
{
throw
new
Error
(
"Encoder internal error"
)
}
}
sendToMuxerUntilSuccess
(
size_
,
500
);
sendToMuxerUntilSuccess
(
size_
,
500
);
...
@@ -214,6 +211,7 @@ async function RGBProcessing(frame) {
...
@@ -214,6 +211,7 @@ async function RGBProcessing(frame) {
// Unit of interval is millionsecond
// Unit of interval is millionsecond
async
function
sendToMuxerUntilSuccess
(
size
,
interval
)
{
async
function
sendToMuxerUntilSuccess
(
size
,
interval
)
{
console
.
log
(
"Send to Muxer"
);
while
(
!
sendToMuxer
(
size
))
{
while
(
!
sendToMuxer
(
size
))
{
await
sleep
(
interval
);
await
sleep
(
interval
);
}
}
...
...
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