mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
Track: Add convenience methods for creating a raw Audio or Video track.
This commit is contained in:
parent
83c3e87661
commit
c06e2a9550
2 changed files with 27 additions and 0 deletions
|
@ -119,6 +119,30 @@ ges_track_new (GstCaps * caps)
|
|||
return g_object_new (GES_TYPE_TRACK, "caps", caps, NULL);
|
||||
}
|
||||
|
||||
GESTrack *
|
||||
ges_track_video_raw_new ()
|
||||
{
|
||||
GESTrack *track;
|
||||
GstCaps *caps = gst_caps_from_string ("video/x-raw-yuv;video/x-raw-rgb");
|
||||
|
||||
track = ges_track_new (caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
return track;
|
||||
}
|
||||
|
||||
GESTrack *
|
||||
ges_track_audio_raw_new ()
|
||||
{
|
||||
GESTrack *track;
|
||||
GstCaps *caps = gst_caps_from_string ("audio/x-raw-int;audio/x-raw-float");
|
||||
|
||||
track = ges_track_new (caps);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
return track;
|
||||
}
|
||||
|
||||
void
|
||||
ges_track_set_timeline (GESTrack * track, GESTimeline * timeline)
|
||||
{
|
||||
|
|
|
@ -67,6 +67,9 @@ void ges_track_set_caps (GESTrack * track, const GstCaps * caps);
|
|||
gboolean ges_track_add_object (GESTrack * track, GESTrackObject * object);
|
||||
gboolean ges_track_remove_object (GESTrack * track, GESTrackObject * object);
|
||||
|
||||
GESTrack *ges_track_video_raw_new ();
|
||||
GESTrack *ges_track_audio_raw_new ();
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_TRACK */
|
||||
|
|
Loading…
Reference in a new issue