Gathering detailed insights and metrics for xeue-gstreamer
Gathering detailed insights and metrics for xeue-gstreamer
Gathering detailed insights and metrics for xeue-gstreamer
Gathering detailed insights and metrics for xeue-gstreamer
npm install xeue-gstreamer
Typescript
Module System
Min. Node Version
Node Version
NPM Version
71.5
Supply Chain
98.8
Quality
76.1
Maintenance
100
Vulnerability
100
License
C++ (91.72%)
Python (5.98%)
CMake (2.3%)
Total Downloads
136
Last Day
1
Last Week
4
Last Month
16
Last Year
136
MIT License
125 Commits
1 Branches
1 Contributors
Updated on Jun 11, 2024
Latest Version
1.7.4
Package Id
xeue-gstreamer@1.7.4
Unpacked Size
0.99 MB
Size
0.96 MB
File Count
30
NPM Version
9.6.7
Node Version
20.3.1
Published on
Jun 13, 2024
Cumulative downloads
Total Downloads
Last Day
-66.7%
1
Compared to previous day
Last Week
-33.3%
4
Compared to previous week
Last Month
166.7%
16
Compared to previous month
Last Year
0%
136
Compared to previous year
Superficial GStreamer binding
This is a superficial binding of GStreamer to Node.js. It does not attempt at being a complete binding, and will hopefully one day be replaced by (or implemented with) node-gir.
1const gstreamer = require('gstreamer-superficial'); 2const pipeline = new gstreamer.Pipeline(`videotestsrc ! textoverlay name=text 3 ! autovideosink`); 4 5pipeline.play();
Then, you can find an element within the pipeline, and set its properties:
1const target = pipeline.findChild('text'); 2 3target.text = 'Hello'; 4Object.assign(target.text, { 5 text: 'Hello', 6 'font-desc': 'Helvetica 32', 7})
(see also examples/basic-pipeline.js)
Pipeline also knows .stop()
, .pause()
and .pollBus()
,
the elements returned by .findChild()
getting and setting all properties the real GObject
s do, appsinks also support .pull()
(see below).
There is a simple .seek(position, flags)
function. Normally you should pass 1 for flags (GST_SEEK_FLAG_FLUSH). See Flags and Seek Docs.
You can query the pipeline's duration and current position with .getDuration()
and .getPosition()
(both might return -1). All time position values are in Seconds.
(see also examples/seek.js)
You can asynchronously handle bus messages using Pipeline.pollBus(callback):
1pipeline.pollBus(msg => { 2 console.log(msg); 3});
(see also examples/bus.js)
You can feast off GStreamer's appsink to handle binary data. .pull starts a background work queue and calls your callback whenever a buffer is (or caps are) available:
1const appsink = pipeline.findChild('sink'); 2 3function onData(buf, caps) { 4 if (caps) { 5 console.log('CAPS', caps); 6 } 7 if (buf) { 8 console.log('BUFFER size', buf.length); 9 appsink.pull(onData); 10 } 11 12 // !buf probably means EOS 13} 14 15appsink.pull(onData);
(see examples/appsink.js)
should be working as implemented in examples/streaming/
run server.js (requires express) and point your browser to http://localhost:8001. (Tested only with Chromium).
This handles retaining the streamheader to feed first to every newly connected client.
gstreamer-superficial was originally written by Daniel Turing, and has received contributions from various individuals as seen on github and in package.json.
libgstreamer-plugins-base1.0-dev
libgstreamer1.0-dev
nan
No vulnerabilities found.
No security vulnerabilities found.