def seek(self, location):
        """
        @param location: time to seek to, in nanoseconds
        """
        Gst.debug("seeking to %r" % location)
        event = Gst.event_new_seek(1.0, Gst.FORMAT_TIME,
            Gst.SEEK_FLAG_FLUSH | Gst.SEEK_FLAG_ACCURATE,
            Gst.SEEK_TYPE_SET, location,
            Gst.SEEK_TYPE_NONE, 0)

        res = self.player.send_event(event)
        if res:
            #Gst.info("setting new stream time to 0")
            self.player.set_new_stream_time(0L)
        else:
            Gst.error("seek to %r failed" % location)