" " " " "\n");
}
}
- g_string_append_printf (data, "<?xpacket end=\"%c\"?>\n",
+ g_string_append_printf (data, "<?xpacket end=\"%c\"?>",
(read_only ? 'r' : 'w'));
- bsize = data->len + 1;
++ bsize = data->len;
+ bdata = g_string_free (data, FALSE);
+
buffer = gst_buffer_new ();
- GST_BUFFER_SIZE (buffer) = data->len;
- GST_BUFFER_DATA (buffer) = (guint8 *) g_string_free (data, FALSE);
- GST_BUFFER_MALLOCDATA (buffer) = GST_BUFFER_DATA (buffer);
+ gst_buffer_take_memory (buffer, -1,
+ gst_memory_new_wrapped (0, bdata, g_free, bsize, 0, bsize));
return buffer;
}
#define DEFAULT_QUEUE_TIME_MAX GST_SECOND
#define DEFAULT_AUDIO_JITTER_TOLERANCE 20 * GST_MSECOND
#define DEFAULT_AVOID_REENCODING FALSE
+ #define DEFAULT_FLAGS 0
#define DEFAULT_RAW_CAPS \
- "video/x-raw-yuv; " \
- "video/x-raw-rgb; " \
- "video/x-raw-gray; " \
+ "video/x-raw; " \
"audio/x-raw-int; " \
"audio/x-raw-float; " \
"text/plain; " \
/* 3.2. restriction elements */
/* FIXME : Once we have properties for specific converters, use those */
if (GST_IS_ENCODING_VIDEO_PROFILE (sprof)) {
- GstElement *cspace, *scale, *vrate, *cspace2;
- const gboolean native_video = ! !(ebin->flags & GST_ENC_FLAG_NATIVE_VIDEO);
++ const gboolean native_video = !!(ebin->flags & GST_ENC_FLAG_NATIVE_VIDEO);
+ GstElement *cspace = NULL, *scale, *vrate, *cspace2 = NULL;
GST_LOG ("Adding conversion elements for video stream");
GstPad *srcpad = (GstPad *) tmp->data;
STREAMS_UNLOCK (stream_splitter);
- if (res)
- gst_caps_merge (res, gst_pad_peer_get_caps (srcpad, filter));
- else
+ if (res) {
- GstCaps *peercaps = gst_pad_peer_get_caps_reffed (srcpad);
++ GstCaps *peercaps = gst_pad_peer_get_caps (srcpad, filter);
+ if (peercaps)
+ gst_caps_merge (res, gst_caps_make_writable (peercaps));
+ } else {
- res = gst_pad_peer_get_caps (srcpad);
+ res = gst_pad_peer_get_caps (srcpad, filter);
+ }
STREAMS_LOCK (stream_splitter);
if (G_UNLIKELY (cookie != stream_splitter->cookie)) {
/* could be DEGAS Elite */
if (resolution <= 2) {
data = gst_type_find_peek (tf, len - 16, 8);
- return;
+ if (G_UNLIKELY (data == NULL))
++ return;
for (n = 0; n < 4; n++) {
if (GST_READ_UINT16_BE (data + n * 2) > 2)
return;
it does have 4 16 bytes values near the end that are 0-2 though. */
if ((resolution & 0x8000) && (resolution & 0x7fff) <= 2) {
data = gst_type_find_peek (tf, len - 16, 8);
- return;
+ if (G_UNLIKELY (data == NULL))
++ return;
for (n = 0; n < 4; n++) {
if (GST_READ_UINT16_BE (data + n * 2) > 2)
return;