-
Couldn't load subscription status.
- Fork 0
Support raw YUVA / YUV pixel data #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,7 +56,7 @@ void readComplete(napi_env env, napi_status asyncStatus, void *data) { | |
| } | ||
| REJECT_STATUS; | ||
|
|
||
| c->status = napi_create_external_buffer(env, c->readLen, c->readBuf, readFinalizer, (void*)(uint64_t)c->readLen, &result); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, DONT LOOK AT THIS CHANGE |
||
| c->status = napi_create_buffer(env, c->readLen, &c->readBuf, &result); | ||
| REJECT_STATUS; | ||
|
|
||
| c->status = napi_adjust_external_memory(env, c->readLen, &externalMemory); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,6 +127,7 @@ napi_value getPacketData(napi_env env, napi_callback_info info) { | |
| napi_value result; | ||
| packetData* p; | ||
| AVBufferRef* hintRef; | ||
| void* resultData; | ||
|
|
||
| status = napi_get_cb_info(env, info, 0, nullptr, nullptr, (void**) &p); | ||
| CHECK_STATUS; | ||
|
|
@@ -135,8 +136,7 @@ napi_value getPacketData(napi_env env, napi_callback_info info) { | |
| status = napi_get_null(env, &result); | ||
| } else { | ||
| hintRef = av_buffer_ref(p->packet->buf); | ||
| status = napi_create_external_buffer(env, hintRef->size, hintRef->data, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, DONT LOOK AT THIS CHANGE |
||
| packetBufferFinalizer, hintRef, &result); | ||
| status = napi_create_buffer_copy(env, hintRef->size, hintRef->data, &resultData, &result); | ||
| CHECK_STATUS; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
absolutely wild bitwise operation