@param location: time to seek to, in nanoseconds
(self, location)
| 75 | return (position, duration) |
| 76 | |
| 77 | def seek(self, location): |
| 78 | """ |
| 79 | @param location: time to seek to, in nanoseconds |
| 80 | """ |
| 81 | gst.debug("seeking to %r" % location) |
| 82 | event = gst.event_new_seek(1.0, gst.FORMAT_TIME, |
| 83 | gst.SEEK_FLAG_FLUSH, |
| 84 | gst.SEEK_TYPE_SET, location, |
| 85 | gst.SEEK_TYPE_NONE, 0) |
| 86 | |
| 87 | res = self.player.send_event(event) |
| 88 | if res: |
| 89 | gst.info("setting new stream time to 0") |
| 90 | self.player.set_new_stream_time(0L) |
| 91 | else: |
| 92 | gst.error("seek to %r failed" % location) |
| 93 | |
| 94 | def pause(self): |
| 95 | gst.info("pausing player") |
no test coverage detected