Skip to content

Instantly share code, notes, and snippets.

View yashi's full-sized avatar

Yasushi SHOJI yashi

View GitHub Profile
#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);
#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);
#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);
pipeline.each do |elem|
puts elem.name
end
#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);
@yashi
yashi / pad.c
Last active December 9, 2015 13:51
#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_print("message: eos\n");
g_main_loop_quit(mainloop);
struct GstBuffer {
GstMiniObject mini_object;
GstBufferPool *pool;
/* timestamp */
GstClockTime pts;
GstClockTime dts;
GstClockTime duration;
typedef struct
{
GstBuffer buffer;
gsize slice_size;
/* the memory blocks */
guint len;
GstMemory *mem[GST_BUFFER_MEM_MAX];
@yashi
yashi / mem.c
Created December 10, 2015 13:59
#include <gst/gst.h>
#include <string.h>
int main(int argc, char *argv[])
{
GstBuffer *buf;
GstMemory *mem;
GstMapInfo info;
gsize size;
gsize maxsize;
@yashi
yashi / mem0.c
Last active December 11, 2015 09:30
buf = gst_buffer_new();
size = gst_buffer_get_sizes(buf, NULL, &maxsize);
g_print("buf:\n");
g_print(" size: %" G_GSIZE_FORMAT "\n", size);
g_print(" maxsize: %" G_GSIZE_FORMAT "\n", maxsize);
g_print(" nr: %u\n", gst_buffer_n_memory(buf));