<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello, <span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap">alexolut</span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap"><br>
</span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap">Your mkv container is not finished. It is the reason it is damaged.</span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap"><br>
</span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap">-You need to send EOS event before stoping pipeline</span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap"> <span>gst_element_send_event(_pipeline, gst_event_new_eos());</span></span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap"><br>
</span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap">-After this, wait for <span>GST_MESSAGE_EOS on a bus</span></span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap"><span><br>
</span></span></p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap"><span>-Only then you can close pipeline</span></span></p>
<p><br>
</p>
<p><span style="color:rgb(51,51,51); font-size:17px; white-space:nowrap">Mikl</span></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org> on behalf of alexolut <alexolut@gmail.com><br>
<b>Sent:</b> Tuesday, November 1, 2016 9:32:50 AM<br>
<b>To:</b> gstreamer-devel@lists.freedesktop.org<br>
<b>Subject:</b> Re: Saving stream to file on unstable communication line</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Tim Müller wrote<br>
> The easiest option might be to use a container format where the content<br>
> survives even if it's not finalised properly, for example Matroska or<br>
> MPEG-TS.<br>
<br>
I tried to use "muxer=matroskamux" for "splitmuxsink" but in result I also<br>
got damaged .mkv file after interrupt my application on some condition and<br>
switching pipeline to NULL state via:<br>
<br>
    gst_element_set_state(pipeline, GST_STATE_NULL);<br>
<br>
before return from main().<br>
<br>
Maybe I did it not right? Do you know how to close RTSP-connection correctly<br>
(on some user-defined condition) and avoid damaged files in result?<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Saving-stream-to-file-on-unstable-communication-line-tp4680334p4680361.html">
http://gstreamer-devel.966125.n4.nabble.com/Saving-stream-to-file-on-unstable-communication-line-tp4680334p4680361.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
gstreamer-devel@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div>
</span></font>
</body>
</html>