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 <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); |
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 <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); |
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 <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); |
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
pipeline.each do |elem| | |
puts elem.name | |
end |
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 <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); |
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 <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); |
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
struct GstBuffer { | |
GstMiniObject mini_object; | |
GstBufferPool *pool; | |
/* timestamp */ | |
GstClockTime pts; | |
GstClockTime dts; | |
GstClockTime duration; |
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
typedef struct | |
{ | |
GstBuffer buffer; | |
gsize slice_size; | |
/* the memory blocks */ | |
guint len; | |
GstMemory *mem[GST_BUFFER_MEM_MAX]; |
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 <gst/gst.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) | |
{ | |
GstBuffer *buf; | |
GstMemory *mem; | |
GstMapInfo info; | |
gsize size; | |
gsize maxsize; |
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
mem = gst_allocator_alloc(NULL, 6, NULL); | |
size = gst_memory_get_sizes(mem, NULL, &maxsize); | |
g_print("mem 2:\n"); | |
g_print(" size: %" G_GSIZE_FORMAT "\n", size); | |
g_print(" maxsize: %" G_GSIZE_FORMAT "\n", maxsize); | |
gst_memory_map(mem, &info, GST_MAP_WRITE); | |
memcpy(info.data, "12345", 6); | |
gst_memory_unmap(mem, &info); | |
gst_buffer_insert_memory(buf, -1, mem); |