int main(int argc, char *argv[]) {
CustomData data;
GstStateChangeReturn ret;
GIOChannel *io_stdin;
[...]
/* Start playing */
ret = gst_element_set_state (data.pipeline, GST_STATE_PLAYING);
if (ret == GST_STATE_CHANGE_FAILURE) {
g_printerr ("Unable to set the pipeline to the playing state.\n");
gst_object_unref (data.pipeline);
return -1;}
print_current_values (data.pipeline);
/* Create a GLib Main Loop and set it to run */
data.loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (data.loop);
[...]
the error message like this : GStreamer-CRITICAL **: gst_implements_interface_cast: assertion `gst_element_implements_interface (GST_ELEMENT (from), iface_type)’ failed
The video can display normal but can’t adjust Brightness, Contrast, Hue and Saturation follow sample.
it will fix above issue, and I can adjust contrast, brightness, hue and saturation for v4l2src.
But if I use “playbin uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm”,
for gstreamer-0.10: there is video output, but gst_bin_get_by_interface will return NULL;
for gstreamer-1.0: I can adjust contrast, brightness, hue and saturation, but there isn’t video output, so I can’t check the color balance performance.
Only playbin parameter will occur.
Does anyone know what different of playbin between gstreamer-0.10 and 1.0?
Thanks.
Hi yumeng,
Likely the color balance only being supported by playbin2 with gstreamer 1.0…
gst-inspect-1.0 playbin
Factory Details:
Rank none (0)
Long-name Player Bin 2
…
flags : Flags to control behaviour
flags: readable, writable
Flags “GstPlayFlags” Default: 0x00000617, “soft-colorbalance+deinterlace+soft-volume+text+audio+video”
(0x00000001): video - Render the video stream
(0x00000002): audio - Render the audio stream
(0x00000004): text - Render subtitles
(0x00000008): vis - Render visualisation when no video is present
(0x00000010): soft-volume - Use software volume
(0x00000020): native-audio - Only use native audio formats
(0x00000040): native-video - Only use native video formats
(0x00000080): download - Attempt progressive download buffering
(0x00000100): buffering - Buffer demuxed/parsed data
(0x00000200): deinterlace - Deinterlace video if necessary
(0x00000400): soft-colorbalance - Use software color balance