-static inline void
-init_buffer(GstBuffer *buffer, const guchar *buf, guint buf_size)
-{
- GST_BUFFER_DATA(buffer) = (guint8 *)buf;
- GST_BUFFER_SIZE(buffer) = buf_size;
- GST_BUFFER_TIMESTAMP(buffer) = GST_CLOCK_TIME_NONE;
- GST_BUFFER_DURATION(buffer) = GST_CLOCK_TIME_NONE;
-}
-
-static inline GstBuffer *
-create_eos_buffer(void)
-{
- GstBuffer *buffer;
-
- buffer = gst_buffer_new();
- if (!buffer)
- return NULL;
-
- init_buffer(buffer, NULL, 0);
- GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_EOS);
- return buffer;
-}
-