Skip to content

Commit

Permalink
Documenting the fact that all functions that take Packets now also ac…
Browse files Browse the repository at this point in the history
…cept pointers, and all functions that take Frames now also accept pointers
  • Loading branch information
Yahweasel committed Oct 19, 2023
1 parent 073f092 commit 778b6e1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions post.in.js
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ var ff_free_decoder = Module.ff_free_decoder = function(c, pkt, frame) {
*/
/* @types
* ff_encode_multi@sync(
* ctx: number, frame: number, pkt: number, inFrames: Frame[],
* ctx: number, frame: number, pkt: number, inFrames: (Frame | number)[],
* fin?: boolean
* ): @promise@Packet[]@
*/
Expand Down Expand Up @@ -832,7 +832,7 @@ var ff_encode_multi = Module.ff_encode_multi = function(ctx, frame, pkt, inFrame
*/
/* @types
* ff_decode_multi@sync(
* ctx: number, pkt: number, frame: number, inPackets: Packet[],
* ctx: number, pkt: number, frame: number, inPackets: (Packet | number)[],
* config?: boolean | {
* fin?: boolean,
* ignoreErrors?: boolean,
Expand Down Expand Up @@ -1064,7 +1064,7 @@ Module.ff_init_demuxer_file = function() {
*/
/* @types
* ff_write_multi@sync(
* oc: number, pkt: number, inPackets: Packet[], interleave?: boolean
* oc: number, pkt: number, inPackets: (Packet | number)[], interleave?: boolean
* ): @promise@void@
*/
var ff_write_multi = Module.ff_write_multi = function(oc, pkt, inPackets, interleave) {
Expand Down Expand Up @@ -1351,14 +1351,14 @@ var ff_init_filter_graph = Module.ff_init_filter_graph = function(filters_descr,
/* @types
* ff_filter_multi@sync(
* srcs: number, buffersink_ctx: number, framePtr: number,
* inFrames: Frame[], config?: boolean | {
* inFrames: (Frame | number)[], config?: boolean | {
* fin?: boolean,
* copyoutFrame?: string
* }
* ): @promise@Frame[]@;
* ff_filter_multi@sync(
* srcs: number[], buffersink_ctx: number, framePtr: number,
* inFrames: Frame[][], config?: boolean[] | {
* inFrames: (Frame | number)[][], config?: boolean[] | {
* fin?: boolean,
* copyoutFrame?: string
* }[]
Expand Down Expand Up @@ -1441,7 +1441,7 @@ var ff_filter_multi = Module.ff_filter_multi = function(srcs, buffersink_ctx, fr
/* @types
* ff_decode_filter_multi@sync(
* ctx: number, buffersrc_ctx: number, buffersink_ctx: number, pkt: number,
* frame: number, inPackets: Packet[],
* frame: number, inPackets: (Packet | number)[],
* config?: boolean | {
* fin?: boolean,
* ignoreErrors?: boolean,
Expand Down Expand Up @@ -1741,9 +1741,9 @@ var ff_copyout_frame_versions = {
/**
* Copy in a frame.
* @param framePtr AVFrame
* @param frame Frame to copy in
* @param frame Frame to copy in, as either a Frame or an AVFrame pointer
*/
/// @types ff_copyin_frame@sync(framePtr: number, frame: Frame): @promise@void@
/// @types ff_copyin_frame@sync(framePtr: number, frame: Frame | number): @promise@void@
var ff_copyin_frame = Module.ff_copyin_frame = function(framePtr, frame) {
if (typeof frame === "number") {
// This is a frame pointer, not a libav.js Frame
Expand Down Expand Up @@ -1942,9 +1942,9 @@ var ff_copyout_packet_versions = {
/**
* Copy in a packet.
* @param pktPtr AVPacket
* @param packet Packet to copy in.
* @param packet Packet to copy in, as either a Packet or an AVPacket pointer
*/
/// @types ff_copyin_packet@sync(pktPtr: number, packet: Packet): @promise@void@
/// @types ff_copyin_packet@sync(pktPtr: number, packet: Packet | number): @promise@void@
var ff_copyin_packet = Module.ff_copyin_packet = function(pktPtr, packet) {
if (typeof packet === "number") {
// Input packet is an AVPacket pointer, duplicate it
Expand Down

0 comments on commit 778b6e1

Please sign in to comment.