Hi all,<div><br></div><div>I was using GESTimeline to play continuously a media split in several files.</div><div><br></div><div>It was working fine so far ( I can chain my split media files and playback them). </div><div>
However, I need more feature and am struggling to know how to use classes such as Asset, Clip, Track, TrackElement, Layout...etc</div><div><br></div><div>I would like to manage my playback in this way :</div><div><br></div>
<div>- manage multi-audio tracks. For the moment I am able to discover multi audio tracks using GstDiscoverer but I do not know how to set / change an audio track to my timelinepipeline</div><div>- manage audio and/or video tracks duration. For the moment I am setting a global duration by media. </div>
<div> sometimes have - audio track from file 1 = 1:59:50</div><div> - video track from file 1 = 2:00:00</div><div> - audio track from file 2 = 2:00:10</div>
<div> - video track from file 1 = 2:00:00</div><div><br></div><div> I would like to have no gab on audio playing. So I would need to deal with duration per track</div><div><br></div>
<div>I have several solution: Track, Clip, Asset and do not know what is the best for my purpose (BTW I am using Gstreamer SDK 2012.11-1)</div><div><br></div><div>Could you please give me some advice ?</div><div><br></div>
<div>Thanks,</div><div><br></div><div>Eloi</div><div><br></div><div>Here is an extract of my code :</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<font face="courier new, monospace">/* This is our main GESTimeline */<br></font><blockquote><font face="courier new, monospace"> data->timeline = ges_timeline_new ();<br> data->tracka = ges_track_audio_raw_new ();<br>
data->trackv = ges_track_video_raw_new ();<br> data->layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();<br> g_object_set (data->layer, "priority", 0, NULL);<br> ges_timeline_layer_set_auto_transition (data->layer, TRUE);<br>
data->sinkVideo =<br> gst_parse_bin_from_description ("timeoverlay ! ximagesink name=directdrawsink-output", TRUE, NULL);<br> /* In order to listen our timeline, let's grab a convenience pipeline to put<br>
* our timeline in. */<br> data->pipeline = ges_timeline_pipeline_new ();<br> /* Add the timeline to that pipeline */<br> if (!ges_timeline_add_layer (data->timeline, data->layer) ||<br> !ges_timeline_add_track (data->timeline, data->tracka) ||<br>
!ges_timeline_add_track (data->timeline, data->trackv) ||<br> !ges_timeline_pipeline_add_timeline (data->pipeline, data->timeline))<br> return 1;<br> ges_timeline_pipeline_preview_set_video_sink (data->pipeline, data->sinkVideo);<br>
ges_timeline_pipeline_preview_set_audio_sink (data->pipeline, data->sinkAudio);<br><br><br>-----<br> newuri =<br> g_strdup_printf ("file://%s",<br> "/home/eloi/avi/file1.avi");<br>
GESTimelineFileSource *src2 = ges_timeline_filesource_new (newuri);<br> g_assert (src2);<br> g_free (newuri);<br> g_object_set (src2, "start", data->cycle * data->CLIP_DURATION, "duration",<br>
data->CLIP_DURATION, NULL);<br> ges_timeline_layer_add_object (data->layer, (GESTimelineObject *) src2);</font></blockquote></blockquote></div><div><br></div>