This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <glib-unix.h> | |
#include <gst/gst.h> | |
typedef struct { | |
GstElement *audioin; | |
GstElement *audiodecode; | |
GstElement *audiobin; | |
GstElement *audiosource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* compile: gcc -O0 -g $(pkg-config --cflags --libs glib-2.0 gobject-2.0 gstreamer-1.0) -o gstextractor gstextractor.c | |
* pipeline: gnlcomposition. ( gnlsource. ( bin. ( filesrc ! decodebin ) ), gnlsource. ( bin. ( filesrc ! decodebin ) ) ... ) ! \ | |
* audioconvert ! faac ! qtmux ! filesink | |
* gnlcomposition. ( gnlsource. ( bin. ( filesrc ! decodebin ) ), gnlsource. ( bin. ( filesrc ! decodebin ) ) ... ) ! \ | |
* videoconvert ! x264enc ! qtmux0. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gjs | |
const Lang = imports.lang; | |
const GLib = imports.gi.GLib; | |
const GObject = imports.gi.GObject; | |
let Helloworld = Lang.Class({ | |
Name: "Helloworld", | |
Extends: GObject.Object, | |
_init: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gjs | |
const Lang = imports.lang; | |
const GLib = imports.gi.GLib; | |
const GObject = imports.gi.GObject; | |
const Gst = imports.gi.Gst; | |
const Mainloop = imports.mainloop; | |
let TestAV = new Lang.Class({ | |
Name: "Helloworld", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env vala | |
[DBus (name = "org.testdbus.Server")] | |
interface TestDBus.Client : GLib.Object { | |
public signal void finalized(); | |
public abstract string say(string sentence) throws Error; | |
public abstract void quit() throws Error; | |
} | |
[DBus (name = "org.testdbus.Server")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gjs | |
// run : gjs dbus-list-current-services.js 2>/dev/null | sort -t, -k2,3r | column -s, -t | |
const Lang = imports.lang; | |
const Gio = imports.gi.Gio; | |
const Format = imports.format; | |
const cmdline = "dbus-send --%s --dest=%s --type=method_call --print-reply %s org.freedesktop.DBus.Introspectable.Introspect"; | |
const Subprocess = new Lang.Class({ | |
Name: "Subprocess", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <glib-unix.h> | |
#include <gst/gst.h> | |
typedef struct { | |
GstElement *bin; | |
GstElement *in; | |
GstElement *decodebin; | |
GstElement *aout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <glib-unix.h> | |
#include <gst/gst.h> | |
#include <ges/ges.h> | |
/* interval to query pipeline position (currently 600 seconds or 10 mins) */ | |
#define QUERY_POSITION_INTERVAL 10 * 60 * 1000 | |
typedef struct { | |
GESPipeline *pipeline; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import datetime | |
import sys | |
datetime0 = datetime.datetime.fromtimestamp(time.mktime(time.strptime(sys.argv[2], '%H:%M:%S'))) | |
datetime1 = datetime.datetime.fromtimestamp(time.mktime(time.strptime(sys.argv[1], '%H:%M:%S'))) | |
print(datetime0 - datetime1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <glib.h> | |
#include <glib-object.h> | |
#include <gio/gio.h> | |
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) | |
#define TEST_TYPE_GIO_ASYNC (test_gio_async_get_type()) | |
#define TEST_GIO_ASYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TEST_TYPE_GIO_ASYNC, TestGioAsync)) |
OlderNewer