Skip to content

Instantly share code, notes, and snippets.

View yashi's full-sized avatar

Yasushi SHOJI yashi

View GitHub Profile
#define DIRECT_THREADED
#ifndef DIRECT_THREADED
#define INIT_DISPACTH for (;;) { i = *pc; switch (GET_OPCODE(i)) {
#define CASE(op) case op:
#define NEXT mrb->arena_idx = ai; pc++; break
#define JUMP break
#define END_DISPACTH }}
#else
typedef struct mrb_value {
union {
mrb_float f;
void *p;
mrb_int i;
mrb_sym sym;
} value;
enum mrb_vtype tt:8;
} mrb_value;
#define GET_OPCODE(i) (((mrb_code)(i)) & 0x7f)
8cc: e1b00ba8 lsrs r0, r8, #23
8d0: 0a000008 beq 8f8 <mrb_run+0x724>
#define GETARG_A(i) ((((mrb_code)(i)) >> 23) & 0x1ff)
#define VERSION "1.0.0"
#define PACKAGE "dropper package"
#include <gst/gst.h>
#include <glib.h>
#include <gst/base/gstbasetransform.h>
#include "drop.h"
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@yashi
yashi / test.c
Last active December 5, 2015 13:05
#include <gst/gst.h>
int main(int argc, char *argv[])
{
GMainLoop *mainloop;
GstElement *pipeline;
GError *error = NULL;
gst_init(&argc, &argv);
$ gst-launch-1.0 videotestsrc ! autovideosink
#include <gst/gst.h>
int main(int argc, char *argv[])
{
GMainLoop *mainloop;
GstElement *pipeline;
GError *error = NULL;
gst_init(&argc, &argv);
@yashi
yashi / cat.c
Created December 5, 2015 13:49
#include <gst/gst.h>
gboolean on_message(GstBus *bus, GstMessage *message, gpointer p)
{
GMainLoop *mainloop = p;
(void)bus;
if ((GST_MESSAGE_TYPE(message) & GST_MESSAGE_EOS))
g_main_loop_quit(mainloop);