From 7b7bf952681687d371c179996c2c47c9ab61717b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 10 Feb 2012 19:35:28 +0000 Subject: [PATCH] ges: port to new raw audio/video caps Completely untested, but more likely to work than the existing code. --- ges/ges-timeline-pipeline.c | 11 ++++++----- ges/ges-track-video-transition.c | 2 +- ges/ges-track.c | 10 +++++----- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ges/ges-timeline-pipeline.c b/ges/ges-timeline-pipeline.c index 8b255757dd..15b9ce0f2e 100644 --- a/ges/ges-timeline-pipeline.c +++ b/ges/ges-timeline-pipeline.c @@ -214,9 +214,9 @@ ges_timeline_pipeline_update_caps (GESTimelinePipeline * self) GST_DEBUG ("Smart Render mode, setting input caps"); ocaps = gst_encoding_profile_get_input_caps (prof); if (track->type == GES_TRACK_TYPE_AUDIO) - rcaps = gst_caps_from_string ("audio/x-raw-int;audio/x-raw-float"); + rcaps = gst_caps_new_empty_simple ("audio/x-raw"); else - rcaps = gst_caps_from_string ("video/x-raw-yuv;video/x-raw-rgb"); + rcaps = gst_caps_new_empty_simple ("video/x-raw"); gst_caps_append (ocaps, rcaps); ges_track_set_caps (track, ocaps); } else { @@ -224,9 +224,9 @@ ges_timeline_pipeline_update_caps (GESTimelinePipeline * self) /* Raw preview or rendering mode */ if (track->type == GES_TRACK_TYPE_VIDEO) - caps = gst_caps_from_string ("video/x-raw-yuv;video/x-raw-rgb"); + caps = gst_caps_new_empty_simple ("video/x-raw"); else if (track->type == GES_TRACK_TYPE_AUDIO) - caps = gst_caps_from_string ("audio/x-raw-int;audio/x-raw-float"); + caps = gst_caps_new_empty_simple ("audio/x-raw"); if (caps) { ges_track_set_caps (track, caps); @@ -878,7 +878,8 @@ ges_timeline_pipeline_get_thumbnail_rgb24 (GESTimelinePipeline * self, GstSample *ret; GstCaps *caps; - caps = gst_caps_from_string ("video/x-raw-rgb,bpp=(int)24," "depth=(int)24"); + caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, + "RGB", NULL); if (width != -1) gst_caps_set_simple (caps, "width", G_TYPE_INT, (gint) width, NULL); diff --git a/ges/ges-track-video-transition.c b/ges/ges-track-video-transition.c index 3adac680d9..28c6d4a8fb 100644 --- a/ges/ges-track-video-transition.c +++ b/ges/ges-track-video-transition.c @@ -197,7 +197,7 @@ on_caps_set (GstPad * srca_pad, GParamSpec * pspec, GstElement * capsfilt) /* Set capsfilter to the size of the first video */ size_caps = - gst_caps_new_simple ("video/x-raw-yuv", "width", G_TYPE_INT, width, + gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL); g_object_set (capsfilt, "caps", size_caps, NULL); } diff --git a/ges/ges-track.c b/ges/ges-track.c index 6d9d5cbd9e..f517bb4e65 100644 --- a/ges/ges-track.c +++ b/ges/ges-track.c @@ -152,7 +152,7 @@ ges_track_class_init (GESTrackClass * klass) * GESTrack:caps * * Caps used to filter/choose the output stream. This is generally set to - * a generic set of caps like 'video/x-raw-rgb;video/x-raw-yuv' for raw video. + * a generic set of caps like 'video/x-raw' for raw video. * * Default value: #GST_CAPS_ANY. */ @@ -239,7 +239,7 @@ ges_track_new (GESTrackType type, GstCaps * caps) * ges_track_video_raw_new: * * Creates a new #GESTrack of type #GES_TRACK_TYPE_VIDEO and with generic - * raw video caps ("video/x-raw-yuv;video/x-raw-rgb"); + * raw video caps ("video/x-raw"); * * Returns: A new #GESTrack. */ @@ -247,7 +247,7 @@ GESTrack * ges_track_video_raw_new (void) { GESTrack *track; - GstCaps *caps = gst_caps_from_string ("video/x-raw-yuv;video/x-raw-rgb"); + GstCaps *caps = gst_caps_new_empty_simple ("video/x-raw"); track = ges_track_new (GES_TRACK_TYPE_VIDEO, caps); @@ -258,7 +258,7 @@ ges_track_video_raw_new (void) * ges_track_audio_raw_new: * * Creates a new #GESTrack of type #GES_TRACK_TYPE_AUDIO and with generic - * raw audio caps ("audio/x-raw-int;audio/x-raw-float"); + * raw audio caps ("audio/x-raw"); * * Returns: A new #GESTrack. */ @@ -266,7 +266,7 @@ GESTrack * ges_track_audio_raw_new (void) { GESTrack *track; - GstCaps *caps = gst_caps_from_string ("audio/x-raw-int;audio/x-raw-float"); + GstCaps *caps = gst_caps_new_empty_simple ("audio/x-raw"); track = ges_track_new (GES_TRACK_TYPE_AUDIO, caps); -- 2.34.1