Skip to content

Instantly share code, notes, and snippets.

View tetkuz's full-sized avatar

Shota TAMURA tetkuz

  • Arent Inc.
  • Chiba, Japan
  • X @tetkuz
View GitHub Profile
@tetkuz
tetkuz / main.c
Created December 16, 2016 09:25
GByteArray sample
#include <string.h>
#include <glib.h>
int main()
{
gchar *string = "message";
GByteArray *array;
guint8 *p;
array = g_byte_array_new ();
#include <gst/gst.h>
#include <glib.h>
int main(int argc, char *argv[])
{
GString *launch_str;
GstElement *pipeline;
GstBus *bus;
GstMessage *msg;
#include <gst/gst.h>
#include <glib.h>
int main(int argc, char *argv[])
{
GString *launch_str;
GstElement *pipeline;
GstBus *bus;
GstMessage *msg;
@tetkuz
tetkuz / property_notify_watch.c
Last active November 30, 2016 15:20
GStreamer 1.10 new API: property_notify_watch
// gcc -Wall -Wextra property_notify_watch.c `pkg-config --cflags --libs gstreamer-1.0`
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <gst/gst.h>
#define HIGH (30)
#define SLOW (10)
GstElement *pipeline;

Mini Bash Tester Sample

mini-bash-tester/test_utils.sh の使用例です。

File List

sample
|-- README.md      ... 本ファイル
|-- testee.sh      ... テスト対象プログラム
#include <stdio.h>
#include <gst/gst.h>
#define PIPELINE_STRING "gst-launch-1.0 \
filesrc location=softboy.avi ! avidemux \
! avdec_mpeg4 ! videorate \
! capsfilter \
caps=video/x-raw,framerate=10/1 \
name=filter \
! videoconvert ! ximagesink"
@tetkuz
tetkuz / main.c
Last active March 18, 2020 20:54
GST_MESSAGE_ELEMENT Sample
#include <gst/gst.h>
static void
fakesink_handoff (GstElement* object, GstBuffer* arg0, GstPad* arg1, gpointer data)
{
static gint cnt=0;
GstElement *pipeline = GST_ELEMENT(data);
(void)object;
(void)arg0;
(void)arg1;
@tetkuz
tetkuz / main.c
Created May 25, 2016 02:48
gst_memory and notify
#include <stdio.h>
#include <gst/gst.h>
void notify_func(gpointer data)
{
(void) data;
g_print ("from buffer_notify()\n");
}
int main (int argc, char *argv[])
@tetkuz
tetkuz / main.c
Created May 25, 2016 02:21
gst_allocator_class.free() override
#include <stdio.h>
#include <gst/gst.h>
void my_free (GstAllocator * allocator, GstMemory * mem)
{
(void)allocator;
(void)mem;
g_print ("my_free(): Hello\n");
}
@tetkuz
tetkuz / main.c
Created May 23, 2016 10:52
gst_buffer and gstring
/* gcc -Wall -Wextra main.c `pkg-config --libs --cflags gstreamer-1.0` */
#include <gst/gst.h>
int main(int argc, char *argv[])
{
GstBuffer *buf;
GstMapInfo info;
GString *tmp;
gst_init (&argc, &argv);