{"_id":"@bun-win32/mf","_rev":"4-d4018537e72a0fba98ac5a6f0721ff07","name":"@bun-win32/mf","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/mf","version":"1.0.0","keywords":["bun","ffi","win32","windows","mf","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/mf@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"12d5bbff2353aa7f7f9aa9722c7de07f5786b777","tarball":"https://registry.npmjs.org/@bun-win32/mf/-/mf-1.0.0.tgz","fileCount":6,"integrity":"sha512-ktRspCuYuD75L8T+c8e5El9Yngh440CigVlnRMr6iZakPt1JTxnQj8qUUF2HLoQox22x/rU0SoAeusY/UpbBog==","signatures":[{"sig":"MEUCIG6h9VWlUobHEFWFeJaUtqaXRuMyzaEgwtosHg+Ena+vAiEA2eqp3Ck2NPYotZa/q+EXRa//aiveLZ4NH0F0HQItXXI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22998},"main":"./index.ts","type":"module","module":"index.ts","shasum":"12d5bbff2353aa7f7f9aa9722c7de07f5786b777","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:asf-pipeline-forge":"bun ./example/asf-pipeline-forge.ts","example:media-format-atlas":"bun ./example/media-format-atlas.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-ktRspCuYuD75L8T+c8e5El9Yngh440CigVlnRMr6iZakPt1JTxnQj8qUUF2HLoQox22x/rU0SoAeusY/UpbBog==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/mf"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 MF bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/mf_1.0.0_1779077512790_0.7076832708279182","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/mf","version":"1.0.1","keywords":["bun","ffi","win32","windows","mf","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/mf@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"8aa80863f3e3410c583fbe3203a246718cf1a951","tarball":"https://registry.npmjs.org/@bun-win32/mf/-/mf-1.0.1.tgz","fileCount":6,"integrity":"sha512-+8EQ0XhLiqquIUP2Hlx6ibsXVdmKIdtkzuKaIl3xDJqEorDBG6mQuxDzFBnlxRm2OFFm4u0RDtZ9qjps8vbsTg==","signatures":[{"sig":"MEYCIQDHPhWMku+uF/quJT6V0APkpp7XRa+FhHKK3YVfbpnKMwIhAIBuwsYHtuH+XMObUtDTyx5E1WyI1ACvpGkQRcyvL3O5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23005},"main":"./index.ts","type":"module","module":"index.ts","shasum":"8aa80863f3e3410c583fbe3203a246718cf1a951","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:asf-pipeline-forge":"bun ./example/asf-pipeline-forge.ts","example:media-format-atlas":"bun ./example/media-format-atlas.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-+8EQ0XhLiqquIUP2Hlx6ibsXVdmKIdtkzuKaIl3xDJqEorDBG6mQuxDzFBnlxRm2OFFm4u0RDtZ9qjps8vbsTg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/mf"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 MF bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/mf_1.0.1_1780581912103_0.283378377565334","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/mf","version":"2.0.0","keywords":["bun","ffi","win32","windows","mf","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/mf@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"f1692062cbea7304e7906a1f06844f861173fbcd","tarball":"https://registry.npmjs.org/@bun-win32/mf/-/mf-2.0.0.tgz","fileCount":6,"integrity":"sha512-macmCzjFtdbdgMLpoLhqarhGGmVQQ1avD7/UbrjMzUgaiMeGYSL+udqVmfsEJS0zwMyb6ONZBPnj83t3Jn9Rgw==","signatures":[{"sig":"MEYCIQCVnTJPAL03wpcIf88VuYEwWKyMYyxFQLBBAlu2iWpZqQIhAJ0cB0s7QIaAEmcZMrRhQZlaDk2URhLp8zz33X4aaeIr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24572},"main":"./index.ts","type":"module","module":"index.ts","shasum":"f1692062cbea7304e7906a1f06844f861173fbcd","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:asf-pipeline-forge":"bun ./example/asf-pipeline-forge.ts","example:media-format-atlas":"bun ./example/media-format-atlas.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-macmCzjFtdbdgMLpoLhqarhGGmVQQ1avD7/UbrjMzUgaiMeGYSL+udqVmfsEJS0zwMyb6ONZBPnj83t3Jn9Rgw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/mf"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 MF bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/mf_2.0.0_1782435327968_0.6920137528608177","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 MF bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/mf","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/mf"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","mf","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:asf-pipeline-forge":"bun ./example/asf-pipeline-forge.ts","example:media-format-atlas":"bun ./example/media-format-atlas.ts"},"_id":"@bun-win32/mf@2.0.1","_integrity":"sha512-0R0MjJuEBpa5RrgnGPNlm7G/CpG6rPWd6GH5AJLLEaKP6vy42IbdMlf+uN/cyuE6cW3EnK31PjS0L0JT9qNlLQ==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"a85a55a1b7476ba5b51a528201da2f067a4377ad","dist":{"integrity":"sha512-0R0MjJuEBpa5RrgnGPNlm7G/CpG6rPWd6GH5AJLLEaKP6vy42IbdMlf+uN/cyuE6cW3EnK31PjS0L0JT9qNlLQ==","shasum":"a85a55a1b7476ba5b51a528201da2f067a4377ad","tarball":"https://registry.npmjs.org/@bun-win32/mf/-/mf-2.0.1.tgz","fileCount":6,"unpackedSize":24572,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDRiV249aS2ID828U0A41m+A+JtLIDl/5OZWgZo8NSLeAiEA1Itk12OiHGbEP3VXrRLjUNWilLp9OIQqI/bew5J99O8="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mf_2.0.1_1782438122501_0.03572135843578117"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T04:11:52.691Z","modified":"2026-06-26T01:42:02.765Z","1.0.0":"2026-05-18T04:11:52.929Z","1.0.1":"2026-06-04T14:05:12.241Z","2.0.0":"2026-06-26T00:55:28.138Z","2.0.1":"2026-06-26T01:42:02.635Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","mf","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/mf"},"description":"Zero-dependency, zero-overhead Win32 MF bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/mf\n\nZero-dependency, zero-overhead Win32 MF bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/mf` exposes the `mf.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Mf`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\n`mf.dll` is the Media Foundation **pipeline** layer that sits on top of the already-shipped `@bun-win32/mfplat` (platform) and `@bun-win32/mfreadwrite` (source reader / sink writer): source resolution, the ASF authoring object graph, every container media sink (MP3/AAC-ADTS/AC-3/MPEG-4/fragmented-MP4/3GP), streaming sinks, the video renderer, network credential/proxy plumbing, and the protected-environment / signed-library surface.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `mf.dll` (source resolver, ASF profile/multiplexer/indexer/splitter, MP3/AC-3/ADTS/MPEG-4/3GP media sinks, video renderer, network credential/proxy, and more).\n- In-source docs in `structs/Mf.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`Mf.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases (see `types/Mf.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n\n## Installation\n\n```sh\nbun add @bun-win32/mf\n```\n\n## Quick Start\n\n```ts\nimport Mf from '@bun-win32/mf';\nimport Mfplat from '@bun-win32/mfplat';\n\n// Media Foundation must be started before mf.dll factories are used.\nMfplat.MFStartup(0x0002_0070 /* MF_VERSION */, 0x1 /* MFSTARTUP_LITE */);\n\n// Create a source resolver — the entry point that turns a URL or byte stream\n// into an IMFMediaSource for the playback / transcode pipeline.\nconst ppResolver = Buffer.alloc(8); // IMFSourceResolver**\nconst hr = Mf.MFCreateSourceResolver(ppResolver.ptr);\nif (hr === 0) {\n  const pResolver = ppResolver.readBigUInt64LE(0); // live COM interface pointer\n  // …walk the IMFSourceResolver vtable, then Release() it…\n  void pResolver;\n}\n\nMfplat.MFShutdown();\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example:asf-pipeline-forge\nbun run example:media-format-atlas\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Mf.Preload()`.\n- `mf.dll` factories require Media Foundation to be initialized first — call `MFStartup` from `@bun-win32/mfplat` (and typically `CoInitializeEx`) before use.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}