Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
V
V8
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
V8
Commits
585fc8af
Commit
585fc8af
authored
Oct 14, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code.
parent
f27efcaf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
17 deletions
+8
-17
encoder
extensions/encoder
+1
-1
builtins-encoder.cc
src/builtins/builtins-encoder.cc
+7
-16
No files found.
encoder
@
4ab9abdc
Subproject commit
62049927e36cde5854de90b3a4b98ada1be4be85
Subproject commit
4ab9abdc60117616ddabc0998df2a45d1e17d21d
src/builtins/builtins-encoder.cc
View file @
585fc8af
#include <stdio.h>
#include <iostream>
...
...
@@ -42,27 +40,21 @@ BUILTIN(InitEncodeContext) {
}
// Convert to C/C++ type
Handle
<
String
>
path_str
;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION
(
isolate
,
path_str
,
Object
::
ToString
(
isolate
,
path
))
;
std
::
string
outpath
{
Object
::
ToString
(
isolate
,
path
)
->
ToCString
().
get
()
}
;
uint32_t
width_int
,
height_int
,
bitrate_int
,
framerate_int
;
std
::
string
outpath
{
path_str
->
ToCString
().
get
()
};
uint32_t
width_int
,
height_int
,
bitrate_int
,
framerate_int
;
width
->
ToUint32
(
&
width_int
);
height
->
ToUint32
(
&
height_int
);
bitrate
->
ToUint32
(
&
bitrate_int
);
framerate
->
ToUint32
(
&
framerate_int
);
if
(
!
path
->
IsString
())
{
// Argument check
}
enc
=
new
LAIPIC_ENCODER
::
Encoder
{
""
,
outpath
,
width_int
,
width_int
,
bitrate_int
,
};
""
,
outpath
,
width_int
,
width_int
,
bitrate_int
};
if
(
!
enc
->
isReady
())
{
// Fail to initialize LAIPIC_ENCODER::Encoder.
// Probaly cause of invalid arguments.
THROW_NEW_ERROR_RETURN_FAILURE
(
isolate
,
NewEvalError
(
MessageTemplate
::
kInvalidArgument
));
}
...
...
@@ -74,11 +66,10 @@ BUILTIN(InitEncodeContext) {
BUILTIN
(
Encode
)
{
HandleScope
scope
(
isolate
);
//Handle<Object> frame = args.atOrUndefined(isolate, 1);
if
(
!
inited
)
return
*
isolate
->
factory
()
->
ToBoolean
(
false
);
Handle
<
JSTypedArray
>
array
;
// = Handle<JSTypedArray>::cast(frame);
Handle
<
JSTypedArray
>
array
;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION
(
isolate
,
array
,
JSTypedArray
::
Validate
(
isolate
,
args
.
atOrUndefined
(
isolate
,
1
),
"ENCODER.encode()"
));
...
...
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