GES specify Clip starting?
Thibault Saunier
tsaunier at gnome.org
Tue May 5 18:25:29 UTC 2020
Hello,
Looks like you either want to specify the inpoint when adding to the layer
or use ges_timeline_element_trim[0] afterward.
Regards,
- Thibault
[0]
https://gstreamer.freedesktop.org/documentation/gst-editing-services/gestimelineelement.html?gi-language=c#ges_timeline_element_trim
On Thu, Apr 30, 2020 at 7:35 PM killerrats <koreysjunkmail at gmail.com> wrote:
> I am adding many videos that are a continuous playing because of recording
> cameras. I was trying to trim down the first clip in the timeline. the code
> i use to add to the layer. I tell it to start at zero for the first clip. I
> hope i explained that good?
>
> anyone have a better way to doing this?
>
> I tried ges_clip_split() but it says out of bounds.
>
> for example: the clip is 00:00:09.000 long. I set the clipStart to be
> 00:00:02.000.
>
> bool AddingTracksWithLayer(std::string filePath, GESTrackType mediatype,
> guint64 startPos, GstClockTime LengthOfVideo, GESLayer* layer, GstClockTime
> clipStart)
> {
> GError* error = NULL;
> GESAsset* asst = NULL;
> GESClip* clip = NULL;
> gchar* source;
>
> source = g_strdup_printf("%s", filePath.c_str());
>
> asst = GES_ASSET(ges_uri_clip_asset_request_sync(source, &error));
>
> if (asst == NULL)
> {
> std::cout << "create uri failed " << (error != NULL) ?
> error->message :
> "";
> g_clear_error(&error);
> return false;
> }
> clip = ges_layer_add_asset(layer
> , asst
> , startPos*GST_SECOND
> , 0
> , LengthOfVideo
> , mediatype);
> gst_object_unref(asst);
> if(clipStart != GST_CLOCK_TIME_NONE)
> {
> GESClip* newClip = ges_clip_split(clip, clipStart);
> ges_layer_remove_clip(layer, newClip);
> ges_layer_remove_clip(layer, clip);
> ges_layer_add_clip(layer, clip);
> }
> if (mediatype == GES_TRACK_TYPE_VIDEO)
> check_frame_positionner_size(clip,
> std::stoi(std::to_string(this->aRenderWidth)),
> std::stoi(std::to_string(this->aRenderHeight)));
>
> g_free(source);
>
> return true;
> }
>
>
>
> -----
> ------------------------------
> Gstreamer 1.14.3
> ------------------------------
> Windows
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200505/5f9bbb6a/attachment.htm>
More information about the gstreamer-devel
mailing list