ges: port to new raw audio/video caps
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 10 Feb 2012 19:35:28 +0000 (19:35 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 10 Feb 2012 19:35:28 +0000 (19:35 +0000)
Completely untested, but more likely to work than the
existing code.

ges/ges-timeline-pipeline.c
ges/ges-track-video-transition.c
ges/ges-track.c

index 8b255757dd39a8b77286f7d899ede8912b71a83a..15b9ce0f2e8296e7a4c4787d4a0d94dc89b85b3f 100644 (file)
@@ -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);
index 3adac680d9e5bebff5fa5f37215c556c6639ebf0..28c6d4a8fb6f37baadd2153ec93a0cd0dedd9be9 100644 (file)
@@ -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);
   }
index 6d9d5cbd9eebf18bb900ae689fa034ad04c2b1bf..f517bb4e65f356af1ae12dd8dc2f5fc243bb2d55 100644 (file)
@@ -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);