If you open timeline you'll see that getLength() is called every half second or second. Problem is that gstreamer don't recognize that file size grows. I need to check but I think E2 don't get DURATION_CHANGED messages.
IPTV (gstreamer) recording
Re: IPTV (gstreamer) recording #41
Re: IPTV (gstreamer) recording #42
Posted 18 July 2015 - 12:59
I don not know if this is involved but progresstime keeping in dvbmediasink is done by :
Audiosink
static gint64 gst_dvbaudiosink_get_decoder_time(GstDVBAudioSink *self) { gint64 cur = 0; if (self->fd < 0 || !self->playing || !self->pts_written){return GST_CLOCK_TIME_NONE;} ioctl(self->fd, AUDIO_GET_PTS, &cur); if (cur) { self->lastpts = cur; } else { cur = self->lastpts; } cur *= 11111; cur -= self->timestamp_offset; return cur; }
Video sink
static gint64 gst_dvbvideosink_get_decoder_time(GstDVBVideoSink *self) { gint64 cur = 0; if (self->fd < 0 || !self->playing || !self->pts_written) return GST_CLOCK_TIME_NONE; ioctl(self->fd, VIDEO_GET_PTS, &cur); if (cur) { self->lastpts = cur; } else { cur = self->lastpts; } cur *= 11111; cur -= self->timestamp_offset; return cur; }
Re: IPTV (gstreamer) recording #43
Re: IPTV (gstreamer) recording #44
Posted 18 July 2015 - 13:11
That is only used for current play position. Problem is in this case the getLength().
I was a little bit wrong. getLength returns growing values:
eServiceMP3::getLength() returned pts 5866798 eServiceMP3::getLength() returned pts 5894428 eServiceMP3::getLength() returned pts 5931599 eServiceMP3::getLength() returned pts 5967599 eServiceMP3::getLength() returned pts 5998109 eServiceMP3::getLength() returned pts 5998109 eServiceMP3::getSubtitleList finished poll: unhandled POLLERR/HUP/NVAL for fd 47(16) eServiceMP3::getLength() returned pts 6750787 eServiceMP3::getLength() returned pts 6750787 eServiceMP3::getLength() returned pts 6750787 eServiceMP3::getLength() returned pts 6750787 eServiceMP3::getLength() returned pts 6750787
But I guess filesrc reads so fast the file that it reads to the end of the file within seconds and returns then EOF. It don't wait long enough for new incoming bits.
@mman: Gstreamer is included in the image. Or do you mean the source code?
Edit: I don't get GST_MESSAGE_DURATION_CHANGED messages
Edited by betacentauri, 18 July 2015 - 13:12.
Re: IPTV (gstreamer) recording #45
Re: IPTV (gstreamer) recording #46
Posted 18 July 2015 - 13:27
Gstreamer is built-in. It's not a plugin you can see in the plugin browser. And you cannot update it yourself. It will be updated automatically during image update.
Here is the source code:
http://cgit.freedesktop.org/gstreamer/
Please use other/new thread for more basic questions regarding gstreamer.
Re: IPTV (gstreamer) recording #47
Posted 18 July 2015 - 14:01
If you start the recording and then wait 5-10 maybe 15 minutes it works. I guess the buffer in the gstreamer filesrc gets filled. If current file size is smaller than buffer size then filesrc can read the whole file in one chunk and sends then EOS signal. If buffer is smaller than file size, buffer size is read and filesrc waits for data processing before reading next chunk.
Solutions? Maybe set smaller buffer size. I guess it's not a good idea. Better would be an adaption of gstreamer filesrc. It should not send EOS immediately after reaching end of file.
Re: IPTV (gstreamer) recording #48
Posted 18 July 2015 - 14:36
If you start the recording and then wait 5-10 maybe 15 minutes it works. I guess the buffer in the gstreamer filesrc gets filled. If current file size is smaller than buffer size then filesrc can read the whole file in one chunk and sends then EOS signal. If buffer is smaller than file size, buffer size is read and filesrc waits for data processing before reading next chunk.
Solutions? Maybe set smaller buffer size. I guess it's not a good idea. Better would be an adaption of gstreamer filesrc. It should not send EOS immediately after reaching end of file.
Yes that's then something for the dvbmediasink,
But ... If You do not do that And You play for example a cd it will stop playing after the song and hang. The user will have to select each time to play further.
However it's well something into that direction. Perhaps a check on file grow or not before an eos is send something like that.
Re: IPTV (gstreamer) recording #49
Re: IPTV (gstreamer) recording #50
Posted 23 July 2015 - 19:28
In the meantime start an instant recording and switch to movie player (but read my posts above, a buffer of some minutes is currently needed).
Re: IPTV (gstreamer) recording #51
Posted 28 July 2015 - 13:50
Thank you very much for this great effort. You are genius. I can not receive my favorite channel in northern Sweden although i have 150 cm dish. I can stream my channels to enigma2 as iptv . At day time i am at work , now i can record my iptv channel at day time thanks to you. The only problem is that stream stops working when use Gstreamer 0.1 as in current openpli image. with Gstreamer 1.4.5 works fine. I want to test the patch with Gstreamer 1.4.5. Please how can i apply his patch to Gstreamer 1.4.5 ? which path in enigam2 goes patch till? whats is / are telenet commands.
Thanlks in advance.
Re: IPTV (gstreamer) recording #52
Posted 28 July 2015 - 18:35
Thanks!
Where did you get the Gstreamer 1.4.5 image? Is it an OpenPli image? If you build it by yourself, just update your environment and start new build.
It's not easy (better to say almost impossible) to patch an existing image. You need a build environment with exact the same sources.
If you use an OE-A image, just update the image. Several images are already using my patch (OpenATV, OpenXTA,...).
Re: IPTV (gstreamer) recording #53
Posted 29 July 2015 - 22:58
thanks
Mut@nt HD51 with PLi 7.2 release - Cccam, PLi HD skin, HDD-1,5TB, USB DVB-T,4GB usb backupsuite. AB: harmony smartcontrol
XTrend ET6500 with PLi 7.2 release - PLi HD skin, Stream remote, 2GB usb backupsuite. AB: Harmony 650 , 1x zgemma h2h with Cccam.
Met een USB Dvb-T Triax 78cm, 2x ALPS quatro LNB /19,2 en 23,5, SAB GSO-multiswitch: 4 sat. in 12 out.
Re: IPTV (gstreamer) recording #54
Re: IPTV (gstreamer) recording #55
Posted 31 July 2015 - 19:33
Hi,
recording logic is in RecordTimer.py if you follow "self.record_service", you will see that you can start simple recording like this:
def record(session, path, sref, name="", description="", tags=""): print "record: '%s' to '%s'"% (sref.getName(), path) rservice = session.nav.recordService(sref, simulate=False) # eServiceMP3Record::prepare(const char *filename, time_t begTime, time_t endTime, int eit_event_id, const char *name, const char *descr, const char *tags, bool descramble, bool recordecm) res = rservice.prepare(path, 0, 0, 0,name, description, tags, True, True) if res: print "record: rservice.prepare() failed - %s" % str(res) return res = rservice.start() if res: print "record: rservice.start() failed - %s" % str(res) return return rservice
Re: IPTV (gstreamer) recording #56
Posted 31 July 2015 - 20:36
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: IPTV (gstreamer) recording #57
Re: IPTV (gstreamer) recording #58
Re: IPTV (gstreamer) recording #59
Re: IPTV (gstreamer) recording #60
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users