Fix client-source negotiation and states

Avoid buffers without data.

Handle stream state changes in gstpvsrc and gstpvsink

Implement capabilities in v4l2 source
This commit is contained in:
Wim Taymans 2015-05-15 15:58:13 +02:00
parent cbe7b52a70
commit 31cc37b6a5
5 changed files with 99 additions and 32 deletions

View file

@ -141,7 +141,20 @@ v4l2_set_state (PvSource *source, PvSourceState state)
static GBytes *
v4l2_get_capabilities (PvSource *source, GBytes *filter)
{
return NULL;
GstCaps *caps, *cfilter;
gchar *str;
cfilter = gst_caps_from_string (g_bytes_get_data (filter, NULL));
if (cfilter == NULL)
return NULL;
caps = collect_caps (source, cfilter);
if (caps == NULL)
return NULL;
str = gst_caps_to_string (caps);
return g_bytes_new_take (str, strlen (str) + 1);
}
static void