mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
ges: port to new raw audio/video caps
Completely untested, but more likely to work than the existing code.
This commit is contained in:
parent
91af8e1353
commit
7b7bf95268
3 changed files with 12 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue