CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 02:41:38 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=f2fa98bba84f12ddd821c367366d750b22035fd254f97759b48c7eff619699c3a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22WVE7lEfbGTU0uN2476nY_bqVotpHXD4A%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d33d44bbafb080-BLR
vala-gst-demux - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Gtk;
- using Gst;
- public class VideoSample : Window {
- private DrawingArea drawing_area;
- private Pipeline pipeline;
- private Element src;
- private Element demux;
- private Element decoder;
- private Element sink;
- private ulong xid;
- public VideoSample () {
- create_widgets ();
- setup_gst_pipeline ();
- }
- private void create_widgets () {
- var vbox = new Box (Orientation.VERTICAL, 0);
- drawing_area = new DrawingArea ();
- drawing_area.realize.connect(on_realize);
- vbox.pack_start (drawing_area, true, true, 0);
- var play_button = new Button.from_stock (Stock.MEDIA_PLAY);
- play_button.clicked.connect (on_play);
- var stop_button = new Button.from_stock (Stock.MEDIA_STOP);
- stop_button.clicked.connect (on_stop);
- var quit_button = new Button.from_stock (Stock.QUIT);
- quit_button.clicked.connect (Gtk.main_quit);
- var bb = new ButtonBox (Orientation.HORIZONTAL);
- bb.add (play_button);
- bb.add (stop_button);
- bb.add (quit_button);
- vbox.pack_start (bb, false, true, 0);
- add (vbox);
- resize(640,480);
- }
- private void setup_gst_pipeline () {
- pipeline = new Pipeline ("mypipeline");
- src = ElementFactory.make ("souphttpsrc", "video");
- src.set("location","https://admin:[email protected]/nphMotionJpeg?Resolution=320x240&Quality=Standard&Framerate=1");
- src.set("do-timestamp",1);
- demux = ElementFactory.make ("multipartdemux","demuxer");
- decoder = ElementFactory.make ("jpegdec","jpg");
- sink = ElementFactory.make ("xvimagesink", "sink");
- pipeline.add_many (src, demux, decoder, sink);
- demux.pad_added.connect((ev, pad) => {
- pad.link(decoder.get_pad("sink"));
- });
- src.link (demux);
- decoder.link (sink);
- }
- private void on_realize() {
- xid = (ulong)Gdk.X11Window.get_xid(drawing_area.get_window());
- }
- private void on_play () {
- var xoverlay = sink as XOverlay;
- xoverlay.set_xwindow_id (xid);
- pipeline.set_state (State.PLAYING);
- }
- private void on_stop () {
- pipeline.set_state (State.READY);
- }
- public static int main (string[] args) {
- Gst.init (ref args);
- Gtk.init (ref args);
- var sample = new VideoSample ();
- sample.show_all ();
- Gtk.main ();
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 7
JavaScript | 2 sec ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ S
JavaScript | 5 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ P
JavaScript | 13 sec ago | 0.25 KB
-
📝 Crypto Swap Glitch ✅ Working
JavaScript | 14 sec ago | 0.24 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 14 sec ago | 0.25 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ E
JavaScript | 22 sec ago | 0.25 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ G
JavaScript | 24 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch ⭐ T
JavaScript | 31 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand